This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-05-02 12:28:10

Yagman5000
New Scratcher
Registered: 2012-05-02
Posts: 10

Making sprites "respawn"

I have made a shooting game, and I need the enemies to respawn. I tried doing it, but it didnt work out very well.. I'll give you a screenshot of what I attempted. Any feedback is greatly appreciated  smile

http://gyazo.com/164f94e1fab1b7310b7707be9ebb7e3d
So as you can see I equivalently duplicated the code from the first sprite, but just increased the wait time for "spawning" and put the entire thing in a forever loop. For some reason it's not working.. not sure why. Any ideas would be greatly appreciated.

Thanks in advance,

~Nadim

Offline

 

#2 2012-05-02 12:43:52

zammer990
Scratcher
Registered: 2012-01-22
Posts: 500+

Re: Making sprites "respawn"

you just need this:

when I receive
alive
set health to
10
set speed to
pick random
2
to
4
forever
if
health
> 0
move
speed
steps
if on edge bounce
damagescripts
else
wait
pick random
1
to
3
secs
broadcast
alive


http://i45.tinypic.com/2ynq7nn.jpg Play now!

Offline

 

#3 2012-05-02 18:32:49

AgentRoop
Scratcher
Registered: 2012-02-11
Posts: 1000+

Re: Making sprites "respawn"

zammer990 wrote:

you just need this:

when I receive
alive
set
health
to
10
set
speed
to
pick random
2
to
4
forever
if
health
>
0
move
speed
steps
if on edge, bounce
damagescripts
else
wait
pick random
1
to
3
secs
broadcast
alive

AgentRoop
fixed
your
scripts
a little bit


La La
I wrote an album.

Offline

 

#4 2012-05-02 19:01:46

Firedrake969
Scratcher
Registered: 2011-11-24
Posts: 1000+

Re: Making sprites "respawn"

why> does
AgentRoop
talk
in
Scratchblocks


Click the sign.
https://s3.amazonaws.com/eterna/eterna2/logo2.png

Offline

 

#5 2012-05-03 11:20:54

Yagman5000
New Scratcher
Registered: 2012-05-02
Posts: 10

Re: Making sprites "respawn"

zammer990 wrote:

you just need this:

when I receive
alive
set health to
10
set speed to
pick random
2
to
4
forever
if
health
> 0
move
speed
steps
if on edge bounce
damagescripts
else
wait
pick random
1
to
3
secs
broadcast
alive

alright, thanks for the help. I'll try this out.

Offline

 

#6 2012-05-03 17:43:38

AgentRoop
Scratcher
Registered: 2012-02-11
Posts: 1000+

Re: Making sprites "respawn"

Firedrake969 wrote:

why> does
AgentRoop
talk
in
Scratchblocks

AgentRoop
talks in
Scratchblocks
because
AgentRoop
likes
to


La La
I wrote an album.

Offline

 

Board footer