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

Started finishing up my bosses and characters...I don't know how long...but its going to take long...

I ended up needing to do a chapter one world map remake. It's still WIP but coming along nicely. =D
Stream will be live shortly! I will be beginning a play-through of Resident Evil 4! Feel free to drop by!

1st iteration on castle interior in Tiled.
I've started up Pillars of Eternity. It's interesting how the game does a "select choice" cutscene using still image art for dramatic flair. I wonder if that might work for my RPGMaker project.

Forum statistics

Threads
107,752
Messages
1,031,884
Members
139,893
Latest member
Natsu9138
Top