RPG Maker VX Ace

RPG Maker VX Ace

View Stats:
terwilliker Aug 21, 2014 @ 1:24pm
How to use an event touching another event as a trigger?
Like say a runaway horse running over something. Is that possible? At first I tried touch event but that only seems to be for when the event touches the player.
< >
Showing 1-14 of 14 comments
Marquise* Aug 21, 2014 @ 3:11pm 
I have the same with an Indiana Jones giant rock ball rolling on PCs and falling IN a transfer evented pit. It stops its animation in front of the pit instead of falling down :S (it is supposed to diseapear once it has rolled on it and got opacity at 50% then 25% then just selfswitch off but on the said pit-event used by the players shall the players want to use it!)

So who answer this will also answer also my trouble.
Last edited by Marquise*; Aug 21, 2014 @ 3:12pm
Mystix Aug 21, 2014 @ 4:42pm 
As far as I know, there's no easy built-in / default way to check for event-touching-event to trigger something. Maybe, with a parallel running process, you might be able to check the X and Y posistions of the events accordingly, then if they match have the trigger occur.

Other than that, you may want to look into using a script to help you accomplish an event-touch-event trigger.

The following Custom Event Triggers script looks promising (and has an Event on Event option which looks like it can activate a trigger):
http://www.himeworks.com/2013/04/05/custom-event-triggers/
Marquise* Aug 21, 2014 @ 7:08pm 
Got it! I really had to work, work, work around. I think I start to get my novice plus status... Not sure until I learn more ^^;
FancyMustelid Aug 21, 2014 @ 9:47pm 
Here's how I do it. First of all, without setting the through option, two events can never occupy the same space. But, using variables, you can create the illusion. Keep a running variable that tracks the event's x and y position and then set other variables to equal that +/- a number. To make it work properly when the event is moving, you need to have the variables define themselves after each movement. So if you set move route boulder "move down" only do it once and have the variable called again before you set the move again. Otherwise the move route will finish before the variable locations are set again.

Then have your conditional branches for what you want to happen check the location of events they are "touching" and if equal, then do whatever.

If either event (or player location) is stationary, the easiest way to do it would be to just set your variables that offset the position to the stationary one so you don't have to call the variables every time the moving event moves.

Hopefully that made sense.
Hajami Aug 22, 2014 @ 12:33am 
This is easy with Eventing, use Coordinate Variables as Mentioned, or try the new
"Get Location Info" Eventcommand on 3rd Eventpage in Combination with some Regions and
some Conditional Branches.

As long you dont exactly tell us what will happening in that Scene in all Detail, we cant Provide the easiest method for this to a person who is new to the basic commands.
How many Rocks.
How often do they Roll down, (more than once?)
How large is the distance they have to roll
And everything else that would be important to know.

Like a Script Book for Cinema Actors, would be best manual for Eventers to realise something wanted.
Last edited by Hajami; Aug 22, 2014 @ 12:36am
Marquise* Aug 22, 2014 @ 6:38am 
Originally posted by stickyka:
Here's how I do it. First of all, without setting the through option, two events can never occupy the same space. But, using variables, you can create the illusion. Keep a running variable that tracks the event's x and y position and then set other variables to equal that +/- a number. To make it work properly when the event is moving, you need to have the variables define themselves after each movement. So if you set move route boulder "move down" only do it once and have the variable called again before you set the move again. Otherwise the move route will finish before the variable locations are set again.

Then have your conditional branches for what you want to happen check the location of events they are "touching" and if equal, then do whatever.

If either event (or player location) is stationary, the easiest way to do it would be to just set your variables that offset the position to the stationary one so you don't have to call the variables every time the moving event moves.

Hopefully that made sense.
You never touight doing it without X-Y? It is when and where it actually screw things for me.

I realised that for the boulder in the pit, the pit event could host half the rolling event then return to normal. Bonus point from Prinny who typed me how to disable temporarilly the encounters so the PC could have a clean run!

@Hajami,
They could fly it wouldn't be more important. You can replace it by ducks even. The important thing was an event falling into another event to be used later or before, so positioned in the exact place. At one extremity of one corridor I had to make it do a jump over an additional event and it doesn't even show.
Last edited by Marquise*; Aug 22, 2014 @ 4:00pm
FancyMustelid Aug 22, 2014 @ 11:22am 
It really depends on exactly what I'm wanting to do. If I need an event to "run into" another event but for whatever reason, and I can't use the "through" setting, I'll probably use coordinate variables alongside offset variables or the aforementioned locationinfo (which is a super helpful feature).

For example, I want to have the player shoot a fireball that "hits" an enemy. I'll set the fireball to appear at the player's location and check it's location as it travels. Another variable offsets the fireball dependent on the direction of travel so I have a variable that's always one space in front of the fireball event. Then the enemy will have a variable that checks its location against the fireball's offset variable. If equal, then do damage.

On the other hand, if I want a boulder to roll over an event (maybe a switch), then instead of using location variables, I'll just set the move route of the boulder to move so many spaces until it reaches the switch point, then have the boulder event itself call the situation I want to trigger, then continue eventing its move path.

But if I wanted the switch to also be usable by the player, while also being in the way of the boulder, I'd set up the switch event, then the move path of the boulder. In the move path of the boulder, I'd set its "through" to on just before it reaches the switch, and turn "through" off after it passes the switch.

