Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- list animations = ["Falling",":KH: merman Fall"];
- integer animation_index = 1;
- string curr_animation;
- default
- {
- state_entry()
- {
- llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION);
- }
- on_rez(integer shellseat)
- {
- vector myPosition = llGetPos();
- llSetHoverHeight(myPosition.z - llGround(ZERO_VECTOR) + .97, FALSE, 1.0);
- llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION);
- }
- touch_end(integer num)
- {
- animation_index++;
- if(animation_index >= llGetListLength(animations)) animation_index = 0; //roll back to 0 at the end of the list;
- llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION);
- }
- run_time_permissions(integer perm)
- {
- if(perm)
- {
- if(curr_animation) llStopAnimation(curr_animation);
- curr_animation = llList2String(animations, animation_index);
- llStartAnimation(curr_animation );
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement