common.j AI functions...

Not open for further replies.
Level 17
Jul 1, 2010
Those natives and/or functions that work in both types of scripts...*.j and *.ai. There's got to be a list somewhere. Example:
local group g = CreateGroup()
- Works in both type of scripts...
- Works only in AI scripts...
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 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.
Not open for further replies.