The point is, how you do it is very dependent on EXACTLY what you're trying to do.
Last edited by FancyMustelid; Aug 22, 2014 @ 11:23am
Marquise* Aug 22, 2014 @ 4:06pm 
I had to use 3 tricks but it all involved what you typed.

Except earlier spike trap I had to trash the X,Y thing and get pointed out an option that cause damage if that part of animation shows up! It seems that there were many ways to do itand I am not certain I really can judge wich one's better yet. I just never came to get X,Y to work :P (One day I am sure I will need it tought)
FancyMustelid Aug 22, 2014 @ 4:58pm 
Say, you want to make the boulder move down and hit a wall, smashing the wall as well as destroying the boulder. Also, I need that part of the wall to be an event for some reason and I also want the boulder to be able to crush players or some such, so I need the location to move with the boulder.

So, I create these variables:

On the boulder:

boulderx = (this event x for boulder)
bouldery = (this event y for boulder)
bouldery+1 = bouldery
bouldery+1 +=1 (since the boulder is moving downward, I want to have it trigger things one space in front of the boulder = ie: when the boulder touches something). Note that I also defined bouldery+1 twice. This is important.

on the wall event:

wallx = this event x for the wall
wally = this event y for the wall

Now back to the boulder:
if (whatever switch), set move route this event (boulder) move down
bouldery = (this event y for boulder)
bouldery+1=bouldery
I've reassigned the bouldery+1 back to bouldery again to call it to its current location
bouldery+1 +=1 and set the y one space ahead of its movement path.

Why like this? Because if I don't reset the location of the bouldery+1, then I'm constantly adding +1 to the bouldery+1. Remember, it has already set the bouldery at the beginning of the script, that isn't going to change from its original value until the script has finished running, so I have to redefine it every time the boulder moves.

Then, set move route of boulder to move down again
then recall my bouldery and bouldery+1 and bouldery+1 +=1 since the boulder moved again.

Keep doing this until the boulder reaches the end of its path.

For any events it can collide into:

conditional:
if variable (whatever event's x) = boulderx (which will be the same as it was initially if the boulder has not moved left or right)
conditional:
if variable (whatever event's Y) = bouldery+1 (this is the space right in front of the
boulder's movement)
Put your whatever happens here when these conditions are met.

A side note: You'll want the conditional parts in the event that is affected by the boulder if that wasn't clear.

EDIT: That second condition is supposed to be checked only when the first condition is met. You can reverse the order of them being checked, but one has to be within the other. I'm sure you've probably realized that by now.
Last edited by FancyMustelid; Aug 22, 2014 @ 5:04pm
Marquise* Aug 22, 2014 @ 8:56pm 
:D I was wondering what to do next in my Initiatic firt game . That could be a good challenge! Well off course not in the map I made, but it can be adapted to something similiar. (Last time I did that with spikes and the character position condition fitting the spikes, whatever the spikes were up or down and sometimes -as I tried to correct-, no matter where were the characters, they got hit all the time. X( )


It just hit me with that boulder notion that pushing a rock over a button event (kinda on the ground) is also maybe the same thing. :S

That seems advanced but I know that one used a X and Y in Redweaver's tutorial. I might have no choice; I might HAVE to use that one day and the only way I gonna learn is to DO it ^^;

Ah là là! Don't bother; there is a cozy lazy side of my brain that tries to tell me I'm too old for this. Well I will have to shrink up!

EDIT: (I however copy-pasted that post of yours in a text file and took it along with my tutorial to read/try. Tanks!)
Last edited by Marquise*; Aug 22, 2014 @ 9:04pm
FancyMustelid Aug 22, 2014 @ 9:50pm 
No problem. I can't script and figured a lot of stuff out on my own. So I've found some pretty nifty tricks to do a lot of stuff with events. The twice aforementioned locationinfo thing is really cool, though. You can use it to check region IDs of characters/events as well as terrain tags (which are just numbers that can be assigned to different types of terrain in the tileset in the datamanger). I highly suggest playing around with it.

Marquise* Aug 22, 2014 @ 10:12pm 
I will, I just realised that I have to look a lot and analyse well my map to figure up nest move then I go trough a whole tutorial re-imagining things to fit in... and huh, well sometimes it is supposed to fit.

Hope in one year and a half I can do something that is gamewise palatable. I saw a couples of folks having great strenghts in some aspects of RPGMaking and the rest a bit flawed. I guess that as long as folks are using this forum we can improve.

Everything is in there, it is just that I am kinda figuring up that there is not just a single awnser. Once we get in our own material, we have to ask multiple advices and in the end, just to word our problems (as it happened twice to me in chat), just solve it by itself because we just have a fresh perspective reading a question or a comment. :bbat:
heh, it might be too late for you, but if you are still interested, MeowFace made a sweet script for me that allows 1 event to trigger another event on touch. you can find it here http://forums.rpgmakerweb.com/index.php?/topic/53173-event-triggers-event/
Marquise* Apr 21, 2016 @ 1:04am 
Hey thanks. On my side it worked out well without script... Althought it was several headaches. If it wasn't for the bedbug invasion that game would be finished :P

But I will take a look! @.0
< >
Showing 1-14 of 14 comments
Per page: 1530 50

Date Posted: Aug 21, 2014 @ 1:24pm
Posts: 14