Animation on Chat
|
|
Rune Quinnell
Registered User
Join date: 25 Aug 2007
Posts: 28
|
10-14-2007 04:49
I can't seem to get this to work which is pretty bizarre.
I have an attatched object that rezez another object but I want to make the Avatar animate to look like they are creating the rezzed object.
The trigger is a command in the chat window using the llListen and that seems to have miffed it up somehow. I keep getting errors saying "can't get detected permissions" etc...
I can make animations work on touch starts or other triggers and I set the listen command to listen for anyone in case it's key detection was somehow conflicting with the permission key detection but it still doesn't work.
Anyone have an idea what I'm missing here?
|
|
Rune Quinnell
Registered User
Join date: 25 Aug 2007
Posts: 28
|
Begging urchin in rags, and covered in soot...
10-14-2007 06:21
=( P....Pleeease... can someone help m-m-me???...
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
10-14-2007 07:05
In a case like this, instead of us trying to figure out exactly how you coded it and what is entered wrong, it would be much easier if you posted what you have. Then we would be more then happy to help you get it up and running Rune.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|
|
Rune Quinnell
Registered User
Join date: 25 Aug 2007
Posts: 28
|
Thank You Thank You!!! *cries*
10-14-2007 07:28
From: Jesse Barnett In a case like this, instead of us trying to figure out exactly how you coded it and what is entered wrong, it would be much easier if you posted what you have. Then we would be more then happy to help you get it up and running Rune. Sorry, I didn't think of that... it's 7am hence the crying... integer on = TRUE; default { state_entry() { llListen(0,"",NULL_KEY,""  ; } listen(integer channel, string name, key id, string message) { if(message=="air"  { llRequestPermissions(llDetectedKey(0), PERMISSION_TRIGGER_ANIMATION); llStartAnimation("Airbend1"  ; on=FALSE; } if (on==FALSE) { llReleaseControls(); llStopAnimation("Airbend1"  ; on=TRUE; } }} This version worked just fine on a touch_start scenerio. I've mangled it a few times but can't fix it.
|
|
Pale Spectre
Registered User
Join date: 2 Sep 2005
Posts: 586
|
10-14-2007 09:46
llRequestPermissions should really be handled by the run_time_permissions Event Handler but your main problem is the llDetectedKey(0) which isn't going to work in a listen Event Handler. Try using id instead (as supplied by the listen). Also, llListen(0,"",NULL_KEY,""  is a pretty laggy listen. If possible it's best to use a channel (any channel) other than zero, and llGetOwner(), instead of NULL_KEY. This will, however, depend on the application.
|
|
Rune Quinnell
Registered User
Join date: 25 Aug 2007
Posts: 28
|
Thanks... more please 
10-14-2007 16:48
ok script now looks like this... integer on = TRUE; default { state_entry() { llListen(3,"",llGetOwner(),""  ; } listen(integer channel, string name, key id, string message) { llRequestPermissions(id, PERMISSION_TRIGGER_ANIMATION); if(message=="air"  { run_time_permissions( integer perm ) { if ( perm & PERMISSION_TRIGGER_ANIMATION ) { llStartAnimation("Airbend1"  ; on=FALSE; } } } if (on==FALSE) { llReleaseControls(); llStopAnimation("Airbend1"  ; on=TRUE; } } } The run_time_permissions function doesn't want to run within an if condition, thoughts? I don't think it likes running within states either.
|
|
Rune Quinnell
Registered User
Join date: 25 Aug 2007
Posts: 28
|
Yay!
10-14-2007 16:51
NM I fixed it all by my self! Aren't I self sufficient 7 hours and begging for help later...
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
10-14-2007 17:06
From: Rune Quinnell NM I fixed it all by my self! Aren't I self sufficient 7 hours and begging for help later... WOOT!!!! Bad news is you will become addicted to scripting now!!!!
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|
|
Dez Singh
NooB
Join date: 25 Apr 2007
Posts: 12
|
12-02-2007 03:48
From: Rune Quinnell NM I fixed it all by my self! Aren't I self sufficient 7 hours and begging for help later... what did you change? I'm trying to get this script to work because I need it for a gadget I'm making.. Could you post the finished script please? Or at least give me a hint on how to fix it. I'm no good at scripting you see.
|
|
Deanna Trollop
BZ Enterprises
Join date: 30 Jan 2006
Posts: 671
|
12-02-2007 16:44
Rune placed his run_time_permissions event handler inside of the listen event handler. Event handlers can't be nested (there's no reason they should be, anyhow). He probably moved it to before or after the listen. (It doesn't matter which)
|
|
Dez Singh
NooB
Join date: 25 Apr 2007
Posts: 12
|
12-02-2007 22:56
Aaaah... clever!
|