I’m creating an in-game level editor, allowing level to be made and saved while playing the game. Saving and retrieving the level objects’ details to and from storage works fine. But creating the objects seems a bit cumbersome. Is it possible to create a new object from it’s name that has been stored as a string, rather than by the object type?
So would it possible to store the object type name, and use it in an action recreate it? So something like 'Create object <name stored in variable> at position...'?
Or must an event be made to test the string against each object type, and then in the action 'Create object <object type> at position...' be used?
You can use the “Create an object from its name” action.
Here I’ve set a scene variable to an objects name and used the below action to spawn either object A or object B dependant on the variable spawn on key press.
Spawning objects in this fashion does however require they be grouped together.
So that part works, but how can you reference the newly created object and set the attributes of the newly created object? Like it’s z property or rotation?