Detect invisible units only in front of hero? (MPU)

MP®

Member
Reaction score
11
I'm looking for some way to detect invisible units, but only those who are in front of a hero.

I thought about a trigger that creates a dummy unit at Position of hero with polar offset (hero facing angle) of about 500 (so it is in front of the hero) with the True Sight ability (500 range) but without own sight every 0.xx seconds.

This might work, but creating a dummy unit multiple times per second PER HERO makes the game very slow... I tried it with every 0.50 sec and the game lagged like hell..

So is there maybe another way to do this?

Is there a way to 'detect' an enemy unit with triggers btw? Without disabling its invisibility ability? Then it shouldn't be too hard (just pick units in region of point and make them 'detect' by player X)
 

jnZ

I
Reaction score
64
periodically create a region infront of the hero and remove invisibility-like abilitys from units inside of it? Add the abilities again after a short wait.
 

MP®

Member
Reaction score
11
periodically create a region infront of the hero and remove invisibility-like abilitys from units inside of it? Add the abilities again after a short wait.

Thnx for your reply, but I'll quote myself:

"Without disabling its invisibility ability? "

Otherwise other players will see them as well..
 

jnZ

I
Reaction score
64
woops looks like i totally overlooked that. other than that i see no way of doing it. the solution with the truesight-unit spawning infront of it is most likely the only one.
if it causes to much lag you might want to adjust your ability? like instead of making units infront of the hero visible for a duration, place like a lantern infront of him that detects invisible units? the lantern could always move infront of the hero. Either moving regularly or instantly.

Well i guess if the lantern itself had no model and the locust ability it would have exactly the effect you wanted but dunno if that causes lag aswell.
 

Inflicted

Currently inactive
Reaction score
63
Yeah what jnZ is trying to say is simply put a Dummy unit infront of the unit with True Sight or another of those reveling abilities.

Is this permanent or activatable?
If its activated, you should just leave it there and add an expiration timer.
If its permanent or needs to move when the hero moves, just periodically reposition it to be infront of the unit every 0.3 seconds for example.
 

MP®

Member
Reaction score
11
It is permanent.

But you're right! I should just move it instantly to the point, instead of creating a new one every 0.xx seconds! Thanks I think this will do the job!
 

Inflicted

Currently inactive
Reaction score
63
One thing to be careful of though, I'm not exactly sure if the fade time will be like normal vision in that if you spin you will have vision in all directions for almost a second.

But yeah, worth a try.
 

MP®

Member
Reaction score
11
Oh well that's not a big deal.

I tried to make it within a very complicated trigger I made, but I failed.. Dunno why, but I'll try it by creating a new trigger..

=edit=
Ok made it with a new trigger now and it works PERFECTLY! thank you all!
 
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