Delete object not working as intended

How do I…

Periodically create and delete an object?

What is the expected result

The bush should appear and disappear every 3 seconds.

What is the actual result

More bushes are created faster than deleted, which ends up creating a huge amount of bushes.

Related screenshots


Project files (optional)

https://drive.google.com/file/d/1n3I3B1cXx9rzWvcEgBSa9rk1YpKe1y_a/view?usp=sharing

First, why do you have a timer? Second, there is an extension to repeat something every X amount of seconds.

I’m not sure what you want to do. The events are checking the timer’s elapsed value for 10 million seconds. Without reaching the number and using a restart timer action, it’s adding a wait every frame. After 3 seconds the first wait will expire and add an object followed by all of the other built up waits on the following frames. After the first 3 seconds, it will then start triggering the other wait but the delete action will only delete the just created object because it will be the only one currently picked.

If you just want a set quantity of the object in the scene at a time then you’d be better off moving the leaf instead of adding and deleting it.

This would create 10 randomly placed objects and then move a random one every 3 seconds.

If that’s not what you’re trying to do then we’ll need more information.

1 Like


I completely changed my approach for my shield mechanic (yes it was a bush but this was just an example. Thank you!

1 Like