How to detect when a unit is in another units sight range?

shinami

Redirect your complaints to the nearest wall
Reaction score
47
This just came up in my mind. How to detect when a unit is in someones sight range? I'm betting that still doesn't explain much..

Basically what i want with this is say a computer controlled enemy unit is patrolling and while patrolling it comes across the enemy camp/base. So i want to know how can i detect when a unit is able to see the enemy base, in other words when is it in the units field of vision? +rep for help.
 

Emu.Man00

New Member
Reaction score
41
Dont think theres an event for that, but what you can do is give him an aura with the same range as his sight range, and check for when somebody gains the aura
 

shinami

Redirect your complaints to the nearest wall
Reaction score
47
Unit aquisition range? Or set a trigger to attack within range of X?

As far as i recall, unit acquisition range is the range which the unit needs in order to begin attacking auto, that is to say "lock on" to the target. And i don't want it to attack.

@Emu

Guess that will work, but it will be a pain in the ass to make a bunch of auras for every units sight range, so I'm still waiting for more suggestions.
 

shinami

Redirect your complaints to the nearest wall
Reaction score
47
Unit - Unit within range - i will still need to create separate triggers for each unit.. Well, guess I'll have to go with that for now, still open for suggestions tho. Anyway, thanks tho.
 

Faust

You can change this now in User CP.
Reaction score
123
Modifying a 'generic unit takes damage event system' can ease that pain, I think.
 

Tom Jones

N/A
Reaction score
437
If the unit is patrolling, it'll automatically attack the enemy base, so you could use the specific unit event Unit - *Some Unit* Aquires a target.
 

bOb666777

Stand against the ugly world domination face!
Reaction score
117
If the unit is patrolling, it'll automatically attack the enemy base, so you could use the specific unit event Unit - *Some Unit* Aquires a target.

Not necessarily, if the unit's sight range is bigger than it's acquisition range, it won't.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top