Save-Point
Any way to make events trigger other events? - Printable Version

+- Save-Point (https://www.save-point.org)
+-- Forum: Games Development (https://www.save-point.org/forum-4.html)
+--- Forum: General Support (https://www.save-point.org/forum-18.html)
+--- Thread: Any way to make events trigger other events? (/thread-4602.html)



Any way to make events trigger other events? - MechanicalPen - 04-01-2013

I've been playing around with a horror style RPG Maker XP game, and thinking about how to make traps for the monster's chasing the player. Is there any way to make an event trigger when another event steps on it?


RE: Any way to make events trigger other events? - Kain Nobel - 04-01-2013

You can use conditional branches like...

Code:
@> Condition : Event A's X == Event B's X
  @> Condition : Event A's Y == Event B's Y
    @> Comment : STUFF HAPPENS HERE.
  Branch End
Branch End

You most likely have to send the X/Y coordinates of both events to a variable, and check using those. From there on, you'll have to figure out the best way to make A trigger B. Having Event A set a switch, and Event B using a parallel process with the page condition checking for said switch would probably be the best method.

Example : Event A is "Monster" and Event B is "Pit Trap". Checking if "Monster"'s coordinates match up with "Pit Trap"'s coordinates, the "Monster" event would set Switch #???? : Monster Trapped. When that switch is on, the "Pit Trap" event is activated, an animation plays, then the self switch of both events is turned on (so they don't happen again.)

I hope that helps some.


RE: Any way to make events trigger other events? - KasperKalamity - 04-01-2013

that would probably be the easiest way. otherwise you'd have to mess around with switches and set move routes and custom movement definitions. it's a pain.


RE: Any way to make events trigger other events? - MechanicalPen - 04-01-2013

I can probably get an events X and Y by doing something like;
Code:
$game_map.events[event_id].x
and then use those in a conditional branch. Thanks!