(XP) event collision by terrain tags

kaigames

Villager
Member
Joined
Feb 8, 2019
Messages
20
Reaction score
0
First Language
Portuguese.BR
Primarily Uses
RMXP
hello sorry for my english .... in rpg maker it is possible to make conditions by calling scripts

I actually did with the character colliding with a terrain:

$ game_player.terrain_tag == 0

with 0 being the desired terrain number.

but when trying to do this with events does not work. events do not react to land

I tried to exchange the $ game_player for $ game_event but it did not work well ,,,,

is there a way to fix or a script that can fix this? desde já agradeço
 

DerVVulfman

Resident Werewolf
Veteran
Joined
Jun 26, 2012
Messages
314
Reaction score
151
First Language
English
Primarily Uses
RMXP
I made a simple map and changed the sandy tile's terrain tag to 1. And then, I drew a strip of the sandy tiles onto the map. After that, I made an event that walked towards the sandy tile.

So far, simple enough. Right?

Okay, now here's the magic part.......

I edited the event by adding a script call:
Code:
x = $game_map.events[@event_id].x
y = $game_map.events[@event_id].y
if $game_map.terrain_tag(x,y) == 1
  p 'Hey, I touched it!'
end
And then, I set the event to run by way of a 'parallel process', so it continually runs this check.

This is a very simple test run. But it will bring up a message all the time the event is over the sandy tiles.

:D Funny. You can have a @event_id value in a script call, and it recognizes the ID of the event using it! For over ten years, I never tried that.
 

kaigames

Villager
Member
Joined
Feb 8, 2019
Messages
20
Reaction score
0
First Language
Portuguese.BR
Primarily Uses
RMXP
:thumbsup-left: THANK YOU VERY MUCH!!!!
 

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

Latest Threads

Latest Profile Posts

Either I just had one of those dreams where you think you're awake, or I have time traveled. I woke up at 6:58am this morning, heard my father leaving for work, laid back down, now its 1:16am.
So the overhaul on my project has been going great, I like this version of the project a lot more. It's more contained and less overly ambitious for what I can achieve given my constraints on time, money, and skills in advanced programming. I'm going to wait till my project is mostly finished to begin working UI polish again. I'm going to learn how to use LUNA MV to polish the project.
last time i used this site i was a different gender.. wow rlly makes u think... anyway transing ur gender is pretty cool and theres hair growing on my feet now 10/10
I should have listened to RPGMAKER Meme thread. I should have backed up my data. The Orphan of Time, my WIP, is completely gone, all those hours of work are completely gone :(
God what was my life before smartphones (I had a grandma's phone before wednesday)

Forum statistics

Threads
93,381
Messages
911,849
Members
122,883
Latest member
TEKILAO
Top