Siddean Munro
Artist!
Join date: 21 Apr 2007
Posts: 113
|
08-24-2009 23:43
Hi all.
I have an animation running in an attached prim using a script that restarts the animation after x time to try and counteract the actions of people who use priority 4 for AO and dance animations when priority 3 is enough and priority 4 ruins animate on attach functionality....anyway I digress.
My script works pretty well except when I go to a no scripts sim. Technically, the script is running when I get there so it should keep doing what it's doing but it starts behaving like a normal animate on attach script and doesn't actually restart the animation properly, so it won't autocorrect when you start a priority 4 dance animation.
Any advice on what might be going on here would be appreciated. I've seen a similar thing done with a similar action, so I know it's possible.
_____________________
My Second Life Blog. New releases, fashion news and musings and more- http://slink.mmoportraits.com/
|
Viktoria Dovgal
…
Join date: 29 Jul 2007
Posts: 3,593
|
08-25-2009 00:06
Scripts only stay running in no script areas if they take controls, or some other script in the same prim has taken controls. A dummy permission and take that ignores the controls is fine.
|
Siddean Munro
Artist!
Join date: 21 Apr 2007
Posts: 113
|
08-25-2009 00:11
Ok but don't you have to ask for animation permissions from the avatar when you wear the object with the script in it? I thought it wouldn't work otherwise.
_____________________
My Second Life Blog. New releases, fashion news and musings and more- http://slink.mmoportraits.com/
|
Viktoria Dovgal
…
Join date: 29 Jul 2007
Posts: 3,593
|
08-25-2009 00:12
Yep, but you also have to ask for PERMISSION_TAKE_CONTROLS to make this work.
In your run_time_permissions, a dummy like llTakeControls(CONTROL_FWD, FALSE, TRUE) will be fine, you don't need a control event handler.
|
Siddean Munro
Artist!
Join date: 21 Apr 2007
Posts: 113
|
08-25-2009 00:33
oooh interesting! I will pass this along to my scripter tonight and see how it goes! thank you very much 
_____________________
My Second Life Blog. New releases, fashion news and musings and more- http://slink.mmoportraits.com/
|
EF Klaar
Registered User
Join date: 11 Jun 2007
Posts: 330
|
08-25-2009 07:31
From: Viktoria Dovgal Yep, but you also have to ask for PERMISSION_TAKE_CONTROLS to make this work.
In your run_time_permissions, a dummy like llTakeControls(CONTROL_FWD, FALSE, TRUE) will be fine, you don't need a control event handler. Is this required for each script in a multi-scripted object, and for each script in a linked prim, for it to work?
|
Haravikk Mistral
Registered User
Join date: 8 Oct 2005
Posts: 2,482
|
08-25-2009 08:24
Only one script per-prim needs to take controls; all other scripts in the prim will continue to function as well upon entering a no-script zone. This is handy as it means you can use llTakeControls() in a script that only needs to call it once, as if you have other scripts that use llTakeControls but not all the time, then you run the risk of not having the required condition upon entering a no-script zone.
But don't abuse this "hack"/feature, as a zone is usually no-script for a reason. If you can you should decrease the frequency of timers and turn off intensive features in no-script zones, as a courtesy to the land-owners.
_____________________
Computer (Mac Pro): 2 x Quad Core 3.2ghz Xeon 10gb DDR2 800mhz FB-DIMMS 4 x 750gb, 32mb cache hard-drives (RAID-0/striped) NVidia GeForce 8800GT (512mb)
|