Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- list animations = ["solo rfb-6 sit edge legs crossed","second animation"];
- integer animation_index = 0;
- string curr_animation;
- default
- {
- state_entry()
- {
- llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION);
- }
- on_rez(integer shellseat)
- {
- 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;
- }
- run_time_permissions(integer perm)
- {
- if(perm)
- {
- if(curr_animation) llStopAnimation(curr_animation);
- curr_animation = llList2String(animations, animation_index);
- llStartAnimation(animation);
- vector myPosition = llGetPos();
- llSetHoverHeight(myPosition.z - llGround(ZERO_VECTOR) + .74, FALSE, 1.0);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement