Trying to toggle a chest open/close state with proximity event.

Crestfall9

Procrastinator
Member
Joined
Mar 5, 2018
Messages
13
Reaction score
6
First Language
Indonesian
Primarily Uses
RMMV
I don't think I will ever be able to explain this correctly.

So I tried to make a proximity event that pretty much goes like this:
Player in proximity around the chest -> Chest plays open animation -> Chest froze in open animation -> Player left proximity around the chest -> Chest plays close animation -> Chest froze in close animation

As you can see it's kinda a toggle state with animation thrown in. However, when I try to do it, it just keeps looping the animation over and over.

I made a parallel event that keeps checking whether the player is in proximity of chest.
 

Aloe Guvner

Walrus
Veteran
Joined
Sep 28, 2017
Messages
1,628
Reaction score
1,143
First Language
English
Primarily Uses
RMMV
it just keeps looping the animation over and over
I made a parallel event

Parallel events loop over and over, so I suspect this is where your issue comes from. However, we cannot suggest anything without seeing your event. Please post a screenshot of the event, with the entire event window.
 

XIIIthHarbinger

Part Time Super Villain
Veteran
Joined
Apr 27, 2014
Messages
676
Reaction score
806
First Language
English
Primarily Uses
RMMV
Have you tried Yanfly's event chase player plugin?

http://yanfly.moe/2015/10/21/yep-20-event-chase-player/

Normally I am not one for "Just use a plugin" as the first answer, but proximity to player event reactions tend to be a bit of a pain with vanilla eventing.

Without the "chase" portion of the script, you should be able to set it up to "react" via animation shift, using facing movements as a consequence of the "alert" mechanic. & then the chest would close automatically, with the "alert" mechanics expiration.
 

Frogboy

I'm not weak to fire
Veteran
Joined
Apr 19, 2016
Messages
1,834
Reaction score
2,343
First Language
English
Primarily Uses
RMMZ
You'll need a check in your parallel process so that the open animation only plays when the chest is closed and vise versa. If the chest is already open, you don't want the animation playing again.
 

Latest Threads

Latest Profile Posts

Too bad the Boss Battle Build Bout isn't also for VXAce.
I might not participate in the Boss Battle contest after all... I have more important things to do, like Wishful Wanda. And of course the Dark Deception spinoff I plan to pitch, Demon Slayer.
Changed my avatar, goodbye Alan Sugar, hello George Carlin (one of my favorite human beings ever)
If you still don't subscribe our Polish channel please consider it :)
1.png
Who wants to see my review of the worst star wars movie? This movie has all the excitement of being on Jury Duty of the most boring case ever about trade negotiations.

Forum statistics

Threads
115,173
Messages
1,087,834
Members
149,727
Latest member
wizard54
Top