Spawning stuff randomly (Now crashing the Game!)

Thanks Ill try it

@“JR 01” You are so helpful

@“JR 01” It didn’t work it still crashes

Maybe its something else

I… think you may need to remake your spawner…
The system is very complex and hard to follow, you may be looping without realizing.

Your extracting the player’s location for everything which can also slow the game down,
You shouldn’t need an extractor for the x spawns for it could just be anywhere across the screen
The power-up’s also shouldn’t need any positions from the player then from where the spawner says it should go, just move right until it’s not on a spike.

your making a new number in random several times when you spawn something, which could spawn several things at once.
When you die the timers are reset without a new number so they don’t spawn in the next game.
Also, try to make the spawner independent without the messages from the power-ups.

Thats a lot Ill try it

@“JR 01” Can you send a picture I am really really lost

Ok, I completely remade your spawner and made a few changes in the power-ups.
If you have any questions of what I did, just ask.

-Random1 is to 1-4
-Random2 is to 1-3
-Random3 is to 1-17
-Expression1 is a = input, b = 32 and are multiplied
-Expression2 is a = player Y, b = 256 (8*32) and are subtracted
-Most timers are set to 1 with a repeat of 1
-The 4 timers in the middle are your different times (I set to 20, 30, 40, 50 but use what you prefer)
-3 timers at the top right are set to 2 with a repeat of 1
-The mailbox resets all timers upon death (I couldn’t get it to work, try to use the right messages)

Spawner:
h1

-In the power-up’s, I changed the spike proximity to 15 and turned off “only repeat once”
-The mailbox deletes all objects upon death (I couldn’t get it to work, try to use the right messages)

Power-ups:
h2

The game doesn’t crash anymore, but it does lag sometimes. You may be able to fix this in the power-ups if you find a better way to move them off of spikes. But overall, the game works with power-ups now.

-Also change the brains collision from any to player, the power-ups were giving me free points
-Also don’t make the power-ups solid, but enable collision AND make the collision for Rise enemy 2 collision from any to spikes so it can go back and forth over the power-ups. Same with Rise enemy 3

@“JR 01” Im on mobile so I cant do it right now but thank you so much!!!

@“JR 01” do you think if I add more power ups it will lag more?

@“JR 01” how long are the timers that spawn the power ups.
Nevermind i saw it

@“JR 01” what is the number for the filter on the power ups?

I’m sure the lag is from the power-up moving itself off the spikes, it should be the same if you add more power-ups

The filters in power-ups is 17, too make sure it doesn’t move itself off screen

@“JR 01” I did all of it and it worked fine until I came back and boom all of the spawner coding was gone!

Dang, it didn’t save when you tried it? Were you logged in and press play?

Ok, here is a solution just in case this happens again;
Make it again but after you finish, highlight all of it and press copy.
Open notepad and paste it in there, this way you can import it if it deletes again.

Try to do a few things and refresh the page after pressing play.
If it still won’t save anything, then we may need to contact grazer.

I just tried my game and everything saves, so I don’t think it was like last time and shouldn’t affect everyone. This could be a 1 time error on your computer.

@“JR 01” Yeah It was probably just a one time thing

@“JR 01” I just finished them and they work pretty good, thanks for all the help!

No problem @“Johnny boy”, it’s good to get a game working as it was intended to.
Sorry for completely redoing your work in the spawner, no hard feelings.
If I find a way to get rid of the lag, I’ll let you know.

Thank you