Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Animation does not work

Benno Munster
Registered User
Join date: 3 Mar 2008
Posts: 4
03-03-2008 02:07
I'm trying to have an avatar perform some animation after touching an object.
The object has the following script; after touching I see the message "Permission granted" but the avatar does not move. What could be wrong?

string ANIMATION = "hula";
key gDetectedKey;

default {
state_entry() {
llWhisper(0, "Hello, Avatar!";);
}

touch_start(integer total_number) {
gDetectedKey = llDetectedKey(0);
llRequestPermissions(gDetectedKey, PERMISSION_TRIGGER_ANIMATION);
}

run_time_permissions(integer perm) {
if (PERMISSION_TRIGGER_ANIMATION & perm) {
llWhisper(0, "Permission granted";);
state animating;
}
else {
llWhisper(0, "Permission denied";);
}
}
}

state animating {
state_entry() {
llStartAnimation(ANIMATION);
}


touch_start(integer total_number) {
llStopAnimation(ANIMATION);
llWhisper(0, "Stopped.";);
state default;
}
}
Dylan Rickenbacker
Animator
Join date: 11 Oct 2006
Posts: 365
03-03-2008 06:51
I tested your script and it worked fine. A few things that you might check:

(1) You did remember to put the animation in the object's contents, right?

(2) Is the name of the anim spelled right? (Case sensitive!)

(3) Is your AO switched off?
Benno Munster
Registered User
Join date: 3 Mar 2008
Posts: 4
03-03-2008 07:50
Thanks for testing it. Always good to know it's not something in the script itself.
I did put the hula in the object's content and checked that it's spelled correctly.
I don't have an AO active either, but you did point me in the right direction.
The hula I have is actually a gesture.

As it stands now I don't have any isolated animations, only gestures. Even the standard library does not contain any animations. Is there any way to extract an animation out of a gesture? Or does anybody have some free animations for me?

Thanks

Edit: never mind; somebody pointed out that there are builtin animations which I don't need in my inventory as explained here: http://rpgstats.com/wiki/index.php?title=Animation
I also found a nice freebie package with lots of animations :)
Malia Writer
Unemployed in paradise
Join date: 20 Aug 2007
Posts: 2,026
03-03-2008 08:46
Try the Freebie Warehouse and Freebie Dungeon, among others. You can find boxes of animations there. You can also look on www.slexchange.com.

If I have any that are transfer I'll try to remember to drop them your way, along with some landmarks. (My short term memory is terrible, so if you don't find what you need send me an IM in world.)
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
03-03-2008 11:47
also note that if the anim you play is lower priority than one already playing, it'll fail to show (but actually be working) or do strange things (as different parts between the playing anims are animated)
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -