GE Lua Documentation

Press F to search!

onAiModeChange

Definition


-- @/lua/ge/main.lua:775

function onAiModeChange(vehicleID, newAiMode)
  extensions.hook('onAiModeChange', vehicleID, newAiMode)
end

Callers

@/lua/vehicle/ai.lua
    if M.mode ~= mode then -- new AI mode is not the same as the old one
      obj:queueGameEngineLua('onAiModeChange('..objectId..', "'..mode..'")')
    end
  if newState.mode and newState.mode ~= M.mode then -- new AI mode is not the same as the old one
    obj:queueGameEngineLua('onAiModeChange('..objectId..', "'..newState.mode..'")')
  end