RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Teleport issue...

0 Members and 1 Guest are viewing this topic.

**
Rep: +0/-0Level 88
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

**
Rep: +0/-0Level 88
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
Code: [Select]
@>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
Code: [Select]
@>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....
Code: [Select]
@>Conditional Branch: The L button is being pressed
  @>Set Move Route: Player
:                 :$>Change opacity: 255
  @>Transfer Player:Variable[0046][0047][0048]
  @>
:   Else
  @>
:   Branch End
@>

« Last Edit: April 13, 2006, 02:14:44 PM by King Legacy »

**
Rep: +0/-0Level 88
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?