• 🏆 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!

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

Status
Not open for further replies.
Level 12
Joined
Oct 10, 2009
Messages
438
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