Object being Deleted as a Condition

Instead of using Timer or Variable, can we have Objects being Deleted as a condition to activate a new event?

This would save time for when one tries to make an action RPG with mob loot.

1 Like

and what is preventing you to do your on delete actions as a subevent of your delete action?

the problem with your request is, that this would force the game to keep a deleted object in memory, which is crazy nonsense.
Maybe it could be done, if the deleted object stays in memory only for the duration of that frame, but it really serves no purpose.
if you really somehow cannot use your delete action to do after delete actions (which you surly can) you always can use a variable and set it to the deleted object and then use the variable as condition for your after delete actions.

Yeah, my suggestion is for the deleted object to stay in memory only for a short duration so we can use its position to spawn another event on top.

I can use delete actions as condition for my loot-box spawning but then how do I position the spawn?

Back to my action rpg example, after hitting a monster, the monster gets knocked back and then die. Without Delete as a condition, how do I make the system to recognize the position of the monster about to be deleted?

by creating your loot before you delete the object. you can hide it, if you dont want it to be visible frame1, or tween the size of the loot from 0 to 1 over half a second or so.

create loot → delete enemy
if enemy deleted → create loot
is a 1 frame window difference, pretty much no one will notice, or even no frame difference, depending on your event order.

here a practical example:

1 Like

You can make a custom behavior and use a lifetime function to execute events on object deletion.

That worked. Thanks.