I'd like to note that I've found a genuine use case in which something like what I described here is necessary and probably not even skell's suggestion will work:
-Entity type A is supposed to generate entities of type B in the midst of its scripting and tell each such entity it generates some information.
-The "
obvious"
way to do this is to set some global variables and have entity type B read those global variables in as its local variables.
-But wait, there are TWO of entity type A in the room. Due to how move order works, if entity 1A (which moves first) generates entity 1B and sets the global variable to x, then entity 2A always moves before 1B does, and then entity 2A will OVERWRITE the global variable with the value y in the middle of trying to generate an entity 2B, so now 1B and 2B both read "
y"
as their Important Local Variable, which for 1B is the
wrong value.
(I didn't imagine this issue up so much as ram my head straight into it while trying to figure out how to implement a custom element idea I had.)
Also, a perhaps better suggestion for how to implement this idea:
Make it so that, in addition to the "
Generate Entity"
command, there is a "
Generate Entity with Local Variables"
command which in its parameters has a pairing of every existing local variable (.Varname) with a place to put what you want to assign that variable to in the newly-made entity. If you don't put anything in the box next to a certain variable then it remains set at the default of 0 for the generated entity.
Or possibly it just has a big textbox where the scripter can type things like "
.var1name = value1, .var2name = value2"
, etc. and which errors in the same way that setting a variable wrong does for any incorrect input.
____________________________
109th Skywatcher
Here are some links to Things!
Click here to view the secret text
[Last edited by Xindaris at 11-16-2016 04:51 AM]