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.
You probably will need to use several smaller revealing searches used by a Create Persistent effect that validates the points at offsets and has the Failure flag enabled.
Have you tried messing with the reveal flags?
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
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.
Hi Everyone,
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.
Does anyone have any insights or ideas?
You probably will need to use several smaller revealing searches used by a Create Persistent effect that validates the points at offsets and has the Failure flag enabled.
Have you tried messing with the reveal flags?
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
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.
Thanks
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.
In reply to ProfessorTerrible:
In reply to dldydgus95:
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.
I hope this helps. It is just from memory.
In reply to ProfessorTerrible:
Don't apologize for questions, I'm just not sure how helpful I can be.
I've looked again for the map I did it on but it really seems to have gone walkabout on me.
I'll see if I have any luck replicating it in a new one, if so I'll screenshot the trigger and post it here.
In reply to ProfessorTerrible: