Welcome Forums General Execution order Reply To: Execution order


I guess we need to have screenplay execution more reliable and be confident that there are some ways to attain this:
What do you think about actors having some sort of prority flag?
If a priority is set, you could execute those actors first and actors with no priority afterwards. Imagine we e. g. have the following actors and our hero touches all of them simultaneously:

  1. The Mayor (none priority)
  2. Invisible Switch (priority 1)
  3. Invisible Actor 1 (priority 2)
  4. Invisible Actor 2 (priority 1)

Our game creator here made a mistake by setting the invisible switch and actor 2 to the same priority. The engine could execute the on-touch-events as the following:

  1. First everything of priority 1 should be executed. Only the execution order of “Invisible Actor 2” and the “Invisible Switch” is unpredictable, because they share the same priority. However, the order of all the other actors is predefined.
  2. The screenplay of “Invisible Actor 1” has to be executed next, because it has a lower priority than the previous two actors.
  3. The Mayor (and all the others with none priority) have to follow.

This should cover all possible definitions for priority. If we had such a system, the engine would be far more predictable regarding screenplay execution.