[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. ;)
 
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.
Back
Top