RMRK is retiring.
Server is paid up for the rest of 2026, but the forum may go after that. See here for more information. Please archive or save anything you would like to keep before 2027.
Main Menu
  • Welcome to The RPG Maker Resource Kit.

Teleport issue...

Started by King Legacy, April 13, 2006, 01:24:41 PM

0 Members and 1 Guest are viewing this topic.

King Legacy

Hey guys. I just downloaded the incredible World Map tileset... I'm far away from finished with the world map, but I want to try it out...

Let's say that whenever I press the A buttom I will teleport to the location on the world map corresponding to my position in the "normal" map. This is not a problem, but the teleporting back to the "normal" map is... How do I teleport the player back to the position he originally was in before looking at the world map?

I took a look at the "Transfer Player" in the Events window, and there is a option called "Appoint with variables" where I can get the Map ID, Player X pos and Y pos...

I guess I need a Common Event (parallel) that stores this info all the time, so that I teleport to the right pos on the map... But I don't know how to store it... Please help.

KL

King Legacy

#1
I got the teleport back and forth figured out, now there's another problem... When I teleport back from the world map to the "normal" map, it's still the World Map tileset. ...hmmm, and that... doesn't look good... :-)


Here's the Common Event for storing the players position on the "normal" map:

Trigger: Parallel | Condition Switch: 001: Player Pos

@>Control Variables: [0005: Map ID] = Map ID
@>Control Variables: [0001: MapX] = Player's Map X
@>Control Variables: [0002: MapY] = Player's Map Y


Here's the parallel process event on the map to recognize a button being pressed

@>Conditional Branch: The R button is being pressed
@>Control Variables: [0046: Map ID] = Variable [0005: Map ID]
@>Control Variables: [0047: Map X] = Variable [0001: MapX]
@>Control Variables: [0048: Map Y] = Variable [0002: MapY]
@>Set Move Route: Player
    :           : $>Change opacity: 0
@>Transfer Player:[002: Worldmap], (013, 002)
:  Else
@>
:  Branch End
@>


Here's the button being pressed recognition on the World Map: Parallel process....

@>Conditional Branch: The L button is being pressed
  @>Set Move Route: Player
:                 :$>Change opacity: 255
  @>Transfer Player:Variable[0046][0047][0048]
  @>
:   Else
  @>
:   Branch End
@>


King Legacy

I debugged a little and I noticed a strange thing...

When I used this teleport method:
@>Transfer Player:Variable[0046][0047][0048]

The Map ID is still 2, should be 1. I used the debugsystem BEFORE I teleported to the world map and Map ID was 1. Teleported to the world map, Map ID = 2, teleported back, Map ID = 2 (should be 1 one here)  and the strangest thing is that it shows the "normal" map but with the World Map tileset. Is this a bug?