Is there a way to have an event only respond to the initial touch?

Status
Not open for further replies.

Jennavieve

Veteran
Veteran
Joined
Oct 21, 2020
Messages
90
Reaction score
86
First Language
English
Primarily Uses
RMMZ
I've been having this problem with a certain type of NPC event in my game (set to event touch). It's a monster that's meant to drain your HP a little if it touches you. It also drains your health if the player touches it, which is fine except that it's overresponsive when the player touches it. The problem is that it seems to process the player touching it every frame (because the player is holding down the directional keys for movement) so it drains the player's HP waaaaay faster than if the event touches the player. It ends up being an instant kill because by the time the player has a chance to respond and try to move away, they're already dead.

Is there a way I can set it up so that the event only processes the initial contact from the player instead of processing and responding to a touch every frame?
 

Zerothedarklord

Veteran
Veteran
Joined
Jun 25, 2013
Messages
316
Reaction score
95
First Language
English
Primarily Uses
RMMV
by changing a self switch after it deals damage, triggering a second event page that is NOT "event touch"

However, that'd disable it from being able to damage again (which you DID ask for), but you could also add a wait time, although that might feel awkward.

My recommendation: Self Switch A turns on after dealing damage.
Event page 2 triggered by self switch A, set to run parallel. Wait time of 30, 60, 90 or 120 frames (however long a delay you want, really), and then after the wait, turn self switch A back off.
 

BK-tdm

Manga Maker
Veteran
Joined
Jun 21, 2018
Messages
210
Reaction score
462
First Language
English
Primarily Uses
RMMV
Either go with the above response or make the event itself do a "1 step back" move route after dealing the damage, set that the move route doesnt have a "wait for completion" so the player can also move away,

If the player follows the event and re-triggers it they get double damage for being bad :kaopride:
 

Jennavieve

Veteran
Veteran
Joined
Oct 21, 2020
Messages
90
Reaction score
86
First Language
English
Primarily Uses
RMMZ
Thank you both for your responses! I ended up adding a player movement route with a 5 frame rate to the event page and that did the trick. Works perfectly now. The answer was right in front of my face the whole time, guess I just need a post to actually think of it lol.
 

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
15,551
Reaction score
8,626
First Language
English
Primarily Uses
RMMV

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

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

Latest Threads

Latest Posts

Latest Profile Posts

After hearing Wataten's opening several times and knowing what this anime is about, I don't think I like moe anymore.
So I am working on a big DLC package for my game.... and it will add a new intro and extend the ending of the base game, while of course adding additional content to the game... Yeah, that should work! lol
I'm stuck, I'm making some of Mr. N's Dialogue but I can't finish his full Dialogue...heres what I got now [this is the part I'm stuck on] "You treat me like a
bug, I'M SICK OF IT, you had me make these...abominations...well, now..." and at the "Well, now...' part I'm stuck at, anyone got Ideas?

Forum statistics

Threads
107,548
Messages
1,030,428
Members
139,673
Latest member
WDRS
Top