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,425
Reaction score
10,852
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

I know just enough to be dangerous!
Veteran
Joined
Jan 9, 2022
Messages
965
Reaction score
1,324
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,013
Reaction score
6,151
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 Posts

Latest Profile Posts

imgur links are back!
now I CAN keep getting away with NOT replacing them with updated renders!
yay!
I forgot RPG Maker even existed. Such good memories. Might boot up steam and download MV one more time
10 pieces of KFC chicken for US$12.30, delivery included. Cheap or expensive? :aswt:
Ugh-I HATE this! There's construction going on in my area and because of that my Internet connection is wonky; this site in particular keeps constantly freezing up on me; I can't even barely type a single sentence without the page freezing in the middle of it! I hope this changes soon.
Yeah, it’s cool to have friends that hang out, but get you a friend that goes grocery shopping together too.

Forum statistics

Threads
131,547
Messages
1,220,737
Members
173,220
Latest member
ZecaVn
Top