is there a way to check terrain tag in Mv in conditional branch and note that i am using mv 1.5.1 because my project is in development since rpg maker mv 1.5.1 was released and it is not running in newer versions
How to check terrain tag RMMV
● ARCHIVED · READ-ONLY
-
-
Found this in an old post from 2014 from Juunanagou.
"$game_map.terrain_tag(x,y)==5
change x and y with the x and y of the map of the part you want to check. I made a simple event that controlled if that part has that terrain tag that plays a sound and makes an exlamaton mark on the character and it works. The tag is not game_character but game_map. Hope it's the thing you are searching for." -
i want to check it for whole map not only one tile is there a way for that without providing x and y . and what i want to do is make player die whenever he steps on it and if there's some script for that you can tell me about that scriptFound this in an old post from 2014 from Juunanagou.
"$game_map.terrain_tag(x,y)==5
change x and y with the x and y of the map of the part you want to check. I made a simple event that controlled if that part has that terrain tag that plays a sound and makes an exlamaton mark on the character and it works. The tag is not game_character but game_map. Hope it's the thing you are searching for." -
@Ameer
You'll need coordinates because the terrain tag is different for different tiles.
The only thing you can do is load the players coordinates into variables and then check the terrain tag of that position.
And no need for a script - you can do this with pure eventing on a parallel process
1) create an event set to parallel process
2) control variable to get player X position into one variable (done in the game data section)
3) control variable to get player Y position into another variable
4) get location info with the two variables above to load terrain tag into a third variable
5) conditional branch to check the variable with the terrain tag for the number you set, doing whatever you want if the player is on a terrain with that number
6) wait 5 frames (to prevent the parallel process from lagging too much
finished. -
Get Location Info is a command on tab 3.
You can shorten the process with this in the script of a conditional branch:
Code:$gamePlayer.terrainTag() === 6
replacing 6 with whatever terrain id you want to use. -
Well sorry sorry i meant region id@Ameer
You'll need coordinates because the terrain tag is different for different tiles.
The only thing you can do is load the players coordinates into variables and then check the terrain tag of that position.
And no need for a script - you can do this with pure eventing on a parallel process
1) create an event set to parallel process
2) control variable to get player X position into one variable (done in the game data section)
3) control variable to get player Y position into another variable
4) get location info with the two variables above to load terrain tag into a third variable
5) conditional branch to check the variable with the terrain tag for the number you set, doing whatever you want if the player is on a terrain with that number
6) wait 5 frames (to prevent the parallel process from lagging too much
finished. -
It's still the same - Get Location Info will give it to you, but you have to provide the coordinates, because every tile on the map could have a different region. So the steps are the same as Andar gave, but you would get the Region ID instead of the Terrain Tag from Get Location Info.
Or the shortcut for the script in a conditional branch is:
Code:$gamePlayer.regionId() === 6 -
Thank you so much that worked now mods you can close thread and can you tell me how to ask mods to close threadIt's still the same - Get Location Info will give it to you, but you have to provide the coordinates, because every tile on the map could have a different region. So the steps are the same as Andar gave, but you would get the Region ID instead of the Terrain Tag from Get Location Info.
Or the shortcut for the script in a conditional branch is:
Code:$gamePlayer.regionId() === 6 -
Just report your first post and let them know your problem is solved, and they'll close it for you.
-
thanks i'll try itJust report your first post and let them know your problem is solved, and they'll close it for you.
-
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.