I'm trying to create a rudimentary stealth game just to see if I can, really. The enemies have been the focal point of my issues. They work as follows: An invisible line connecting the Player and the Enemy objects. If the line is overlapping a wall or shadows, or if the player is overlapping shadows, the enemy stays put. However, if none of those things are true, the enemy will charge at you. Stepping back into the shadows will stop them.
This is how it would work ideally, anyways.
The enemy does charge at you, but only if you're not standing in shadows - whether or not there's a wall in the way doesn't matter. My events for handling this are as follows:
(Negated) Line is overlapping Wall
(Negated) Line is overlapping Shadows
(Negated) Player is overlapping Shadows
-> Set Spotted (the AV that controls whether the enemy attacks or not) to 1
Line is overlapping Wall
Line is overlapping Shadows
Player is overlapping Shadows
-> Set Spotted to 0
So far as I can tell, this should work. However, it will not. Any ideas on this?
Also, if I have more than one enemy, each with their own line, the enemies will not work because at least one of them always has a line in the shadows. For some reason, despite spreading values, MMF2 thinks that each line is the same object. My events are the same as above.
I will of course provide more details if needed, and thanks in advance!