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
321
Reaction score
96
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,578
Reaction score
8,641
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.

Latest Threads

Latest Posts

Latest Profile Posts

Starting work on some stuff for the community. Hopefully it will be fun, and useful to somebody.
Searching what to play in my dead times, the nostalgia hit me hard and ended downloading the Patapon trilogy, hope I can avenge my child self and beating all the games hahaha
Finished the frontier and...I apologize to anyone who saw the trailer I posted and actually tried it. Technical marvel, crazy disjointed fetish story hidden inside a cheap milsim skin that has no idea what it's trying to be except sanctimonious and failing at even that. As much as I hate fallout 4's story, even it was better. I guess there just won't be another non-parody fallout after all.
Anyone else having trouble posting in the forum? I have no reply box in posts or in messages. This is the only place I can type. @Archeia?

Forum statistics

Threads
107,763
Messages
1,031,986
Members
139,911
Latest member
Katara
Top