(I tried to send this a few minutes ago, and something I posted
subsequently has shown up, so I'm trying again -cw)


Paul Steven wrote:

> Even though it works fine now replacing me.spriteNum with the
> currentSpriteNum, I am still curious as to why it doesn't work with
> me.spriteNum!

Getting back to Paul's original question:

When you drop the behaviours on the sprites on the stage by hand
or assign them in the score, they'll know their own spriteNum and your
script should work.

But if you're assigning them on the fly with Lingo they won't.
You would need to do it with something like:

add(sprite(x).scriptinstanceList, new(script "foo"),x)

And the behaviour'll have to have the property 'spriteNum' declared and set
explicitly in its 'new' handler

property spriteNum

on new me, x
  spriteNum = x
  return me
end


Have I struck close to the problem?

-- 
Carl West    [EMAIL PROTECTED]
617.262.8830 x246    

I have no superfluous leisure; my stay must be
stolen out of other affairs; but I will attend you awhile.

           - Isabella, Measure for Measure, Act 3 Scene 1

[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/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