Joined
Dec 2, 2022
Messages
32
Reaction score
1
First Language
English
Primarily Uses
RMVXA
Im trying to make a bit in my game where the player has to sneak past enemies before a sound goes off (not sure what it’ll be yet) and if the player is in close proximity to the enemy when the sound goes off, this alerts the enemy and makes them chase after the player.

Does anyone know how this could be done?
 

RCXGaming

Champion of Brightmoon Tor
Veteran
Joined
Jan 4, 2019
Messages
829
Reaction score
1,857
First Language
English
Primarily Uses
RMMV
Vlue's Proximity Events will work here.

How it works is that you make enemies into parallel processing events and then put conditional branches into their code that have the following script:

Proxy.inprox_d?(@event_id,5,true)

The 5 is the amount of tiles they see, the "true" is the cone of sight priority.

Then you make a parallel processing event that isn't an enemy NPC and have it also tagged with a proximity conditional branch (Proxy.inprox?(@event_id,3,true)) that checks if the player is next to the enemy when the sound goes off.

This will get more intensive the more parallel processing events you have, so tag all of them with like 10-15 frames of wait below the conditional branches.
 

kyonides

Reforged is laughable
Veteran
Joined
Nov 17, 2019
Messages
884
Reaction score
425
First Language
English
Primarily Uses
RMXP
Actually, to get an almost precise idea on when the SE finishes, you'd need to know the exact time it takes to be played in milliseconds. Use an internal timer to see if it has reached zero.
 
Joined
Dec 2, 2022
Messages
32
Reaction score
1
First Language
English
Primarily Uses
RMVXA
Vlue's Proximity Events will work here.

How it works is that you make enemies into parallel processing events and then put conditional branches into their code that have the following script:

Proxy.inprox_d?(@event_id,5,true)

The 5 is the amount of tiles they see, the "true" is the cone of sight priority.

Then you make a parallel processing event that isn't an enemy NPC and have it also tagged with a proximity conditional branch (Proxy.inprox?(@event_id,3,true)) that checks if the player is next to the enemy when the sound goes off.

This will get more intensive the more parallel processing events you have, so tag all of them with like 10-15 frames of wait below the conditional branches
Forgive me, but I’m not entirely sure how this script works. Do I just copy and paste it into the script editor, or do I paste it in an event? Could someone kind of inform me how that works? Thank you!
 

RCXGaming

Champion of Brightmoon Tor
Veteran
Joined
Jan 4, 2019
Messages
829
Reaction score
1,857
First Language
English
Primarily Uses
RMMV
Forgive me, but I’m not entirely sure how this script works. Do I just copy and paste it into the script editor, or do I paste it in an event? Could someone kind of inform me how that works? Thank you!

You have to install the script.

And then follow the instructions I clearly listed in my original post here.
 

Latest Threads

Latest Posts

Latest Profile Posts

Calibrating the timing of dialogue is deffo my new least favorite thing.
I died aged 27 to cancer. Then I was reborn in a South-American state. I retained all memories and skill and had a goal from my previous life I needed to finish, but now I was just a 1-year-old girl capable of only smiling at others.

Dreams like this one make me glad I'm able to wake up from them at will.
Found a critical bug the other day with the time system that would have caused none of the NPCs to spawn. Since I use dev mode to test time-based stuff, I didn't catch this for way too long!
Last missing piece, a plugin to let weapons and armor be used as multiple equip types
What if the Actor Battlers disappeared when your selecting enemies...
ndyhHXV.gif

Forum statistics

Threads
129,976
Messages
1,206,660
Members
171,198
Latest member
DonHazzy
Top