Can someone hlp me make a random zombie generator for my game?

first things first, here is my game. i cant make zombies randomly spawn. if someone could send me a screenshot (full) of the code, that would hlp alot.


Once into timer (set how often you want them to spawn) repeat forever. Out of timer into 2 random blocks. Set the random numbers for the range of x/y position (grid or pixels). Out of each random into the x/y of a spawn block. Have the time trigger the spawn function so that it will generate a random x/y variable each time it spawns. (Sorrry Im on my phone and cant look at your game or screen shot my code, but I have a similar function in Zombie Beach Party that you can see on the Games page)

This is actually a good start of a game @AgamemnonEX ! Other than the spawn thing, you should just try putting in a menu, and maybe make this an infinite game where barriers spawn as well. Other than that, nice work!

In spawner;
the repeater for the timers are backwards

adding onto todorrobot’s: for the pixel positions on the grid, you take the X and times it by 32, same for Y
for example: 2/2 both X and Y are 2, so times 2 by 32 and you have the numbers for placement.

And a little trick Ive learned that if you want your sprite to land in the center of the grid you have to add 16 to your number. In magmas example a spawn of 64/64 will put your sprites center on the top left corner of the grid square. Spawning it at 80/80 would center it on the grid.

I didn’t even know that, thats pretty cool

thx alot. i would like a screenshot maybe if u could

The spawner you made works, it’s just the timer repeaters are backwards.