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

[AI] How to reference a unit from melee AI script

Status
Not open for further replies.
Level 4
Joined
Nov 23, 2007
Messages
113
In the melee AI scripts, you have access to units in general by their ID. Is there any way to convert that ID (ie. obtain) to a "unit" type for use in other functions?

For example, is there a way to reference your hero as a unit instead of simply hero_id ?

I've even tried using GroupEnumUnitsOfPlayer(g, ai_player, filterFunc) but the filter function is never called leading me to assume it is not detecting any units.

Any help would be greatly appreciated.
 
Status
Not open for further replies.
Top