じ☆ve冰风 发表于 2026-7-29 11:07:14

Save Event Position

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.


本贴来自国际rpgmaker官方论坛作者:Shaz处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/save-event-position.50261/
页: [1]
查看完整版本: Save Event Position