Supported In:
? ? ?

The scripting command CallEvent has the opcode (0x19).



Calls the event at the specified location (X,Y), with the specified facing value. This event is executed as if it were part of the current event, after which execution resumes at the line following this command in the original event.

This is used, for example, when an identical set of actions is performed many times. If you have ten poison-spraying vents that each deal 100 poison damage to the party, you can create a dummy event at (40,40), and then have each of the ten vent events just call this dummy event to actually deal their damage when the party enters the square. If you later wish to change the amount of damage dealt, all you have to do is change the code at the called event at (40,40).


Hopefully any new IDE developed will support a more object-oriented way of scripting events, rendering this "gosub" equivalent command obsolete.