I've created a cove vision behaviour in the data editor that creates a 0.1 second periodic buff that applies a create persistent to a unit that then runs a search area to reveal an arc in front of the unit. The behaviour is working fine, thanks to the advice of members of this community on the discord channel.
I'd like to take one more step in developing this behaviour to fit my current map, specifically id like it to be able to be blocked by objects or doodads that block line-of-sight (such as the doodad LOS Blockers). At the moment the revealer created by the behaviour sees past LOS Blockers and over cliff levels.
My current map is a stealth mission and id like the player's unit to be able to hide behind crates and run past behind an enemy unit without being seen.
I haven't seen an example of this being accomplished before, but the data editor being as powerful as it is, i presume there is some way to accomplish this.
When you say "reveal flags" are you talking about the Unfog/Use LOS/Detect/Radar etc. flags that are in the revealer area? If so, then yes. I have Unfog and Use Line of Sight checked, although I'm not sure what Use Line of Sight really does if its not blocked by LOS Blockers.
I'll toying with your suggestion. I admit I've been avoiding playing with offsets too much because I haven't quite wrapped my head around them yet.
I've managed to fix my problem in the trigger editor rather than the data editor. Thanks to everyone who has provided help.
I'm going to post a description of how I've done it when I have more time.
It allows computer controlled units to see units within a 120 degree arc in front of them within their sight range. It also prevents them from seeing units that they cannot path to in a direct line, thus giving a simulated effect of being able to "hide" behind doodads with pathing footprints.
I had a look and I can't find the actual map file. I can provide a basic description from memory, however.
In the data editor I had reduced the enemy units' vision to 0.
The trigger operates like so:
Event: Periodic Event (every 0.5 seconds I think)
Pick All Units in Unit Group (Unit Group was just all units owned by the enemy player anywhere in the Entire Map) and do:
IF [Distance from Unit to Player Unit without Pathing] <= [Distance From Unit to Player Unit with Pathing]
AND the Player Unit is within a Region (Arc of 180 degrees using the Enemy Unit's Facing)
Create Revealer at the location of the Player Unit for 0.5 seconds.
Else Do Nothing
The logic behind this trigger is that if it would take longer to path to the player than the distance in a straight line then there is likely a doodad or other terrain obstacle in the way and so the revealer won't be created, since they can't see past that doodad.