I am trying to make a 2 player game, and i recently added medkits. but now im trying to get it to spawn in a certain location every 15 secs how do i do this?
when i do play it the medkits always spawn in the top left and lag the game out
Always send a link when you’re trying to get help for a game
It lags out because each medkit spawns another medkit, which is not something you want because you’re just going to get more and more medkits spawning more medkits. The whole spawning system just doesn’t work, I suggest having a separate object spawn the medkits in various spots
how do i do that?
cause i am confused hwo to
Just make another object
With the medkit spawning stuff in it
i know i may sound a bit dumb, but what do you mean by that?
and how do i do it?
yes i ahve done that
now put the medkit spawning behaviors in that object
yep done that what now?
Now it won’t lag because you’re only spawning one at once…
ye but they just spawn up there and i cant seem to move them
and also how would i make a timer thats like, after 20 seconds spawn medkit here
You probably did something else wrong, I can’t even play the game anymore on my end
the default position is set to 0,0
make a position in pixels on where you want it to spawn
(32x32 is one grid block)
Alright. Time to break into my helpful brain sections.
- Make the bullets non-solid, but turn collisions ON
- Make it so that the medkit can be touched by player 1 and 2.
- Make player animations.
- Get rid of all these useless blocks:
They have no code, and they have no looks. Therefore, they are useless. - Change the jump collision to ONLY BOTTOM. This will make it so you can only jump when touching the ground, and not the ceiling or walls.
- You don’t need these extra walls around the edges. You can just use the walls that are already in the game, since the player can’t even see out of the screen.
- Delete this object. Makes your game run smoother.
- Once you’ve deleted all the useless blocks, name EVERYTHING so that you can tell what it is.
That’s all I got now. Good luck.