The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Tutorials and Eventing => Topic started by: even821 on December 17, 2008, 06:45:06 AM

Title: teleportation skill?
Post by: even821 on December 17, 2008, 06:45:06 AM
is there a way to make a teleportation skill?   

like if the player presses a button or somthing he wi get teleported a few tiles forward

i am bad at explaining (and spelling) but i think it is possible to understand me :)
Title: Re: teleportation skill?
Post by: Grafikal on December 17, 2008, 07:43:11 AM
make a common event, track 3 variables. 1 variable for your player's X position and 1 variable for your player's Y position and 1 variable for the MapID. Then alter the X variable and add 2 or 3 to it. Then in the common event, (along with that stuff) make a teleport event command that teleports according to variables of X(+2 or 3), Y, and MapID. Put all of this inside of a conditional branch for IF your player is pressing whatever button, then all this happens. Then set the common event to parallel process and make a global switch to turn the process on and off. I haven't tested it, but I don't know what would happen if you were at the edge of a map and tried to teleport. You might get an error message, but ideally, you would just not teleport.