I was wondering if it was possible to have one sprite do something when another sprite is clicked? If so, how do I do it? If not, thanks anyway for reading this.
Offline
The first sprite's script needs to be
when gf clicked forever if <<touching [mouse pointer v]?> and <mouse down?>> broadcast [broadcast1 v] end endThe second sprite's script needs to be
when I receive [broadcast1 v] do stuff
Last edited by henley (2013-02-27 21:15:05)
Offline
Offline
you could also try
when sprite1 clicked broadcast yourmessageheresecond sprite:
when i receive yourmessageherethen add what you want the second sprite to do.
Offline
topazdragonlord wrote:
you could also try
when sprite1 clicked broadcast yourmessageheresecond sprite:when i receive yourmessageherethen add what you want the second sprite to do.
That's the exact same thing as mine, except you used the hat block instead of the script, which makes things more glitchy.
Offline
topazdragonlord wrote:
you could also try
when [sprite1 v] clicked broadcast [yourmessagehere v]second sprite:when i receive [yourmessagehere v]then add what you want the second sprite to do.
Fixed.
Offline
henley wrote:
topazdragonlord wrote:
you could also try
when sprite1 clicked broadcast yourmessageheresecond sprite:when i receive yourmessageherethen add what you want the second sprite to do.That's the exact same thing as mine, except you used the hat block instead of the script, which makes things more glitchy.
Actually, your script isn't quite the same. If you hold down the mouse and then move it onto the sprite it will register as a "click" which doesn't appear (to me) to be what Waffle27 wanted.
Why do hat blocks make things more glitchy?
Last edited by MoreGamesNow (2013-03-03 21:17:56)
Offline