Quintus

Veteran
Veteran
Joined
Nov 9, 2017
Messages
38
Reaction score
6
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,465
Reaction score
1,475
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,006
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,465
Reaction score
1,475
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,006
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
38
Reaction score
6
First Language
English
Primarily Uses
RMMV
Got it to work, thanks.
 

Latest Threads

Latest Profile Posts

so... I decided since a park was an area in my game... here's an enemy that's slide with a hand behind it. cause why not.
Hot chocolate and music make studying and note-taking much easier :kaoluv:
Until my hand cramps up from writing too much!
Doing RPG Maker News for 21st September 2021


Malak is still waiting for Dark Deception Chapter 4... This was him yesterday after another sugar crash.
Again, he's fine. He's just bored at this point, considering he's exhausted his entire vacation bucket list.
Am I the only one who files custom resources under specific folders to remember who to credit? :kaoswt2:
1632263519730.png

Forum statistics

Threads
115,270
Messages
1,088,481
Members
149,874
Latest member
AlolanNinetales
Top