• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Trigger sight radius

Status
Not open for further replies.
Level 5
Joined
Jun 21, 2013
Messages
116
I made vampire race on my map and made the turn ability that basically charms an enemy and gives it bonus vampire abilities.

However, I need just one little detail for it to be finished.
I would need to modify sight radius to 800 during the day and 1800 during the night. Any idea on how to do it?
 
Level 5
Joined
Jun 21, 2013
Messages
116
in the object editor there are 2 fields "Sight radius - day" and "Sight radius - night"
not sure if they were called Exactly this way, but you can't confuse them with anything else.

I am aware of that. However, let's say I turn a Footman to a Vampire. I'd like him to have 800 vision during the day and 1800 during the night, but I don't want to change all Footmen, just the turned one.
 
Level 12
Joined
May 22, 2015
Messages
1,051
That would be too complicated because I would have to copy every single unit, make a trigger which would run through every unit type and find its pair. It would be an enormous usage of memory.

You could at least link the units to each other in a hashtable so it doesn't have to do a linear search to see what it should transform into.

However, it would still be a lot of units to create, and it would be annoying to maintain (update a unit's stats, you have to make the same updates to its vampire version - pain in the ass and you might get some numbers wrong - those would also be painfully difficult to spot).

This Bonus Mod library might help:
http://www.hiveworkshop.com/forums/graveyard-418/system-bonus-mod-setunitmaxstate-65622/

There is a sight range stat you can play with, it seems. You'd have to do some triggering to make the sight range change during night and day, though. It might turn out to be easiest to trigger sight range changes for all your units all the time.

Seems like a tough problem.
 
Level 23
Joined
Feb 6, 2014
Messages
2,466
If you don't want to use BonusMod, there's an ability called 'Goblin Night Scope' that alters the sight radius of a unit. It can have negative value. So if the unit's sight radius is 1800/800 and you want it to become 800/1800, you can try creating an ability based on Goblin Night Scope that gives -1000 sight radius during day and +1000 sight radius during night.
 
Level 8
Joined
Jan 28, 2016
Messages
486
Correct me if I'm wrong but I'm pretty sure that the Item Sight Range Bonus ability affects both day and night vision, which is the same ability used in the Bonus Mod system.

Edit: I just understood what you guys (Saus and Flux) were on about... lol this is what I get for late-night reading. That's an ingenious solution you got there.
 
Status
Not open for further replies.
Top