Teleport to Same Location On Different Map

Status
Not open for further replies.

Grinn

The Game Dev Wonder
Veteran
Joined
May 5, 2012
Messages
66
Reaction score
17
First Language
English
Primarily Uses
Ok so I wanted to try something fun.

Provided that I had 2 duplicates of the same exact map with different names, how would I set a button press to have them teleport from map 1 to map 2 at the same X & Y coordinates?

I know I am going to have to set the player's X & Y location as variables but the key press and exact translation is giving me issues.
 

whitesphere

Veteran
Veteran
Joined
Mar 14, 2014
Messages
1,688
Reaction score
784
First Language
English
You can have Teleport send you to a location defined by Variable.  This would be X, Y and Map ID.

So, if you set X and Y positions, then you set the Map ID from each map when needed, you can teleport from one map to the other, with the same X and Y coordinates.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,355
Reaction score
7,668
First Language
German
Primarily Uses
RMMV
To check the background for key presses, you need a parallel process event - best one of the common events, not map events, if you want to use it on more than one or two maps.


Inside the event, you not only need to check for key pressed but also include waits to prevent lag (without waits, the key is checked sixty times per second - use wait(5) or wait(10) to reduce that to twelve or six times).


Another problem is that you need to make a delay after a transfer, otherwise the player would be transferred back befor he can release the button. So you'll need two common event - one that handles the teleport and then switches to the other event that blocks the teleport for a second or so...
 

Grinn

The Game Dev Wonder
Veteran
Joined
May 5, 2012
Messages
66
Reaction score
17
First Language
English
Primarily Uses
Thanks for all the help guys.

So I have the on-map event that defines the X, Y, and Map ID variables and the on button press common event (with delay and an accompanying map event that turns it on).

As it stands it obviously just transfers me to my CURRENT Map ID. How would I make it teleport the player to "Map ID + 1" (or at least the map ID of the second map). Would I just define it as a constant?

Dash1.png

Dash2.png

Dash3.png
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
You set the map id variable to a number, not to the current map's id. It's the id of the map you want to go to.


Also add an Erase Event at the end of your map event. You only need to set the variables once, not 60 times a second for the entire time you're on the map.
 

Grinn

The Game Dev Wonder
Veteran
Joined
May 5, 2012
Messages
66
Reaction score
17
First Language
English
Primarily Uses
Thanks! I'll try that when I get home!
 

Grinn

The Game Dev Wonder
Veteran
Joined
May 5, 2012
Messages
66
Reaction score
17
First Language
English
Primarily Uses
Sweet I was able to get that to work!

Awesome! New mechanic ho!
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Grinn, please avoid double posting, as it is against the forum rules. You can review our forum rules here. Thank you.
 
Joined
Aug 6, 2016
Messages
4
Reaction score
0
First Language
English
Primarily Uses
How can i do the same but with an event in rpgmaker XP? I want a thing that teleports you to the same ID on a different map when you wait or press the event
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,355
Reaction score
7,668
First Language
German
Primarily Uses
RMMV
in exactly the same way - if I remember correctly there is no difference between those event commands between XP and Ace
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,355
Reaction score
7,668
First Language
German
Primarily Uses
RMMV
when i activate the switch it stops working
Then you made a mistake in your events.


Please make a new topic with screenshots of your events in the XP support area, and we can help you there to find your mistake.


closing this as original problem was solved long ago
 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,853
Messages
1,016,986
Members
137,561
Latest member
visploo100
Top