Just to clarify, the “Create object” action is already it’s own “On Creation” condition. Any actions that target an object and are immediately following the “On Creation” event will target that created instance.
It’s not really the same though, sometimes you want to reference the object’s creation separately from the action where it is created in order to keep the code organized, sometimes you may need to reference the object creation in a different external event from where the object was created.
Additionally, that method does not work for objects that are placed on the scene through the editor, and hence are created when the scene is loaded. Since they weren’t created using an action, you can’t reference them on their creation because they are created as soon as the scene loads. So if you have some instances of the same object that are created both on beginning of the scene and spawned mid-way through the game, what happens is that the code can become convoluted real fast. For the same action you would always need 2 conditions, one for the beginning of the scene and the other if you create the object during runtime. But because you have no condition for On Creation, you may need to put the same code twice, (or reference a function twice), one after a beginning of the scene condition and one after the creation action. Unnecessary repetition…
But I came up with a solution that seems to be the best for this, just create a boolean for the object called “On Creation” that starts as true, and have an event set it to false in case it’s true. So as soon as the object is created, there’s a little bit there where the boolean is true and you can use that to check that the object was created. Seems like the simplest solution to this that works regardless of when the object is created.
For me it was a simple solution to come up with, but for someone with no experience in coding, making an On Creation condition would be the best way to achieve this. And I think it’s a common and useful enough condition that would make sense to be available on the engine without needing unnecessary workarounds.
Also, an On Creation check is simple enough because you can reference the object since it’s in the scene, but an On Destroyed, would be harder to achieve because you can’t reference the object any longer. You probably would need an array just to track deleted objects, which again feels like it’s over complicating something that could be 1 click away. In this case On Deletion is actually even more important than On Creation in my opinion.
As for the custom behavior, I’m not sure how I would create an on creation method that would work for all objects and all situations. I still need to figure out the custom extentions, haven’t used these yet, although I like the premise. Seems like a pretty powerful feature of this engine.