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
Global Mod
Joined
Nov 18, 2015
Messages
3,989
Reaction score
4,916
First Language
EN, FR
Primarily Uses
RMMZ
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
Global Mod
Joined
Nov 18, 2015
Messages
3,989
Reaction score
4,916
First Language
EN, FR
Primarily Uses
RMMZ
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
Global Mod
Joined
Nov 18, 2015
Messages
3,989
Reaction score
4,916
First Language
EN, FR
Primarily Uses
RMMZ
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:

be7c9969d3f2544d06dfaeeeae3f30c1.png

40f8564a8405bbf5280ff8d26e1446f5.png


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

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
44,715
Reaction score
15,839
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.
 

Latest Threads

Latest Profile Posts

I haven't touched the forum or my project for months because a few people were being a little aggressive when I asked for help
its_a_random_world.jpg
Well after half a year of health problems (that aren't as bad as before), and playing with UE4 & 5... I realized I should finish this project before working on something else. So I decided to upgrade my randomizer. And really just focus on compromising wherever I can to finish the project sooner rather than later. :kaoswt:
hmmm. an art of mine was removed from reddit, for a reason not even listed.

Forum statistics

Threads
121,890
Messages
1,144,964
Members
160,146
Latest member
Wtfest
Top