RMMZ Map teleport /Map Id [2]

Luckysince97

Veteran
Veteran
Joined
Feb 6, 2018
Messages
101
Reaction score
26
First Language
French
Primarily Uses
RMMZ
ok i would like to create a event where the player is port from map [id:1] to map [id:2] and then take [map id:2 x, y] and port back to map [id:1] but without losing ( x, y ) of map [id 2], my problem is that there is only one Data Map Id so there is no way to keep 2 position : point of teleport a and point of teleport b, if there is a way to add data map id, i would appreciate
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
1,938
Reaction score
1,386
First Language
EN
Primarily Uses
RMMZ
You can store the coordinates with Control Variables > Game Data > Character > Player > Map X/Y:
Code:
◆Control Variables:#0010 x = Map X of Player
◆Control Variables:#0011 y = Map Y of Player
◆Transfer Player:MAP001 (10,5)
You could then use Transfer Player > with variables to transfer back to that position later, e.g.
Code:
◆Control Variables:#0012 map = 2
◆Transfer Player:{map} ({x},{y})
Note that you need a third variable here, even though the map ID is fixed.
 

Luckysince97

Veteran
Veteran
Joined
Feb 6, 2018
Messages
101
Reaction score
26
First Language
French
Primarily Uses
RMMZ
@caethyril well i do understand what you are explaining but my problem it not about understanding how to teleport

my problem is i need to store in variable 2 map id... so that when i port from the menu and not a event on the map it retain my position on the map and where i was on the second map

( it for a skill tree , i want the player to be back to his last node pop! like ff x if you like) but when i do as i think it only remember map data from my original point which is always 1 cause there is no map data 2

for sure i could make a turn around and only retain the skill tree "xyz" and put a evnt where the guy say hey u want to beef up your muscle! but it would be more pratical from the menu as a skill then on the map

or i do as i explain and tranform my game into a trolling gamewhere the protagonist is always running around to customize is toon, or i guess

and that the last option i wait they bring back luna engine and i customize my hp gain and all!

but a ty for the rply always appreciated
 
Last edited:

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
1,938
Reaction score
1,386
First Language
EN
Primarily Uses
RMMZ
Sounds like you'd need:
  • 3 variables for "game world" position: map, x, y.
  • 2 variables per actor for "skill tree" positions: x, y.
  • 1 variable for the skill tree map ID (constant, right?).
  • 1 variable to store the ID of the last-selected actor on the skill tree map.
Then maybe something like this:
  • On game start, set starting values:
    Code:
    ◆Control Variables:#0013 skill tree actor = 1
    ◆Control Variables:#0014 actor 1 skill tree x = 7
    ◆Control Variables:#0015 actor 1 skill tree y = 9
    ◆Control Variables:#0016 actor 2 skill tree x = 20
    ◆Control Variables:#0017 actor 2 skill tree y = 18
    ◆Control Variables:#0018 skill tree map ID = 2
  • Common Event - update skill tree positions:
    Code:
    ◆Control Variables:#0014 actor 1 skill tree x = Map X of EV002
    ◆Control Variables:#0015 actor 1 skill tree y = Map Y of EV002
    ◆Control Variables:#0016 actor 2 skill tree x = Map X of EV003
    ◆Control Variables:#0017 actor 2 skill tree y = Map Y of EV003
    ◆Comment:etc
  • Common Event - transfer to skill tree:
    Code:
    ◆If:skill tree actor = 1
      ◆Transfer Player:{skill tree map ID} ({actor 1 skill tree x},{actor 1 skill tree y})
      ◆
    :Else
      ◆If:skill tree actor = 2
        ◆Transfer Player:{skill tree map ID} ({actor 2 skill tree x},{actor 2 skill tree y})
        ◆
      :Else
        ◆Comment:etc
        ◆
      :End
      ◆
    :End
  • When going from "game world" to "skill tree":
    Code:
    ◆Comment:Remember game world position, then transfer
    ◆Control Variables:#0010 player map = Map ID
    ◆Control Variables:#0011 player x = Map X of Player
    ◆Control Variables:#0012 player y = Map Y of Player
    ◆Common Event:transfer to skill tree
  • Next skill tree actor:
    Code:
    ◆Comment:Next ID
    ◆Control Variables:#0013 skill tree actor += 1
    ◆If:skill tree actor > 2
      ◆Comment:Loop back to first actor
      ◆Control Variables:#0013 skill tree actor = 1
      ◆
    :End
    ◆Common Event:update skill tree positions
    ◆Common Event:transfer to skill tree
  • Previous skill tree actor:
    Code:
    ◆Control Variables:#0013 skill tree actor -= 1
    ◆If:skill tree actor < 1
      ◆Control Variables:#0013 skill tree actor = 2
      ◆
    :End
    ◆Common Event:update skill tree positions
    ◆Common Event:transfer to skill tree
  • When returning to the game world from the skill tree:
    Code:
    ◆Common Event:update skill tree positions
    ◆Comment:Return to memorised position in game world
    ◆Transfer Player:{player map} ({player x},{player y})
 

Luckysince97

Veteran
Veteran
Joined
Feb 6, 2018
Messages
101
Reaction score
26
First Language
French
Primarily Uses
RMMZ
when it written down like that it look so much more complex but if i read corectly
◆Control Variables:#0013 skill tree actor = 1
◆Control Variables:#0014 actor 1 skill tree x = 7
◆Control Variables:#0015 actor 1 skill tree y = 9
◆Control Variables:#0016 actor 2 skill tree x = 20
◆Control Variables:#0017 actor 2 skill tree y = 18
◆Control Variables:#0018 skill tree map ID = 2
@caethyril what your variable refer to, common event [id]or a constant pos on the map?problaby a origin...position
This should be on autorun on map id 2 or wmap or doesnt matter or if i understand an questionning my self this actually set every actor origin on map 2 so the question (that i ask my self) is should i write it down as 13=1 14=7 18=2 (but/or) 16=20 17=18 (19=map id3) or 18=3

and 2

if i recap, i transfer player from WMap to Stree then i refer to pageup or page down to select the actor and
use an other common event from there to remember the last player used position, as well as (all actor ) and swicth page and position, so i guess the only thing left is how to force leader ( how to change the field player on the map)...
ill test it out come back to you on that when it done! Ty your help is of most welcome
 
Last edited:

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

Latest Threads

Latest Posts

Latest Profile Posts

I always told my DA fans how much I hate slot machines. They're fine in games as a risk-and-reward system. But when you're spending REAL MONEY in a Vegas casino to try and hit the jackpot (which very, very few people will), it can really hurt your budget. Gambling is a bad habit, and I don't like wasting my money on a slim chance. Go to Vegas for the experience, not the jackpot.
Took the kids to a corn maze. They gave us a map and had lights at certain points in the maze. Not overwhelming... or underwhelming... just... whelming.
Okay, vacuuming fruit flies out of the air is surprisingly effective.
Finally finished my menu redesign after like a month of coding! I hate designing menus... Good news though - I thought of a complete redesign for it now, so yay...
Still no scam calls all day... also I got a quick gig designing a mascot drawing for a small business, so I might actually make some green of my own after all. That would be a perfect job for me, since I love art and digital design.

Forum statistics

Threads
104,388
Messages
1,006,029
Members
135,917
Latest member
kingrifer
Top