How to reduce a unit's sight range temporarily

Hegemuffin

New Member
Reaction score
12
Well? The Object Editor does not allow "Item Sight Range Bonus" to take a negative value, so temporarily giving a unit this ability will not work. Short of replacing the unit with a nearsighted lookalike (which would require a duplicate of every targetable unit featured in the map), are there any other alternatives? I tried various visibility modifiers, but I'm pretty sure that unit sight overrides anything else. The idea of a scope fade filter was tempting, but ultimately unrealistic because the map doesn't use a fixed camera, nor can I ensure that each player only controls one unit (due to summons and stuff). Any ideas or professional opinions would be appreciated.

edit: Oh, and I did just think of one alternative; because the sight reduction is triggering by an ability and because it reduces sight to a fixed value, I could just give every unit on the map the reduced value as a default sight range, then use a periodic event to create visibility modifiers on every unit on the map according to what its sight range should be at day and night, respectively. While this solution is slightly better than using a flamethrower to rid one's walls of termites, I'm ideally searching for a more realistic method.

edit2: Okay, I'm just doing this with a somewhat less messy combination of the two ideas, where every unit has a sight range of 300/300, day/night respectively. When a unit is summoned, created, or whatever, it is given a Sight Range Bonus +1100 ability if it is day or +500 if it is night. Whenever it changes from day to night or night to day, all units on the map have the one ability removed and are given the other. I say slightly less messy because it only involves a trigger at dusk, dawn, when the ability is cast, or when a unit comes into play. So I suppose I answered my own question. That said, I would still like to know if there is an easier way, both for curiosity's sake and for the sake of the community (and because in one, short, swift sentence, I was able to portray myself as a theorist, not a pragmatist, and accordingly reap all the benefits of the intellectual elitism that comes with it :p).
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
Starting all units with an upgraded sight and removing it when needed doesn't sound that bad.


As a general note, if the editor resists, press and hold shift, then double-click the field of interest.
Sometimes though, there's a reason the editor resists. Putting disturbing values where they really shouldn't be may crash the game...
 
N

nidnad

Guest
click allow negative values in your preferences and it will let you.
 

Hegemuffin

New Member
Reaction score
12
AceHart, I am ebullient! Thank you so much for the "shift" tip; it fixed the problem straightaway.

Unfortunately, I had just finished polishing things up with my other idea (which did indeed work without too much hassle), but I think I'm going to do things with the negative value now, as I had originally intended. That way it'll bug me less later when I come back to it and look at how complicated everything was.

//=======================================================//

On a somewhat related note, I do have another question that's sprung up. I guess this will require me to go into somewhat more detail on the spell at hand. Basically, I have an ability called "Dark Arrows," an autocast arrow effect based on Black Arrow that adds x bonus damage to attacks and reduces the target's sight radius to y for z duration. The conflict, if you hadn't already foreseen it, is that Black Arrow does not produce a buff on heroes (and the buff is essential to how I'm triggering the spell; well, it certainly makes things a lot more convenient and produces the best cosmetic effects). Additionally, I already experimented with the allowable targets field, and as far as I am aware, the problem is unrelated.

So anyway, the question is, which arrow effect, if any, would provide the best base for my "Dark Arrows" spell? From what I know, Searing Arrows cannot produce a buff, Cold/Frost Arrows turns the target blue, and Incinerate deals no bonus damage. I did sort of give up on the problem for the night, and I suppose I should give Cold/Frost Arrows a shot in the morning since one of my triggers removes the original buff within .05 seconds and I'm pretty sure the human eye can only register 14 frames per second (so theoretically, you wouldn't consciously notice your hero turning blue). I'm kind of hoping I won't have to resort to mind games, though. :p

Ideas are welcome.
 

Jazradel

Helping people do more by doing less.
Reaction score
102
Poison Arrows maybe?

A human eye can see more than 60 fps but each image will last for roughly 1/25th of a second which is why you only need about 24 fps to make movies/tv appear smoothly.
 

Hegemuffin

New Member
Reaction score
12
Whoa, whaddaya know, there are Poison Arrows :p. I always thought poison was only a passive orb. Thanks for pointing that out (and for the explanation of the human eye; it's nice someone set my facts straight).
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top