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

Natives from common.ai

Status
Not open for further replies.
Hmm, indeed not much as for whole .ai file
Thanks all, +rep
native GetUnitGoldCost takes integer unitid returns integer
native GetUnitWoodCost takes integer unitid returns integer
just made some tests, it works fine but crashing the game for heroes, so it can be used for regular units only
// these natives will copy values from Object Editor fields "Gold Cost", "Lumber Cost", "Build Time"
// do NOT use for heroes! *it will crash a game*

I found this one works ok
native GetPlayerUnitTypeCount takes player p, integer unitid returns integer
//counts only alive units/heroes/structures
//counts also units during training; also counts buildings under construction
//counts building during upgrade (like upgrade town hall-->keep in progress, counts as keep)
//counts also heroes during revieving

btw
223791-albums8824-picture107766.jpg

how can I make this line on forum, so it looks like in WorldEditor, it has white background, coloured natives, etc
 
Last edited:
Status
Not open for further replies.
Top