Hello. I am currently working on a simple game as I am new to Scratch. I am unsure of 2 things.
Is there a way to have sprites automatically spawn in different places outside of the stage, and then move to the center of the stage?
Also, I am trying to make it so when you move your little sword that follows the mouse over an enemy, the enemy's costume changes and it stops moving, or something similar. I am currently trying this. (Sprite 1 = Sword, Sprite 2 = Enemy, Sprite 3 = Dead Enemy)
Sprite 1
<when green flag clicked>
<if><touching[Sprite2]>
<switch to costume[ Sprite 3]
(sorry if I have added to blocks wrong, but hopefully you understand.
Offline
YOu might want to make the dead enemy receive something. The first part is correct but the rest, here:
For the sprite 1's script
When green flag clicked
<if touching sprite 2>
broadcast <die!>
For the dead enemy's script:
When green flag clicked,
switch to costume <1>
Costume one above must be the Alive costume of the enemy.
Continued...
When I receive <die>
switch to costume <2>
hide
Costume two will then have to be the costume that shows the enemy died.
Hope this helps, and good luck!
Offline
To make them go to a random location outside the stage, just do this:
Then you can make them move to the center the easy way by making a sprite, putting it at x:0, y:0, and making your enemies point to that and move to it.
Last edited by Kileymeister (2011-03-02 18:40:14)
Offline