Pages: 1
Topic closed
i am trying to make a basic operating system and would like to know how i can make a sprite appear when another sprite is clicked on. one way i figured out is to make a variable and then when a sprite is clicked on it puts the variable to (for eg) 1. when the variable is at one it triggers another sprite to appear. if you understand this or would like more info please comment.
if you know another way i can do this please tell
Offline
<when[ clickdetectorsprite ]clicked>
<broadcast[ please appear other sprite ]
Offline
storm-is-coming wrote:
i am trying to make a basic operating system and would like to know how i can make a sprite appear when another sprite is clicked on. one way i figured out is to make a variable and then when a sprite is clicked on it puts the variable to (for eg) 1. when the variable is at one it triggers another sprite to appear. if you understand this or would like more info please comment.
if you know another way i can do this please tell
Another method is to use broadcast messages. Broadcast messages are designed to do just what you are describing...let one sprite communicate with one or more other sprites.
On the first sprite
[blocks]
<when[ First Sprite ]clicked>
<broadcast[ Make Second Sprite Appear
[/blocks]
On the second sprite
[blocks]
<when green flag clicked>
<hide>
<when I receive[ Make Second Sprite Appear
<show>
[/blocks]
You make up the broadcast message names to whatever you like that makes sense.
Offline
Topic closed
Pages: 1