At 13:13 Uhr -0400 24.09.2002, Tab Julius wrote:
>At 12:52 PM 9/24/02, Howdy-Tzi wrote:
>No it won't. I misremembered. This is the code you want:
>
>>   sprite(nSpriteNum).scriptInstanceList = []
>>
>>setScriptList is for *adding* behaviors. It doesn't work for clearing them!
>
>
>Also I don't believe it works for score recording either, which was 
>in the original request.

no, AFAIK you can't use setscriptlist during scorerecording. but you 
can call setscriptlist afterwards or before. just make sure you do 
not use setscriptlist from within the same event (I had bad crashes, 
when I tried that in the same handler even outside the 
begin/endrecording clause).
But if memory serves I did successfully remove behaviors with:
sprite(x).setScriptList([])

>However, I did notice in at least previous versions of Director (not 
>sure if it holds true in D8.5 or not) that if I set the script 
>instance list to empty, like you do here, it made it impossible to 
>add new scripts.  That is, you could add them, but they wouldn't 
>take effect.  The original list was referenced.  Once I figured out 
>what was going on, I got around it by hand-deleting them.  In other 
>words, keeping the original list container but deleting each of the 
>contents.  It seemed that assigning a new container made it 
>impossible to apply new scripts afterwards and have them work.

maybe realted to a bug (?) where you can't 'touch' the 
scriptinstancelist of an empty sprite without killing the whole 
channel for lingo events. it's enough to only 'put 
sprite(x).scriptinstancelist', when the channel isn't populated. 
regardless how many puppetsprite false or the like, jumping to a 
frame with no sprite in that channel  and jumping to another frame 
with a completely different sprite, with other behviors attached, the 
behavior won't get initialized anymore.
-- 

   |||
a�ex
  --
[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to