Yet another scenario that hopefully I won't lose anyone on while I explain the details in order to better clarify my dilemma...please hang tight; I'll try to make this concise.
Wrangler provided a tutorial which I have amended previous Event instructions that I had to now follow after. C-7 has also provided help earlier so I'm calling him for some insight, too, if he wouldn't mind. ramones is always a great help. Anyone else who can identify my problem is welcome to chime in, of course. :)
The gameplay is modeled after your traditional stealth-action, particularly with some "Metal Gear Solid" elements: Normal, Chase, Post-Chase/Caution statuses.
I'm using three condition statuses to determine how the Enemies (object "CharEnemy") behave depending on their awareness of the Player (object "CharPlayer").
(When I later get the Events set up,) the Enemies will follow preset patrols, which the Player will have to navigate around or distract with items (a feature not yet added). If the Player does not fall within the Enemy's line of sight (object "VisionCone") and no obstacles (the various wall objects) are in the way (determined by the "LOSobject" object which stretches between the Player and the Enemy instances), then the situation remains normal, or "PreChase". I do not have a group for these conditions as I want them to be readily available to test as conditions change.
This group is activated when both the LineOfSight and IsPlayerInRange variables test True. To try to prevent Event/Action contradictions, I make sure that the LostChase group remains deactivated (or is otherwise turned off) to prevent the Enemy from randomly wandering around or that it doesn't get confused on how to compute the Pathfinding behavior.
If during the chase, the Enemy loses sight of the Player somehow, the AlertState variable is set to 9, the LostChase group is activated, and the ChasePhase group is deactivated.
The Enemy is now set to wander around randomly for about 18 seconds. During this time, it is my goal to allow the ChasePhase to be reactivated if the LineOfSight and IsPlayerInRange conditions become true again. If not, the Enemy (again, when I implement this feature later) will go back to its patrols like normal.
Basically, the process should look something like this:
PreChase -->> ChasePhase <<--->> LostChase
^-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
As you can see in my comments throughout the Event sheet, I will also have it set to where the Pathfinding behavior for each instance will be on or off to save on the wear-n-tear on the CPU...at least, that's my intent. I'm wondering, too, if doing so actually affects ALL instances or just the one (as in, while using Pick or the For Each loop)...so if someone could clue me in if I'm mistaken about that.
But, when you run the "Layout Level 1" layout, you'll see that the Enemies are awfully lethargic. I did have this working at one point...but apparently I "fixed" it too much. The Enemies don't respond to the test conditions; at best the LOSobject changes color as it should so I at least know that that much is working.
Can anyone see what I'm missing?