Same Coordinate Transportation

Nyxx

Villager
Member
Joined
Nov 12, 2016
Messages
10
Reaction score
2
First Language
English
Primarily Uses
So, I am trying to make a mechanic where if the player presses a button or triggers an event, he is able to see a more darker version of the world for a period of time. Sort of like the game "Fran Bow". So, for example, if the player presses "X", he gets transported to a different world but in that exact place that he was in the other world. So if the player presses X at (23, 57) he gets transferred to the other map to (23,57). Does anybody know of a current plugin that does this? Or is this already an in-game mechanic that I just can't seem to find? Thanks, and all help is much appreciated!
 

MushroomCake28

KAMO Studio
Moderator
Joined
Nov 18, 2015
Messages
2,013
Reaction score
3,442
First Language
English
Primarily Uses
RMMV
Not sure I get what you want, but basically you want the player to move to another map to the same coordinate when he presses X?
If so, you can do that with events alone:

1) Insert a parallel process event with a conditional branch.
2) Set the condition to script and enter this: Input.isTriggered("cancel")
3) Inside the conditional branch (which just checks if the player presses X), add a script command and copy/paste this:
Code:
$gameVariables.setValue(10, $gamePlayer.x);
$gameVariables.setValue(11, $gamePlayer.y);
** The previous code sets the player current x to the variable 10 and y to the variable 11. If you want to change the variable number, just change it inside the script command.

4) Set the id of the map you want the player to be transfered to in a variable.
5) Add a transfer player command and set its parameters with the variables that were used previously.
6) Test and Done!
 

Nyxx

Villager
Member
Joined
Nov 12, 2016
Messages
10
Reaction score
2
First Language
English
Primarily Uses
Thank you so much! I will test this out real quick!
 

Nyxx

Villager
Member
Joined
Nov 12, 2016
Messages
10
Reaction score
2
First Language
English
Primarily Uses
So, when I press X, the transfer occurs, but I end up just in a black space... Anything I could possible be doing wrong here?
 

MushroomCake28

KAMO Studio
Moderator
Joined
Nov 18, 2015
Messages
2,013
Reaction score
3,442
First Language
English
Primarily Uses
RMMV
Check the id of the map you're getting transfer to, or if the x and y position is within the limit of the map.
 

Nyxx

Villager
Member
Joined
Nov 12, 2016
Messages
10
Reaction score
2
First Language
English
Primarily Uses
Check the id of the map you're getting transfer to, or if the x and y position is within the limit of the map.
I have checked both of those and they are both valid IDs, and the correct ones as well...
 

MushroomCake28

KAMO Studio
Moderator
Joined
Nov 18, 2015
Messages
2,013
Reaction score
3,442
First Language
English
Primarily Uses
RMMV
Can you move your character on the new map? Can you open the menu (if so check the tint of the screen)? Double check you variables' value (maybe add a message telling you the variables' value before transfering the player in the event).
 

Nyxx

Villager
Member
Joined
Nov 12, 2016
Messages
10
Reaction score
2
First Language
English
Primarily Uses
Okay, so I can move the player around, and there is no tint in the pause menu. Here are a couple screenshots though:




The first one is the event, the second one is the map i'm trying to teleport to. (The "X Coordinate" and "Y Coordinate" are variables 1 & 2, I just renamed them for simplicity)
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,349
Reaction score
11,940
First Language
English
Primarily Uses
RMMV
What is variable 3 set to?

You don't need to use a script call or plugins to do this. Use Control Variables > Game Data to get the current map id (Other) and the player's coordinates (Character). Then use the current map id in the variable to determine what map the player SHOULD teleport to. When the player releases the button, teleport back to the same location using the same variables - make sure nothing changes them in the meantime.

Also, you've used variables 1, 2 and 3. Be aware that any plugins that use variables will likely have one or more of those as a default, so if you add any plugins you're going to have to make sure they don't use those variables. I suggest you name variable 3 so you also don't use it for something else accidentally.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Brother made thumbnails for my Lets Plays. He's a swood dude.
Since I'm getting so busy (the fact that I'm often here is due to the fact that this is my procrastination #1 destination), I'm trying a new system where everyday I dedicate 30 minutes to my personal game project. That way it won't fall into the abyss.
In today's seminar:
Presenter: In the past, there was a saying, "One who has tuberculosis is doomed for life." But now-
Everyone: *starts coughing in unision*
Gosh... Today seems too much like a good day to do nothing....

I need to keep myself focused...! :kaoback:

Forum statistics

Threads
93,699
Messages
914,739
Members
123,298
Latest member
Bibopp
Top