Open jetrotal opened 1 month ago
This command looks pretty straight forward and simple to review.
The only optimisation I see is that it shouldn't fetch and retranslate the map again when the map ID is the same as the active map. Maybe also consider "map 0" as the current map? (otherwise you need an additional event call to grab the ID).
And maybe a small test game would be good that spawns an event in two ways:
Because I have to add the Web Player Async stuff, so I have directly something for testing...
Ok, later tonight I'll poke around to fit map0 and mapItself cases. Would be useful to also have a "destroy Event" command.
This delete event should be a separate command.
It is also much harder than spawn because the semantics are unclear: what is supposed to happen with the interpreter execution (e.g. when having a parallel process running) of the deleted event when:
This must be will defined.
For spawn this is obvious: refresh everything, done. Delete has multiple ways to do it.
Project for testing, both from map itself and outside map:
Command that clones Events from any map inside the current map.
The syntax always comes in pairs. The first parameter of each pair indicates whether you are using a direct value or a variable/indirect variable, through ValueOrVariable().
Syntax (TPC):