Single-Instance event that activates when the player hits a tile with a specific R type?

TheFerydra

Villager
Member
Joined
Jan 14, 2021
Messages
6
Reaction score
4
First Language
Spanish
Primarily Uses
RMMV
Greetings. I'm experimenting with RPGMZ to make an RPG with more varied overworld mechanics, and I got one in mind that could be done with multiple instances of various events, but I feel that would bloat the game. So I wanted to know if, using the "R" tiles that are used for enemy encounters could be used as well? For example, if I have a puzzle where the characters have to jump between some platforms, all "1" tiles let them jump 2 spaces in any direction, but if they land in a "2" tile (Which would be for the, let's say, river the platforms are on), they would automatically be transported back to tile "3" where the puzzle started.
So I can use R tiles to do something like that? Or are they limited to just customize enemy encounters?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
38,479
Reaction score
10,900
First Language
German
Primarily Uses
RMMV
no, they can do much more.
R stands for Region ID by the way.

and the command you're looking for is "get location info", that one can check several data on any coordinate, including returning the number of the region ID
 

Htlaets

Veteran
Veteran
Joined
Feb 1, 2017
Messages
404
Reaction score
217
First Language
English
Primarily Uses
As Andar says, they can be used for more than that. Highly suggest you make this:

◆Control Variables:#000# Player X = Map X of Player
◆Control Variables:#000# Player Y = Map Y of Player
◆Control Variables:#0# mapid = Map ID
◆Get Location Info:Region ID, Region ID, ({Player X},{Player Y})

A common event. If you have that as a regionid commonevent you can have a parallel event on your map check for player position and what region they're on and trigger events accordingly. You can make an eventID checking event as well.
 

ZombieKidzRule

My Zombie Kids ate your RM project.
Veteran
Joined
Jan 9, 2022
Messages
991
Reaction score
1,394
First Language
English
Primarily Uses
RMMZ
I watched and recreated this tutorial many months ago and this was pretty good. It shows how to use Region IDs for an invisible path puzzle. Not exactly what you are planning, but the concept is similar.

I hope this helps.

 

ImaginaryVillain

High Cultist of the Sporkle
Veteran
Joined
Jun 22, 2019
Messages
1,014
Reaction score
6,155
First Language
Absurdism
Primarily Uses
RMMZ
You could accomplish it with as simple script command, where `yourRegionNumberHere` is the region ID you want to trigger teleports on. And you just put the position you desire for them to be returned to in place of the x, y.

Code:
if ($gameMap.regionId($gamePlayer.x, $gamePlayer.y) === `yourRegionNumberHere`){
    $gamePlayer.setPosition(x, y)
}

Optionally, you could put $gameMap.regionId($gamePlayer.x, $gamePlayer.y) === `yourRegionNumberHere` into a conditional command, and then put whatever event commands you want in that, such as a transfer command or just a script command with $gamePlayer.setPosition(x, y).

Just put it as a parallel event on the map, and paint your region Ids as you see fit.
 

TheFerydra

Villager
Member
Joined
Jan 14, 2021
Messages
6
Reaction score
4
First Language
Spanish
Primarily Uses
RMMV
Oh thanks you all! Sorry for not answering sooner, I have been busy lately.
 

Latest Threads

Latest Profile Posts

It is important to remember, in a world where everyone quickly resorts to hate, that few people actually deserve your rude thoughts about them. They're just different from you in most cases and aren't malicious.
Life is strange. I am currently in a train-the-trainer course for Fraud Docs and Counterfeiting Techniques. And our assignment last night was to make several counterfeit documents using simple tools like Paint and such. And I actually learned stuff that might be helpful in trying to make/edit things for RM assets. I don't think that is what the course developer had in mind! :)
Onward to more RM game dev glory.... in about 14 minutes. :LZSexcite:

Forum statistics

Threads
131,714
Messages
1,222,456
Members
173,453
Latest member
mikenlanggio
Top