• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Torch Vision System

Status
Not open for further replies.
Level 17
Joined
Nov 26, 2007
Messages
1,964
Alright, this is something I haven't been able to figure out how to do without using a "Every X seconds of game time" check.

Basically what I need is that whenever a unit comes within sight radius of a unit with a "Torch" item, they share vision with the torch bearer so that they get their sight radius. Logically this means that I should be able to see farther when I'm next to someone carrying a torch.

This is because night radius in my map is ridiculously low, and shared vision is off for all players. Purpose of this spell is when X unit comes near Y unit, condition being Y unit has a torch item, then X unit is granted vision of Y unit until he leaves Y unit's sight radius again. (Doesn't have to actually make the player share vision since that would apply to all of his units. Maybe something like Faeire Fire that only grants vision of the unit?)

Sight radius is around 1000-ish, but it shouldnt really matter as I should be able to modify it if necessary.

I suppose this would be difficult to accomplish in GUI without a lot of lag (Which is what I use...)

Thanks to anyone in advance.

Note that while MUI is preferable , if you can only do it MPI I'll make do.
 
no that would never work. You need to use group system.
Trigger 1
event Unit aquiers an item.
condition Item Manipulated equal to torch.
action add unit to torchers(this is a unit group).

Trigger 2
event Unit loses an item.
condition Item Manipulated equal to torch.
action remove unit from torchers(this is a unit group).

Trigger 3 includes every x seconds of game time so what you are asking is VERY IMPOSSIBLE.

warcraft saves handels of units and uses them in triggering. Without proper trigger to summon those handles like periodic event or smth like that. Warcraft cannot identify which unit to use in triggers if you do not let warcraft refresh itself. Only option here is to give torch to one unit ONLY. Personaly if I see anyone solving you problem without periodic event i will rep them. Oh and periodic events ARE smart idea. WAITS are MUI killers.
 
Level 17
Joined
Nov 26, 2007
Messages
1,964
no that would never work. You need to use group system.
Trigger 1
event Unit aquiers an item.
condition Item Manipulated equal to torch.
action add unit to torchers(this is a unit group).

Trigger 2
event Unit loses an item.
condition Item Manipulated equal to torch.
action remove unit from torchers(this is a unit group).

Trigger 3 includes every x seconds of game time so what you are asking is VERY IMPOSSIBLE.

warcraft saves handels of units and uses them in triggering. Without proper trigger to summon those handles like periodic event or smth like that. Warcraft cannot identify which unit to use in triggers if you do not let warcraft refresh itself. Only option here is to give torch to one unit ONLY. Personaly if I see anyone solving you problem without periodic event i will rep them. Oh and periodic events ARE smart idea. WAITS are MUI killers.

I'm sure it's possible, I've seen an "Aura Caster System" done in vJass where you can create custom auras and stuff by detecting when a unit is under the effect of an aura and when it leaves it (I could just add an aura to the torch and use that)

Too bad I can't use vJass!

But yeah, I did a periodic event. It's MPI, that'll have to do I suppose.
 
I'm sure it's possible, I've seen an "Aura Caster System" done in vJass where you can create custom auras and stuff by detecting when a unit is under the effect of an aura and when it leaves it (I could just add an aura to the torch and use that)

Too bad I can't use vJass!

But yeah, I did a periodic event. It's MPI, that'll have to do I suppose.

Yes but you need periodic events to detect. I am hundered percent positive. You simply need to use. I see no other way. If there is another way it would be a breakthrough in triggering.
 
Status
Not open for further replies.
Top