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
315
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,530
Reaction score
8,613
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: 1)

Latest Threads

Latest Profile Posts

To composers out there, what are atleast 4 instruments overall I need to have to make my music not feeling empty? I'm here stuck trying to make my own battle music but it kinda sounds... Not intense?
My computer broke yesterday, so no RPG maker for at least a week until I can get it repaired. :(
Just wanted to share how my game won 1st place in a game jam for itch.io. Everyone else used Unreal, Unity, GMS2, Godot, etc but I used RPG Maker 2003 :guffaw: It just shows that you can create a good game and it doesn't matter which engine you use
Working on cutscenes~

if your game is the first (or ONLY) in a series and still has a colon in its title, you are a bad person and I hate you...... jk.

who could ever hate BETWEEN: TWO SOULS?

Forum statistics

Threads
107,405
Messages
1,029,444
Members
139,504
Latest member
lobsterknees
Top