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

[Solved] Hey guys, is there a way to actually set triggering unit?

Status
Not open for further replies.
Level 13
Joined
Oct 10, 2009
Messages
439
Or various other hard coded units?

I'm using a damage detection system and for the life of me I cannot work out how to use the damageeventsource unit for a unit handle in the hashtable, I don't even get the option in the variable list!

But, I do have an option for the triggering unit, so I'm wondering if its possible to set enumunit = udg_DamageEventSource or something like that
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
JNPG has some issues with Hashtables Keys and stuff. You have to jass it, or do it in regular World editor and then turn to JNPG again.

You can use
Custom Script: set udg_IntegerGlobalVariable = GetHandleId(udg_DamageEventSource)

That will store the Handle Id of the DamageEventSource into the integer variable. After that you can work with IntegerGlobalVariable as you do with any other variable type in GUI (Graphic User Interface).
 
Status
Not open for further replies.
Top