OOPS!
Honest officer, that was an accident...
That trigger finger of mine clicke on "send" just a little bit too early
(like, before I actually WROTE anything...)


> I have 2 behaviors attached to the same sprite. In one bhv resides
> the handler getSomeData.
>
> Now I would like to execute getSomeData from within the other script,
> but without using sendSprite and absolutely no globals.
>
> What to do? (I *can* use sendSprite, but maybe there's some less
> cumbersome way?)
>
> The meaning of this is to make the sprite act as a placeholder for a
> lot of small behavior scripts that communicate with each other.
>


Right, I was going to say, that personally I'd be inclined  to use

Data = sendSprite(spriteNum, #getSomeData)

But if you really don't want to do that, you might consider using #Call with
the script instanceList of the sprite.

if i is the number of the called behaviour in the scriptInstanceList, then
the syntax would probably be:

Data = call(#getSomeData, theScriptInstanceList[i], args...)

or you could even use the whole scriptInstanceList -

Data = Call (#getSomeData, theScirptInstanceList, args...)

But it's just as long as sendSprite, so I don't see much difference.

Hope this sparks some ideas.



Karina Steffens,
Multimedia Designer/Programmer

Martello Media Ltd.
4 Islington Avenue
Sandycove
Co. Dublin

Tel: +353 1 2844668
Fax: +353 1 2803195
http://www.martellomm.ie




[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