Mod Faulkner
Registered User
Join date: 11 Oct 2005
Posts: 187
|
01-28-2006 07:01
Have mercy, all I am trying to do is to write a simple script that calls an animation on touch, but despite pouring over the wiki, the permissions piece baffles me. I want to touch once to trigger the animation and one set of actions, and touch the second time to trigger the animation and a second set of animation (repeat and rinse).
Thanks Mod.
|
Seagel Neville
Far East User
Join date: 2 Jan 2005
Posts: 1,476
|
01-28-2006 10:26
What is the object that you touch? A rezzed object or a wore one? If it were a rezzed one, it would be a little bit hard to set trigger to let it request permissions. I thought you needed to put down listenr event to let it do that. Or the first touch is for permissions, the second one is for your first set of actions, and the third one is for your second set of actions. The latter goes over the second touch and the third one.
_____________________
 Seagel Neville 
|
Mod Faulkner
Registered User
Join date: 11 Oct 2005
Posts: 187
|
Additional info
01-28-2006 11:24
The animation is a simple hand and arm movement. If I I could just understand how to get the animation permisssoin cleared say in the start state, then the rest would be easy, i.e., permision given, arm moves action one, arm moves agiain action two. This sounds so simple I cannot believe I have not figured it out. All I need to do is let the animation play twice but with different non animation action associated with each one.
Mod
|
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
|
01-28-2006 17:42
Once you request permissions from an av, unless you request them from someone else (each script can only hold one), or the av leaves the sim of the object, or you reset the script you keep the permissions in the script. llRequestPermissions(PERMISSION_TRIGGER_ANIMATION); is your friend for that, and pick your event(s) wisely. on_rez(), state_entry() and maybe attach()... This will evoke the run_time_permissions() event - and you can store the granted permission(s) into a global integer, say integer perms and perms=perm if you use perm for the variable in the event declaration. Whenever you want to trigger your animation, in a touch event, so a touch_start() and a counter for the different ones, or a random number system or whatever... you'd do something like: if(counter==1 && (perms & PERMISSION_TRIGGER_ANIMATION)) llStartAnimation("foo"  ; Hope that helps.
|
Mod Faulkner
Registered User
Join date: 11 Oct 2005
Posts: 187
|
Thanks Eloise
01-28-2006 18:26
I have waited all day for a helpful hint and you came though. Thank you for trying to helpe me understand the logic.
Mod
|
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
|
01-29-2006 01:49
You're welcome, hopefully its starting to take shape too!
|