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

[General] how is this in script?

Status
Not open for further replies.
  • Custom script: call UnitAddAbility(GetTriggerUnit(), 'Aloc')
How do yo u write (target of ability being cast) in this?

  • Custom script: call UnitAddAbility(GetSpellTargetUnit(), 'Aloc')
In general, if you're ever unsure how to refer to something in a custom script, just use a variable. As long as the types match up, and as long as you can spell the variable name correctly, it'll work just fine:
  • Set TempUnit = (Target unit of ability being cast)
  • Custom script: call UnitAddAbility(udg_TempUnit, 'Aloc')
That way, you can avoid having to look it up. ;)
 
Level 5
Joined
Feb 22, 2013
Messages
161
Picked unit is:

  • Custom script: call UnitAddAbility(GetEnumUnit(), 'Aloc')
If you want matching unit it is:

  • Custom script: call UnitAddAbility(GetFilterUnit(), 'Aloc')
 
Status
Not open for further replies.
Top