Others have already pointed out the need for the "me" variable. But
I'll add something else. If you have a behavior where to want to
send something to the same sprite number, instead of hard coding the
sprite number, use the built in "spriteNum" variable. For example,
instead of:
sendSprite(3, #checkRight, 15)
use
sendSprite(spriteNum, #checkRight, 15)
And be sure to declare "property spriteNum" as the top of the script.
This makes the behavior much more general. You could use it in any
channel, and it will continue to work if you move your sprite from
channel 3 to some other channel.
Irv
At 1:48 PM +0200 6/22/01, Michael Nadel wrote:
>Whenever I pass a command from one behavior to another with a variable, the
>variable turns up all messed up! For example, when I write in a behavior on
>sprite 3:
>
>sendSprite(3, #checkRight, 15)
>
>And then on another behavior on sprite 3 I write:
>
>on checkRight whatNumber
> put whatNumber
>end
>
--
Lingo / Director / Shockwave development for all occasions.
(Home-made Lingo cooked up fresh every day just for you.)
[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!]