Random Encounter + Player Transfer

Discussion in 'RPG Maker MV' started by LinkDrako, Aug 20, 2019.

  1. LinkDrako

    LinkDrako Villager Member

    Messages:
    8
    Likes Received:
    0
    First Language:
    English
    Primarily Uses:
    RMMV
    So, what I want to do is create a variable that stores the players position constantly per movement, and when the player hits an encounter (which I would also like to store a random percentage roll variable to draw the encounter based on region) I want it to randomly transfer that player to one of several different maps. I am using on screen enemies within battle maps. Is there even a way to do these things?

    I have scoured and searched and tried for days on my own, but I have become insanely frustrated. So I made this account and hoped this community might be my ticket out of this creative block Im stuck in....

    P.S.
    I really hope I understood things properly and put this in the right area....
     
    #1
  2. ShadowDragon

    ShadowDragon Veteran Veteran

    Messages:
    692
    Likes Received:
    203
    Location:
    Netherlands
    First Language:
    Dutch
    Primarily Uses:
    RMMV
    store the player location inside a variable is relative easy,
    but I dont understand the transfer part on region what you want to do with it.

    it can be done though, but can you explain exacly what you need the region transfer for?
    is it for a puzzle part, does it randomly put it somewhere else on the map?

    The more detail you can give on those part and the percentage in a variable, the better steps you can get
    to achieve your goal and better the answer you seek for.
     
    #2
  3. LinkDrako

    LinkDrako Villager Member

    Messages:
    8
    Likes Received:
    0
    First Language:
    English
    Primarily Uses:
    RMMV
    So, what I want to do is this.

    I want to cover my map in numbered region markers and have each region marker represent a different map/enemy set/lvl range. So, when player is walking around he is basically rolling a dice for encounters and when the dice roll hits the appropriate target range for an encounter I want the region marker to transfer the player to said specific map.
     
    #3
  4. Shaz

    Shaz Veteran Veteran

    Messages:
    37,584
    Likes Received:
    11,300
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    If you just want to transfer the player back to the same spot again afterwards, you don't need to update the variable constantly.

    In the event that transfers the player, just use Control Variables to get the player's X and Y position (and possibly also the map id) into variables. If you want to be really specific, you can use another variable for the direction. Then transfer them to the appropriate map. When the battle is complete, use another event (this one could be a common event, so you can call it from all of your battle maps rather than creating a separate event on each one) to transfer the player back again, using the variables with the map ID and player position. If you want the player facing the same direction as before the battle, just have a series of If tests to check the direction variable, as there is no ability to use a variable for direction in the Transfer command itself.
     
    #4

Share This Page