I've been trying to make this "simple" (at least on paper) system work all day but I just don't understand it anymore. Please help me; I'm so tired with this that I can't even tell what I'm doing wrong anymore.
TLDR: A certain switch keeps getting switched on and I have no idea how or why.
My plugins are:
What I'm trying to do: I use regions to mark line of sight of guards. The guards turn in two directions every now and then. So two 'zones' for each guard. In the pic below, I got rid of zone 11 since it wasn't necessary for the testing. (Region 9 is supposed to be shadow where the player can't be detected. It's there for the shadows darken plugin mostly).
I made variables with names like zone 10, zone 11; zone 12,zone 13 (two to each guard, 4 in a room max), and in a guard's movement, when he turns towards a particular direction, I turn one of the variables on and the other off.
Thus rendering a zone virtually on or off.
There is another parallel common event fetching the player's region id every 60 frames (accurate enough for testing). The text is there for playtesting.
and my main parallel common event for this system takes the region id from the other event, and if the region id is, let's say, 10, then it checks if the zone17 is 0 or 1 and if it is 1, then it alerts the corresponding guard and switches off the switch required for the event.
I redid this part over and over and eventually resigned myself to doing it in a brute-force way out of frustration.
This goes on like this for a while. To cut it short:
The alert is a switch that which causes the stationary guards to switch to another event page where all they do is chase down the player and engage in combat. After the combat, the stealth system gets turned back on again and the alert is turned off. I've only done this for one of the guards (that's why there is only alert a).
So for the test, I'd walk into zone 10, and then 'alarm' the guard, get him to chase me and force a combat situation. Except... that's not happening.
The issue: alert A keeps getting triggered (right at the beginning) no matter what. In a previous iteration, it atleast took until the guard faced towards zone 1 for it to switch on against my will.
I have no idea what's causing this and I'm so tired I can't even conceive of what the issue might be. If you see something I don't, please tell me and if I'm a moron and I'm overthinking everything and if there is a plugin out there that can do this easily, please tell me that too.
TLDR: A certain switch keeps getting switched on and I have no idea how or why.
My plugins are:
What I'm trying to do: I use regions to mark line of sight of guards. The guards turn in two directions every now and then. So two 'zones' for each guard. In the pic below, I got rid of zone 11 since it wasn't necessary for the testing. (Region 9 is supposed to be shadow where the player can't be detected. It's there for the shadows darken plugin mostly).
I made variables with names like zone 10, zone 11; zone 12,zone 13 (two to each guard, 4 in a room max), and in a guard's movement, when he turns towards a particular direction, I turn one of the variables on and the other off.
Thus rendering a zone virtually on or off.
There is another parallel common event fetching the player's region id every 60 frames (accurate enough for testing). The text is there for playtesting.
and my main parallel common event for this system takes the region id from the other event, and if the region id is, let's say, 10, then it checks if the zone17 is 0 or 1 and if it is 1, then it alerts the corresponding guard and switches off the switch required for the event.
I redid this part over and over and eventually resigned myself to doing it in a brute-force way out of frustration.
This goes on like this for a while. To cut it short:
The alert is a switch that which causes the stationary guards to switch to another event page where all they do is chase down the player and engage in combat. After the combat, the stealth system gets turned back on again and the alert is turned off. I've only done this for one of the guards (that's why there is only alert a).
So for the test, I'd walk into zone 10, and then 'alarm' the guard, get him to chase me and force a combat situation. Except... that's not happening.
The issue: alert A keeps getting triggered (right at the beginning) no matter what. In a previous iteration, it atleast took until the guard faced towards zone 1 for it to switch on against my will.
I have no idea what's causing this and I'm so tired I can't even conceive of what the issue might be. If you see something I don't, please tell me and if I'm a moron and I'm overthinking everything and if there is a plugin out there that can do this easily, please tell me that too.