2015.10.27
by Shaz
Introduction
This plugin allows you to add automatic transfers to the edges of your map.
How to use
Add to your plugins folder (file name does not really matter, but I call mine MapEdgeTransfer.js). There are no parameters to set or plugin commands to call.
In the map notebox, add tags as follows:
<key: mapid x y direction fadetype>
where:
key = tfrup (transfer up at top of map), tfrdown (transfer down at bottom of map), tfrleft (transfer left at left edge of map) or tfrright (transfer right at right edge of map)
mapid = map id to transfer to
x = x coordinate on new map
y = y coordinate on new map
direction = facing direction after transfer (2=down, 4=left, 6=right, 8=up)
fadetype = 0-black (default), 1-white, 2-none
direction is optional (if omitted, current direction will be retained)
fadetype is optional (if omitted, will default to black); if entered, direction must also be entered
mapid, x, y, direction and fadetype can be values or formulae (don't use any spaces).
Example:
<tfrup: 8 this.x 12> - when character reaches top edge of current map, they will transfer to map 8, x coordinate will be the same, and y coordinate will be 12. Current direction is retained, and fade type 0 (black) is used.
Note - in order to transfer at the map edge, the player has to be ON the map edge and facing the edge. This means when you transfer, you can transfer them TO the edge tile of the new map, facing inwards, and they won't automatically transfer back again. They can walk along the edge without transferring. It's only when they turn to face the edge again that it will trigger.
Plugin
Download from pastebin
Credit
- Shaz
Terms
- free for use in commercial games
Revisions
Spoiler
2015.10.30 - Fixed issue with player being temporarily invisible after transfer