Changing a units vision field to a cone

ROTS19

TH.net Regular
Reaction score
12
Is there a way to change a unit's vision field to make it a cone facing the same direction as a unit?
 

tom_mai78101

The Helper Connoisseur / Ex-MineCraft Host
Staff member
Reaction score
1,703
No you can't, in a direct way.

But you can try using triggers to determine if there's an object within (the direction of the unit's facing (degrees) +10%).

I don't know if that works, but logically, it should.
 

MasterOfRa

New Member
Reaction score
10
I think you could possibly make a behavior that periodicly makes a visibility modifier offset by the modifiers radius, That would make it a circle however.
 

alt bringer

New Member
Reaction score
3
im not sure if it works this way but you can make a behavior find the
behavior - modification+ line
right-click choose modify

a window should pop up, click the unit tab

set detection arc probably between 45 and 180 wich should make field of vision a cone
180 would be half circle

hope it works

note youll have to modify the detection filter or unit will have the "detection ability"
(detection is set up the same way, as a behavior, and not an ability as many think it would be)
 

eXirrah

New Member
Reaction score
51
Did someone managed to solve this problem?
I'd like to know how you did it.

The only way I was able to change a unit's vision pattern is by adding a
behavior of type buff that periodically activates a persistent effect,
that is periodical too and that activates a number of persistent effects
that spawn visibility with XY offset infront of the unit.

In other words I created a behavior that creates 3 well placed circles
of visibility with 3 radius in front of the unit every 0.04 seconds, that
last 0.04 seconds, and it looks like if the unit can see only what's in
front of it.
Of course I had to set the unit's sight range to 2.

If someone has a better solution please share.

I couldn't make the thing with the detection work....
The unit still had 360 degrees vision...
no matter the arc
 

Dan

The New Helper.Net gives me great Anxiety... o.O;;
Reaction score
159
Did someone managed to solve this problem?
I'd like to know how you did it.

The only way I was able to change a unit's vision pattern is by adding a
behavior of type buff that periodically activates a persistent effect,
that is periodical too and that activates a number of persistent effects
that spawn visibility with XY offset infront of the unit.

In other words I created a behavior that creates 3 well placed circles
of visibility with 3 radius in front of the unit every 0.04 seconds, that
last 0.04 seconds, and it looks like if the unit can see only what's in
front of it.
Of course I had to set the unit's sight range to 2.

If someone has a better solution please share.

I couldn't make the thing with the detection work....
The unit still had 360 degrees vision...
no matter the arc

What you did works...no? That is kind of the definition of solving a problem... XD unless you have a problem with how you did it or just want to do it differently.
 

eXirrah

New Member
Reaction score
51
Well it is not changing the unit's vision to a cone, but revealing the fog
of war infront of a unit, which is different.

If I walk to a wall the unit should not be able to see behind the wall.
With my solution, the behavior removes the fog of war behind the wall
and the unit is able to see through walls.

So what I did is just a buggy low-end solution.
Plus if I do it for a lot of units for 10-12 players I'm afraid that this
constant loop with period of 0.04 will make the game lag.

EDIT:
I don't understand how Search Area effects work. Is there any way to
combine Search Area and Flare effects so that Flare reveals the area in
a cone? That can solve the problem.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top