How to delete all objects and stop object creation timer

i have an event set up that will kill the player after its in collision with the player. how can i delete all instances of the enemy “spike” and stop the timer as well? i’d like the enemy to collide with the object and stop entirely, as the continued collision will cause many events to occur at the same time.

To stop the timer you have actions to reset and pause the timer. It should also stop object creation since you are using the timer to create them.

To delete all enemies, if they are instances of different objects, you can add them to a group and reference the name of the group in the Delete object event.
If they are instances of the same object, referencing the object name when calling the Delete object event should work…

1 Like

hi,
they are instances of the same object. they dont seem to be all leaving on collision. i’ll test something and get back to you.

@insertusernamehere In the conditions as well as in actions, there exists a “Pick all objects” condition/action. The conditions/actions following this in the same event will work on all the instances of the chosen object.

2 Likes

@piyushpalawat99 @ddabrahim I actually have the same question. Here’s my code:



This doesn’t seem to stop the spikes. :frowning: how can i get the timer to stop the spikes?

As I mentioned you need to reset and pause the timer at some point, maybe after creating a certain number of spikes:

3 Likes

How to stop object creation when game is pause.
I have a game , when i pause game and after tap play, there are so many object created.
Can i stop this with ur suggestion.