Animation override stored in attachment
|
Nih Grun
Registered User
Join date: 30 Apr 2008
Posts: 58
|
05-22-2008 11:37
Hiya everyone I'm trying to write a script that will play an animation when the object it is inside is attached to the body. I've made a suitable animation and given it a high priority, but I'm having trouble getting it to play. Here's what I have so far, based on a script I found: default { attach(key id) { if(id == NULL_KEY)//IF detached and an animation is running llStopAnimation("equip"  ; //stop the anim else llResetScript(); } state_entry() { llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION); //we ask for permissions } run_time_permissions(integer perms) { llStartAnimation("equip"  ; } } The animation doesn't play. What am I doing wrong?
|
Pygora Acronym
User
Join date: 20 Feb 2007
Posts: 222
|
05-22-2008 11:51
You need to put the animation named "equip" in the object's inventory along with the script.
|
Nih Grun
Registered User
Join date: 30 Apr 2008
Posts: 58
|
05-22-2008 11:54
From: Pygora Acronym You need to put the animation named "equip" in the object's inventory along with the script. Already done. Can anyone critique the script above? I just tested my animation and while it played in the upload preview, it isn't playing in the world or locally so I guess that's the problem. Could it be that my stance AO is overriding it? How do you alter the priority of an existing animation or go higher than 4? (Fixed, I hadn't uploaded that version with priority 4). The script still won't trigger the animation however. What should I try next?
|
Darien Caldwell
Registered User
Join date: 12 Oct 2006
Posts: 3,127
|
05-22-2008 12:01
You should take this to the Scripting forum.
|
Nih Grun
Registered User
Join date: 30 Apr 2008
Posts: 58
|
05-22-2008 12:03
From: Darien Caldwell You should take this to the Scripting forum. Will do, thank you officer.
|
Pygora Acronym
User
Join date: 20 Feb 2007
Posts: 222
|
05-22-2008 12:58
The script compiled fine for me on the test grid (can't get to the main right now) and did its animation override with one of my own uploaded animations and calling a stock SL animation. Are you getting a request from the object to animate your avatar and choosing "yes"?
I'm confused reading about your travails with your animation, it reads rather non-linear for me. Is is still not playing local or world? If it doesn't play in world no amount of looking at scripts will fix that.
|
Lindal Kidd
Dances With Noobs
Join date: 26 Jun 2007
Posts: 8,371
|
05-22-2008 14:46
From: Nih Grun Already done.
Can anyone critique the script above?
I just tested my animation and while it played in the upload preview, it isn't playing in the world or locally so I guess that's the problem. Could it be that my stance AO is overriding it? How do you alter the priority of an existing animation or go higher than 4? (Fixed, I hadn't uploaded that version with priority 4).
The script still won't trigger the animation however. What should I try next? You can't alter the priority of an existing animation, and 4 is the highest you can go. Further help than that, I can't provide. Sorreee...
_____________________
It's still My World and My Imagination! So there. Lindal Kidd
|
Darien Caldwell
Registered User
Join date: 12 Oct 2006
Posts: 3,127
|
05-23-2008 13:47
From: Nih Grun Will do, thank you officer. Your Sarcasm isn't necessary. I'm not being an officer, i was trying to help you, as you *did* ask for opinions on your script. The people who frequent the scripting forums, such as myself, are very eager, willing, and able to give you the critique you asked for. Few may even frequent this forum. I can tell you your attitude will not make you any quick friends here.
|
Nih Grun
Registered User
Join date: 30 Apr 2008
Posts: 58
|
05-23-2008 15:54
From: Darien Caldwell Your Sarcasm isn't necessary. I'm not being an officer, i was trying to help you, as you *did* ask for opinions on your script. The people who frequent the scripting forums, such as myself, are very eager, willing, and able to give you the critique you asked for. Few may even frequent this forum.
I can tell you your attitude will not make you any quick friends here. I was teasing, don't be so sensitive. I'm not going to get into an argument over it with you though, so I apologise. My bad.
|