Hi Eric

Sounds like your sequence of events might be off somewhere. I'm exactly sure 
from your description. But here is something I put together quickly to do what I 
think you want to do.

--testBhvr--
property p1

on new me, a1
  p1 = a1
  return me
end

on mouseDown me
  put "pressing", me
  put p1, me.spriteNum
  sprite(me.spriteNum).scriptInstanceList.deleteOne(me)
end

in the message window call the following

sprite(yourSprite).scriptInstanceList.add(script("testBhvr").new(44))

check the scriptInstanceList, you should see the instance
click on the sprite you should see output in your message window
but because the mouseDown triggers the removal subsequent mousedowns do 
nothng.

HTH,

Rob

PS if you didn't need to pass in variables you don't even need the new event


05/02/2003 7:58:05 AM, "Eric Greene" <[EMAIL PROTECTED]> wrote:

>Hi There,
>
>I'm not a real programmer, so forgive me if this is a stupid question.
>I'm trying to create a child behavior that attaches itself to a sprite
>and then de-attaches itself once it's done its job (over a few seconds).
>




[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