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
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