• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Problem with "unit comes within x of unit"

Status
Not open for further replies.
Level 1
Joined
Nov 24, 2013
Messages
2
Hi!

I hope this is the right forum section...

So I'm trying to deal damage to any unit that comes close to another unit, that is specified through a variable. But for some reason I can't pick the variable in the drop-down menu, although I've used the same variable for other triggers.

I only get really strange options that come with the World Editor Unlimited.

Can someone help me out?


Regards

Taer
 

Attachments

  • UnitWithin.jpg
    UnitWithin.jpg
    90.4 KB · Views: 158
It does not offer a variable because the event would not refer to a variable and rather to the current value behind the variable when the event is created. And since events which are defined in the GUI event block are created on map init, the initial value should be known to you.
 
Only StarCraft II has an idea of a unit reference which can be passed to events allowing you to change the subject of them during run time. WC3 you need to create new event objects every time you want to change the event subject and the only way to destroy event objects is to destroy the attached trigger (and probably rebuild it so it works again).

It should be noted that the unit enters/leaves X distance of unit event will stop the subject from emitting any auras. This is a WC3 limitation as it must hook the event to the same parts of the unit as auras must in-order to operate and so they cannot co-exist.
 
Thanks guys, that really did help me and now it works as it should. A little side-question though. Do I have to remove that action now? Since otherwise it would add the event to the other trigger every time the trigger is fired.

And concerning me using WEU. If I download JNGP now, can I still open the map I've been working on until now? I put in quite a lot of work and wouldn't wanna lose it.


Regards
 
Status
Not open for further replies.
Back
Top