So for my map I'm trying to make it so that my enemy units will only attack units in their line of site (anything in say a 160 degree angle in front of them. That way you could sneak up behind them and not be detected until you shoot them. I've tried changing everything it seems in the data editor and have had no luck. :S
Make the player unit cloaked, give the guards detection and set their detection arc to 60 or so, that should prevent them from detecting cloaked units that aren't in front of them. That's by far the simplest way to do it.
my map uses this system without cloaks. you just make it where they have to validate a unit with a specific buff and then make an effect that applies the buff to units in fron of them 'cone wise' and the buff only lasts a few seconds but is reapplied faster than it wears off. then youve still got cloak for an ability. this is the best way to do it imo...
make it so their attack has to validate that the buff is applied.
1st step;
make it so enemies apply a buff only to units in front of them in their cone. the duration of the buff is a fraction of a second longer than the periodic duration of how the buff is applied by the cone, so when youre in front of them youve always got the buff, but when youre not it goes away and doesnt hang about.
then make the validator for unit compare behavior count for the buff youve made for greater than or equal to 1 (really only need equal but its doesnt matter)
then atach the made validator to the attacks of the enemies youre using. its a nice system. IMO
Ok so I've created an Effect>Search that applies an Effect>Buff to units in a 160 degree cone. The Buff has a 1 second duration for now. I can't find how to link this to the unit though.
I also created the validator for unit compare behavior count but am stuck here.
make a behavior with a periodic effect of your search. the buff duration lasts forever, and periodic count is -1 (infinity)
then goto your unit and on the behaviors field, add the behavior. then your unit should always be doing the search effect as often as youve set the period duration.
Ok, so I've created a behavior called lineTest which is a buff with duration .11, periodic effect lineOfSightSearch, with a period of .1 and a period count of -1. lineOfSightSearch is a Search Area Effect that applies lineOfSightDebuff to all units in the 160 degrees cone from Source Unit/Point (dunno if this part is correct?). I applied lineTest to my unit, but I still don't get how to make that unit only attack units with the debuff on...
So for my map I'm trying to make it so that my enemy units will only attack units in their line of site (anything in say a 160 degree angle in front of them. That way you could sneak up behind them and not be detected until you shoot them. I've tried changing everything it seems in the data editor and have had no luck. :S
@Atl0s:
Make the player unit cloaked, give the guards detection and set their detection arc to 60 or so, that should prevent them from detecting cloaked units that aren't in front of them. That's by far the simplest way to do it.
@RileyStarcraft:
That sort of works, but is there a way to make it so that I don't have the cloaked animation on my unit?
my map uses this system without cloaks. you just make it where they have to validate a unit with a specific buff and then make an effect that applies the buff to units in fron of them 'cone wise' and the buff only lasts a few seconds but is reapplied faster than it wears off. then youve still got cloak for an ability. this is the best way to do it imo...
@ezbeats:
Could you elaborate more on the validator I'd have to use?
make it so their attack has to validate that the buff is applied. 1st step;
make it so enemies apply a buff only to units in front of them in their cone. the duration of the buff is a fraction of a second longer than the periodic duration of how the buff is applied by the cone, so when youre in front of them youve always got the buff, but when youre not it goes away and doesnt hang about.
then make the validator for unit compare behavior count for the buff youve made for greater than or equal to 1 (really only need equal but its doesnt matter)
then atach the made validator to the attacks of the enemies youre using. its a nice system. IMO
@ezbeats:
Ok so I've created an Effect>Search that applies an Effect>Buff to units in a 160 degree cone. The Buff has a 1 second duration for now. I can't find how to link this to the unit though.
I also created the validator for unit compare behavior count but am stuck here.
make a behavior with a periodic effect of your search. the buff duration lasts forever, and periodic count is -1 (infinity)
then goto your unit and on the behaviors field, add the behavior. then your unit should always be doing the search effect as often as youve set the period duration.
Ok, so I've created a behavior called lineTest which is a buff with duration .11, periodic effect lineOfSightSearch, with a period of .1 and a period count of -1. lineOfSightSearch is a Search Area Effect that applies lineOfSightDebuff to all units in the 160 degrees cone from Source Unit/Point (dunno if this part is correct?). I applied lineTest to my unit, but I still don't get how to make that unit only attack units with the debuff on...