Need help with counters

Hello so I'm trying to create something that would allow npc's to hear a player. Im doing this with a event detection plugin and some complicated eventing using variables that would count my steps once the event has detected me and another counter which would, when it reaches a certain number subtract from the number of steps I have taken. The idea being that when my character has taken a certain number of steps within the event range it will trigger a chase, but if my character stands still the steps will be slowly subtracted. Im also using a plugin to help me check the counters.
In theory this should work, but I cant get the counters to do what I need them to do. This is part of a test script I'm using to test the event:
◆Control Variables:#0003 Loudness = Steps
◆If:Loudness ≥ 10
◆Control Switches:#0013 Minotaur Heard player = ON
◆Control Variables:#0003 Loudness -= 10
◆
:End
This script is just checking the steps and am just posting to help illustrate my issue. When using this the steps will be return to zero when the variable reaches 10, but only does it once and will continue to count past ten the second time. I need this to continuously cycle for this event to work.
This is the script I would like to use, but can't get to work:
◆Control Variables:#0004 hearing counter += 1
◆Control Variables:#0003 Loudness = Steps
◆If:hearing counter ≥ 300
◆Control Variables:#0004 hearing counter = 0
◆Control Variables:#0003 Loudness -= 2
◆
:End
◆If:Loudness ≥ 10
◆Control Switches:#0013 Minotaur Heard player = ON
◆Control Variables:#0003 Loudness -= 10
◆
:End
Um, I doubt this is the whole event, is it?

This is exactly the example why print screens are much better than copy pasted codes.
No there is a little more to it, but this is the main section that does the hearing check. I didn't include the event triggers and stuff, but those aren't causing the problem.
Frankly, it is impossible to read anything out of this. I'm able to understand how it should work and I don't see a mistake in these three codes. But... I am not sure what is responsible for decreasing variable Steps if something for example, if anything actually does that.
This portion decreases steps:
◆If:hearing counter ≥ 300
◆Control Variables:#0004 hearing counter = 0
◆Control Variables:#0003 Loudness -= 2

Loudness= steps
Hearing Counter is a running timer that should every time it recycles reset its self and decrease Loudness by 2.
This portion checks to see if Loudness has reached 10 steps, if it has the minotaur will chase the player.
◆If:Loudness ≥ 10
◆Control Switches:#0013 Minotaur Heard player = ON
◆Control Variables:#0003 Loudness -= 10
This portion works, but only will reset its self once and then it will continue counting past ten when it should just keep recycling.
There is more, but those portions aren't really relevant to the problem and there would still be a lot of fine tuning, but I'm just trying to get some of the core aspects to work correctly.
You are not decreasing steps, you are decreasing loudness. And before that there is an equation that loudness = steps, so after decreasing the loudness you increase it back the next time your event runs again.
I kinda thought thats what was going on, but how do I decrease the step count then, or reset it?
Maybe steps -= 2?
I seriously have no idea, since I don't even know where they come from.
It really is best to post screenshots of the whole event when you are trying to get help with an event. Sometimes things you think might not be the problem really are, and we can't see that without seeing everything.

That being said, what about considering using a region plugin like this one? http://yanfly.moe/2015/10/19/yep-17-region-events/

You could paint different regions the closer you get to the NPC, with different effects. It might help simplify things a bit.
Actually managed to create something that works. It's rudimentary, but the system does give the npc some senses akin to hearing. I can't change the step counter, but instead created a check system that constantly checks against the number of steps taken with a counter that starts form the last number of steps taken.

Original thread: https://forums.rpgmakerweb.com/threads/need-help-with-counters.82319/