hi im making a 2d platform zombie survival game, ive finnished all of the basics so now its time to add in the enamy. there is going to be ten seperate rounds with different types of zombies, for each round i want to have a certain number of zombies, but rather than making many seperate sprites can i just run the whole round's enamies off of the one script???... does that make sense?
Offline
It does make sense, the project in my signature have sort of what you need, altough the second or third games in the series would be a better example. Download -2 or -3 and look at those scripts. That will work!
Offline
I can see why you would want to make it so that each round one script, but I don't think it's possible with Scratch. you'd probably be better off making seperate sprites for each zombie, duplicate the scripts and modify it so that the zombies appear on certain levels.
Mabye you could have the same zombie respawn in the same round. If you make them seperate sprites you can make them spawn mrore randomly. Well that's my input, let me know how your game turns out, I'm a huge fan of zombie games (cod zombies)
Offline
RenCamposYo wrote:
I can see why you would want to make it so that each round one script, but I don't think it's possible with Scratch. you'd probably be better off making seperate sprites for each zombie, duplicate the scripts and modify it so that the zombies appear on certain levels.
Mabye you could have the same zombie respawn in the same round. If you make them seperate sprites you can make them spawn mrore randomly. Well that's my input, let me know how your game turns out, I'm a huge fan of zombie games (cod zombies)
It's possible, but it's easier to make lots of sprites.
When making it, remember that online or in Presentation Mode, the screen only refreshes at the end of loops, or during waits in loops. Stamping is then used to create multiple sprites. See this project for an example.
Offline
when i receve [move] clear make list [x v] make list [y v] add (x of zombie 1) to [x v] and (y of zombie 1) to [y v] add (x of zombie 2) to [x v] and (y of zombie 2) to [y v] add (x of zombie 3) to [x v] and (y of zombie 3) to [y v] … set [i v] to (0) repeat (# o zombies) change I by (1) if <(i) > (# o zombies)> set [i v] to (1) end go to (item (i) of [x v]), (item (i) of [y v]) stamp replace item (i) of [x v] with (x position) replace item (i) of [y v] with (y position) endsee this as an example
say [[url=http://scratch.mit.edu/projects/eRKSToCK/1777260]this[/url]]
Last edited by PencilFactory (2012-06-13 09:39:22)
Offline
PencilFactory wrote:
when i receive [move v] clear add (x of zombie 1) to [x v] add (y of zombie 1) to [y v] add (x of zombie 2) to [x v] add (y of zombie 2) to [y v] add (x of zombie 3) to [x v] add (y of zombie 3) to [y v] … set [i v] to [0] repeat (# o zombies) change [i v] by (1) if <(i) > (# o zombies)> set [i v] to [1] end go to x: (item (i) of [x v]) y: (item (i) of [y v]) stamp replace item (i) of [x v] with (x position) replace item (i) of [y v] with (y position) end
Fixed [your v] (scripts)
Last edited by SciTecCf (2012-06-13 09:43:04)
Offline
Thanks so much, great help
Offline