• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

common.j AI functions...

Status
Not open for further replies.
Level 17
Joined
Jul 1, 2010
Messages
721
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