Current doc is using info from BFME2 only.
Standard LUA functions available
base_funcs
_ALERT
_ERRORMESSAGE
call
collectgarbage
copytagmethods
dofile
dostring
error
foreach
foreachi
gcinfo
getglobal
gettagmethod
globals
newtag
next
print
rawget
rawset
rawgettable
rawsettable
setglobal
settag
settagmethod
tag
tonumber
tostring
type
assert
getn
sort
tinsert
tremove
tokens
and
break
do
else
elseif
end
for
function
if
local
nil
not
or
repeat
return
then
until
while
true
false
'0'
..
...
==
>=
<=
~=
'0'
'0'
<eof>
mathlib
abs
sin
cos
tan
asin
acos
atan
atan2
ceil
floor
mod
frexp
ldexp
sqrt
min
max
log
log10
exp
deg
rad
random
randomseed
event
gettable
settable
index
getglobal
setglobal
add
sub
mul
div
pow
unm
lt
concat
gc
function
le
gt
ge
iolibtag
appendto
closefile
flush
openfile
read
readfrom
seek
write
writeto
strlib
strlen
strsub
strlower
strupper
strchar
strrep
ascii
strbyte
format
strfind
gsub
iolib
_ERRORMESSAGE
clock
date
debug
execute
exit
getenv
remove
rename
setlocale
tmpname
dblib
getlocal
getinfo
setcallhook
setlinehook
setlocal
deprecated - unusable, code to handle them is removed in EA's fork
foreachvar
nextvar
rawgetglobal
rawsetglobal
typenames
userdata
nil
number
string
table
function
catnames
all
collate
ctype
monetary
numeric
time
Game Functions
Internal Events
OnDamaged
OnDestroyed
OnArrived
OnUnitEntered
OnUnitExited
OnTeamEntered
OnTeamExited
OnTeamDestroyed
BeScary
DamageIncoming
OnAflame
OnQuenched
OnCreated
OnBuildingComplete
OnSlaughtered
OnGenericEvent
OnBuildVariation
Functions For Object Definitons
_ALERT
GetFrame
CurDrawableModelcondition
CurDrawableObjectStatus
CurDrawableShowSubObject
CurDrawableHideSubObject
CurDrawableShowSubObjectPermanently
CurDrawableHideSubObjectPermanently
CurDrawableHideModule
CurDrawableShowModule
CurDrawablePrevAnimationState
CurDrawablePrevAnimation
CurDrawableGetCurrentTargetDistance
CurDrawableGetCurrentTargetHeight
CurDrawableGetCurrentTargetBearing
CurDrawablePrevAnimFraction
CurDrawableSetTransitionAnimState
CurDrawableAllowToContinue
CurDrawablePlaySound
CurDrawableIsCurrentTargetKindof
GetClientRandomNumberReal
Native Functions
_ALERT
GetFrame
EvaluateCondition
ExecuteAction
ObjectDescription
ObjectSpy
ObjectDispatchEvent
ObjectBroadcastEventToEnemies
ObjectBroadcastEventToAllies
ObjectBroadcastEventToCivilians
ObjectBroadcastEventToUnits
HordeBroadcastEventToMembers
ObjectTeamName
ObjectPlayerSide
ObjectCapturingObjectPlayerSide
ObjectTemplateName
ObjectTestModelCondition
ObjectTestCanSufferFear
ObjectCountNearbyEnemies
ObjectEnterFearState
ObjectEnterRunAwayPanicState
ObjectEnterCowerState
ObjectEnterUncontrollableCowerState
ObjectEnterAlertState
ObjectEnterRampageState
ObjectPlaySound
ObjectSetChanting
ObjectSetFearFactor
ObjectSetEnragedState
ObjectDoSpecialPower
ObjectCreateAndFireTempWeapon
ObjectHasUpgrade
ObjectGrantUpgrade
ObjectRemoveUpgrade
ObjectSetDelayedDeath
ObjectHideSubObject
ObjectHideSubObjectPermanently
ObjectSetGeometryActive
ObjectChangeAllegianceFromNonPlayablePlayer
GetRandomNumber
ObjectForbidPlayerCommands