Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Enemy respawn script
- RageGameZain
-
2 posts
Enemy respawn script
I would like to make enemies that keep spawning and following till I die in my game. What script should I use?
- P444
-
500+ posts
Enemy respawn script
you shcould use
create clone of [myself v]but if you have too much clones, you'd lag
- MMHMMH
-
100+ posts
Enemy respawn script
This should work. This script won't make the clones re-spawn, but it will continuously make clones and once the clones are hit, they will die:
when green flag clickedThere is a limit of 301 clones (if there are 301 clones and it attempts to create another, it won't).
forever
wait (1) secs
create clone of [myself v]
end
when I start as a clone
go to x: [wherever you want] y: [wherever you want]
forever
point towards [player v]
move [however fast you want] steps
if <touching [player bullet v] ?> then
delete this clone
end
end
Last edited by MMHMMH (Feb. 15, 2015 02:17:53)
- Ben02045
-
40 posts
Enemy respawn script
Is the 301 limit for all clones in the project or for just one sprite? This should work. This script won't make the clones re-spawn, but it will continuously make clones and once the clones are hit, they will die:when green flag clickedThere is a limit of 301 clones (if there are 301 clones and it attempts to create another, it won't).
forever
wait (1) secs
create clone of [myself v]
end
when I start as a clone
go to x: [wherever you want] y: [wherever you want]
forever
point towards [player v]
move [however fast you want] steps
if <touching [player bullet v] ?> then
delete this clone
end
end
- RageGameZain
-
2 posts
Enemy respawn script
Thank you!!!! This should work. This script won't make the clones re-spawn, but it will continuously make clones and once the clones are hit, they will die:when green flag clickedThere is a limit of 301 clones (if there are 301 clones and it attempts to create another, it won't).
forever
wait (1) secs
create clone of [myself v]
end
when I start as a clone
go to x: [wherever you want] y: [wherever you want]
forever
point towards [player v]
move [however fast you want] steps
if <touching [player bullet v] ?> then
delete this clone
end
end
- MMHMMH
-
100+ posts
Enemy respawn script
All the clones in the project.Is the 301 limit for all clones in the project or for just one sprite? This should work. This script won't make the clones re-spawn, but it will continuously make clones and once the clones are hit, they will die:when green flag clickedThere is a limit of 301 clones (if there are 301 clones and it attempts to create another, it won't).
forever
wait (1) secs
create clone of [myself v]
end
when I start as a clone
go to x: [wherever you want] y: [wherever you want]
forever
point towards [player v]
move [however fast you want] steps
if <touching [player bullet v] ?> then
delete this clone
end
end
- deck26
-
1000+ posts
Enemy respawn script
What you're both doing is considered spamming and is reportable. Please respect the forum. potato chicken burgers
- -ShadowOfTheFuture-
-
1000+ posts
Enemy respawn script
potato chicken burgers
Also, please don't necropost or post offtopic. This thread is from 2015.
- Discussion Forums
- » Help with Scripts
-
» Enemy respawn script