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

common.j AI functions...

Status
Not open for further replies.
Level 17
Joined
Jul 1, 2010
Messages
720
Those natives and/or functions that work in both types of scripts...*.j and *.ai. There's got to be a list somewhere. Example:
JASS:
local group g = CreateGroup()
- Works in both type of scripts...
JASS:
GetAiPlayer()
- Works only in AI scripts...
JASS:
call CreateNUnitsAtLoc( 1, 'hfoo', Player(0), GetRectCenter(GetPlayableMapRect()), bj_UNIT_FACING )
- Works only in *.j scripts...What's not to understand ? Doesn't anybody know ? I really need this...
 
There is no list of what you can use in AI scripts. I think it is fine to use both common.j and common.ai since I've seen them used before.

However, the only person I saw use AI scripts before was AIAndy. It really depends on when it is being executed. If you need to, you can always store data in a gamecache to communicate with your map's script. (for whatever reason)

More importantly, what exactly are you trying to do with .ai scripts?

... Unless you are just trying to use AI functions in normal scripts. Then you can use native declarations (link) to use whichever ones you want. However, it is not guaranteed to work ingame. There is only a small handful of useful ai functions anyway.
 
Status
Not open for further replies.
Top