In Game Maker and in ENIGMA, other is a keyword
representing another instance involved in a block of code. This varies
by context:
with() statement, the scope iswith (object1) {newscope}, other will be an instance of object0 insidewith(), referring to the calling instance.ENIGMA stores the current scope's calling instance in
enigma::instance_event_iterator. Alongside that, it keeps a stack of
struct iterator_level, which always contains a pointer to
instance_event_iterator at its bottom. Finally, it stores
enigma::instance_other to directly represent the most recently lost
scope.
This stack is most easily manipulated by instantiating struct
enigma::with_iter. In fact, that structure operates with()
entirely:
#define with(x) for (enigma::with_iter ENIGMA_WITHITER(enigma::fetch_inst_iter_by_int(x),enigma::instance_event_iterator->inst); \
enigma::instance_event_iterator; enigma::instance_event_iterator = enigma::instance_event_iterator->next)
Upon instantiation, with_iter pushes the iterator_level stack with
the variables mentioned above. Upon deconstruction, it pops the stack,
restoring both variables to their original state.