|
Linnian Sugar
Registered User
Join date: 30 Mar 2005
Posts: 31
|
08-25-2006 21:27
I'm trying to make a object that animates some any one who touches it and I can seam to make this do any thing string avi;
default { touch_start(integer total_number) { avi = llDetectedKey(0); llRequestPermissions(avi ,PERMISSION_TRIGGER_ANIMATION); llStartAnimation("drill dig"); llSetTimerEvent(6); } timer() { llStopAnimation("drill dig"); llResetScript(); } }
|
|
Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
|
08-25-2006 21:35
after you ask permissions you have to wait for them to accept or deny them, which is a totally different event ... if (perm & ANIMATION_STUFF) play animation
|
|
Yukio Nolan
Registered User
Join date: 25 Mar 2006
Posts: 8
|
08-26-2006 09:17
also be aware, that any script can only hold permissions for one avatar, so if someone clicks the object, gets animated and then a second avatar before the first one's animation gets stopped, the animation for the first avatar will never be stopped by your script...
So what you should do is either stop the animation of the first avatar before requesting permissions to start the animation for the second one or have as many animation scripts as you want to animate at once and another script that delegates the start animation to currently free scripts via linkmessage (and gets informed by the animation scripts when they stopped animating...).
|
|
Linnian Sugar
Registered User
Join date: 30 Mar 2005
Posts: 31
|
08-26-2006 09:43
From: Osgeld Barmy after you ask permissions you have to wait for them to accept or deny them, which is a totally different event ... if (perm & ANIMATION_STUFF) play animation um.. could you put that in the form of a script?
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
08-26-2006 12:27
Move the two statements after your call to 'llRequestPermissions()' into the 'run_time_permissions' event handler, and put a guard at the beginning like 'if (!(perms & PERMISSION_TRIGGER_ANIMATION)) {return;}'.
|