A way to make events trigger other events?

Quintus

Veteran
Veteran
Joined
Nov 9, 2017
Messages
30
Reaction score
3
First Language
English
Primarily Uses
RMMV
Usually I would use a switch or a variable controlled in one event to do something to another event with autorun ore parallel events, but I'm wondering if there's a way to do it through proximity or events.

The scene I'm trying to make is you have to sneak around and wait for a sceurise guard to open a locked door and pass through it, but leave the door open for a few seconds afterwards where you can sneak through. Is there a way to event something like this or a script that could do it?
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,248
Reaction score
1,252
First Language
Spanish
Primarily Uses
RMVXA
kinda.
you can make the whole thing with a small scene manager, or use move route commands.

if what you want to grab and control is the open door, you should probably make that it's own event, and have either the guard or the scene manager send commands to it.
a simple move route/change sprite would do, to make it open/close.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
a simple move route/change sprite would do, to make it open/close
Actually, normal doors (those that are like the RTP ones) are opened via changing their facing direction as most doors come as a full spritesheet and the change sprite command doesnt let you select a specific frame on the sheet. The door quick event is a good example of how to do it.

Anyway, changing the sprite this way is only good if you only need the door opened visually, if you need it to be unpassable while closed and passable when opened, or have an event command when opened, I suggest just keep using switches or variables or use the event's self switches since you can actually use script calls to modify the self switch of any event

Basically, on the guard event, after he moves in front of the door, do the unlocking method you've chosen.
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,248
Reaction score
1,252
First Language
Spanish
Primarily Uses
RMVXA
change sprite command doesnt let you select a specific frame on the sheet
double page with self switch, then
although, I believe you *can* specify a frame, with some trickery (not by default)

what I meant was, you can use the move route tool as a way of passing commands to another event indirectly.
with that in mind, you can use the move route and *it's* capabilities from the target event's perspective as a way of altering the behavior of that event.
it's tricky, but it gives you some flexibility if you don't want to add a full plugin for that one edit.

Basically, on the guard event, after he moves in front of the door, do the unlocking method you've chosen.
a heads-up for the OP, regarding that: don't consider objects in the scene as physical objects.
what you call "a door", isn't exactly "locked" or "unlocked", nor does it "open" or "close", and it doesn't have hinges nor guides, nor locks.
what you're dealing with is an obstacle that lets (or not) the player through.
*it* being shaped as a door comes *on top* of it being a scene object, and the guard doesn't (and shouldn't) interact with it, because the guard is another obstacle, one that doesn't affect the player's movement, but one that is part of the sequence of actions that ultimately affects that obstacle that lets the player through, so it should be included in the action.

when that happens, you're better off by adding another event that controls both objects, if the interaction is complex.
in this case, either the guard or the door itself can be the controller and the other be the controlled, depending on which one is the focus.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
I believe you *can* specify a frame, with some trickery (not by default)
For doors that follow the RTP door sheet format, you control the direction facing of the event (using move route) to make them "open" as I said in my post above.

Yeah, I highly agree. When controlling a scene with more than 1 event, there should only be one controller event which controls everything.
 
Last edited:

Quintus

Veteran
Veteran
Joined
Nov 9, 2017
Messages
30
Reaction score
3
First Language
English
Primarily Uses
RMMV
Got it to work, thanks.
 

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

Latest Threads

Latest Profile Posts

I should realize that error was produced by a outdated version of MZ so that's why it pop up like that
Ami
i can't wait to drink some ice after struggling with my illness in 9 days. 9 days is really bad for me,i can't focus with my shop and even can't do something with my project
How many hours have you got in mz so far?

A bit of a "sparkle" update to the lower portion of the world map. :LZSexcite:
attack on titan final season is airing tomorrow, I'm excited and scared at the same time!

Forum statistics

Threads
105,882
Messages
1,017,230
Members
137,607
Latest member
Maddo
Top