A new event type: "Run first match"

Currently, if you need to do something equivalent to “if/else-if/else” in other languages, you either need to do something slightly sub-optimal, such as write a condition for one event then an opposite condition for the next event, or some rather involved hack if the first event modifies the truth of own condition (a situation that comes up surprisingly frequently).

It seems like a new event type “Run first match” would be a useful addition. What it would do would be to run through it’s subevents just like normal, but once one its subevent’s conditions succeeded, all subsequent subevents would be skipped.

This would be effectively similar to “if/else-if/else”. It is conceptually simple, widely applicable, and doesn’t seem (from the outside) like it’d be terribly hard to implement.

1 Like