Save Event Position
2015.11.12
by Shaz
Introduction
This plugin lets you set a position and direction where an event will be the next time the map is loaded
How to use
Add to your plugins folder (file name is irrelevant, but I use SaveEventPosition.js). There are no parameters to set.
Use any of the following plugin calls to save or forget the current event's position:
SavePos
SavePos x y
SavePos x y dir
ForgetPos
Use any of the following plugin calls to save or forget another event's position:
SaveOtherPos eventId
SaveOtherPos eventId x y
SaveOtherPos eventId x y dir
SaveOtherPos mapId eventId x y dir
ForgetOtherPos eventId
ForgetOtherPos mapId eventId
Use any of the following script calls inside a move route to save or forget the target's position (applies to events only):
this.savePos();
this.savePos(x, y);
this.savePos(x, y, dir);
this.forgetPos();
mapId, eventId, x, y and dir can be values or formulae to be evaluated. If using a formula in a plugin call, ensure it has no spaces.
Plugin
Download from pastebin
Credit
- Shaz
Terms
- free for use in commercial games
Notes
- This plugin does not MOVE an event to the specified position on the current map. It simply records the 'starting' position for next time the map is loaded. If you want an event to move to a certain position and then stay there on subsequent map loads, you need to move it there first, with a Set Move Route or a Set Event Location command or similar, and then add the plugin call to save the location.
2015.11.12
by Shaz
Introduction
This plugin lets you set a position and direction where an event will be the next time the map is loaded
How to use
Add to your plugins folder (file name is irrelevant, but I use SaveEventPosition.js). There are no parameters to set.
Use any of the following plugin calls to save or forget the current event's position:
SavePos
SavePos x y
SavePos x y dir
ForgetPos
Use any of the following plugin calls to save or forget another event's position:
SaveOtherPos eventId
SaveOtherPos eventId x y
SaveOtherPos eventId x y dir
SaveOtherPos mapId eventId x y dir
ForgetOtherPos eventId
ForgetOtherPos mapId eventId
Use any of the following script calls inside a move route to save or forget the target's position (applies to events only):
this.savePos();
this.savePos(x, y);
this.savePos(x, y, dir);
this.forgetPos();
mapId, eventId, x, y and dir can be values or formulae to be evaluated. If using a formula in a plugin call, ensure it has no spaces.
Plugin
Download from pastebin
Credit
- Shaz
Terms
- free for use in commercial games
Notes
- This plugin does not MOVE an event to the specified position on the current map. It simply records the 'starting' position for next time the map is loaded. If you want an event to move to a certain position and then stay there on subsequent map loads, you need to move it there first, with a Set Move Route or a Set Event Location command or similar, and then add the plugin call to save the location.
Last edited by a moderator:






