• 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.

I still cant believe This unit has no reference

Status
Not open for further replies.
Level 13
Joined
Mar 24, 2010
Messages
950
I cant believe when using the event (Unit - A unit comes within 400.00 of (some unit))
This unit has no reference.. You can reference the triggering unit getting in that distance but not the unit you get close too..

I think out of everything this is the one thing that annoys me the most with stupid limitations blizzard didn't add something for.
 
Level 13
Joined
Mar 24, 2010
Messages
950
Minus his main problem that apparently there's no handler for the Unit...

exactly.. like all these years and no one at blizzard once thought wow maybe a handler for this unit they get in range of would be nice. I mean common sense o_O

And the work around im using for this is trash.. basically what im doing now is making a temp unit group to check if a unit matching the condition of that unit is in range when this event goes off.. so annoying
 
> work around im using for this is trash..
Well, this is the best way to solve the problem.
No it's not. The best way is to do a periodic "all units in range" check and not using the event.
There is no speed advantage in using that event over "all units in range", as the event basicly is a periodic "all units in range" check over an interval of 0.1 seconds anyway.
 
Level 13
Joined
Mar 24, 2010
Messages
950
No it's not. The best way is to do a periodic "all units in range" check and not using the event.
There is no speed advantage in using that event over "all units in range", as the event basicly is a periodic "all units in range" check over an interval of 0.1 seconds anyway.

is that really true..? all the events in wc3 use time polling for their event checks and not interrupts? lmao so f'ing sad if that is the case..
I was under the impression it was more efficient because it was using interrupts.
 
Level 19
Joined
Mar 18, 2012
Messages
1,716
There is a resource UnitInRangeEvent.
It stores the source unit or it's index on the trigger handle id on a Table.
source = table.unit[GetHandleId(GetTriggeringTrigger())]
source = GetUnitById(table[GetHandleId(GetTriggeringTrigger())])

There is no speed advantage in using that event over "all units in range"
I don't think that is true, I'll run some tests later.
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
is that really true..? all the events in wc3 use time polling for their event checks and not interrupts? lmao so f'ing sad if that is the case..
I was under the impression it was more efficient because it was using interrupts.

Most events react instantly but this one is polled. I do not think it's as effective to do via periodics yourself, simply because the native implementations are faster than jass. You also need to manage a group per unit target because you want to trigger on entering of the range, not permanently while it is in.

Blizzard could improve a lot of obvious stuff if they actually cared about it. I doubt they have taken a second look on the implementations after the game was released. They never have shown any support for mapmaking and when you ask the tech support, they have no idea about the assets and ingame mechanics.
 
Status
Not open for further replies.
Top