• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[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