SetVehicle Property

Usage:
   Ai.SetVehicle number name

Argument values:

argument 1:    range is 0 to 3
argument 2:    Boat, Infantery, Plane, Tank

This property is not a part of any defined type of object.

Used in one .con file: ai/Behaviours.con

Example: (from ai/Behaviours.con)
   rem *** Set number of behaviours and id/name mappings ***
   Ai.SetNBehaviours 6
   Ai.SetBehaviour 0 Avoid
   Ai.SetBehaviour 1 MoveTo
   Ai.SetBehaviour 2 Idle
   Ai.SetBehaviour 3 Fire
   Ai.SetBehaviour 4 Roam
   Ai.SetBehaviour 5 Scout
   rem *** Set number of vehicles and id/name mappings ***
   Ai.SetNVehiclesTypes 4
   Ai.SetVehicle 0 Tank
   Ai.SetVehicle 1 Plane
   Ai.SetVehicle 2 Boat
   Ai.SetVehicle 3 Infantery
   rem *** Construct unit weights ***
   Ai.CreateBehaviourModifiers UnitWeights
   Ai.SetBehaviourModifier Avoid 1.0
   Ai.SetBehaviourModifier MoveTo 1.0
   Ai.SetBehaviourModifier Idle 1.0
   Ai.SetBehaviourModifier Fire 1.0
   Ai.SetBehaviourModifier Roam 1.0
   Ai.SetBehaviourModifier Scout 0.75
   rem *** Set basic weights for bot behaviour ***
   Ai.SetBasicBotWeights UnitWeights
   rem ************************* Vehicle behaviour setup ******************************
   rem *** Tank Behaviour setup ***
   Ai.SetVehicleBehaviour Tank Avoid AvoidCollision2d 1 0
   Ai.SetVehicleBehaviour Tank MoveTo GotoWaypoint2d 4 0
   Ai.SetVehicleBehaviour Tank Idle Idle2d 5 0
   Ai.SetVehicleBehaviour Tank Fire Fire2d 4 0
   Ai.SetVehicleBehaviour Tank Scout Scout 8 0
   Ai.AddInterpreterEntry Tank TankMoveTo
   Ai.AddInterpreterEntry Tank TankMoveToDirection
   Ai.AddInterpreterEntry Tank TankMoveToObject
   Ai.AddInterpreterEntry Tank Trigger
   Ai.AddInterpreterEntry Tank TriggerContinously
   Ai.AddInterpreterEntry Tank MouseTurretAimAt
   Ai.AddInterpreterEntry Tank TankResetControls
   Ai.AddInterpreterEntry Tank MouseTurretLookAt
   Ai.AddInterpreterEntry Tank Sense
   rem *** Plane Behaviour setup ***
   Ai.SetVehicleBehaviour Plane Avoid AvoidCollision3d 1 0
   Ai.SetVehicleBehaviour Plane MoveTo GotoWaypoint3d 4 0
   Ai.SetVehicleBehaviour Plane Idle Idle3d 5 0
   Ai.SetVehicleBehaviour Plane Fire Fire3d 4 0
   Ai.SetVehicleBehaviour Plane Roam Roam3d 6 0
   Ai.AddInterpreterEntry Plane PlaneMoveTo
   Ai.AddInterpreterEntry Plane PlaneMoveToDirection
   Ai.AddInterpreterEntry Plane PlaneMoveToObject
   Ai.AddInterpreterEntry Plane Trigger
   Ai.AddInterpreterEntry Plane TriggerContinously
   Ai.AddInterpreterEntry Plane PlaneAimAt
   Ai.AddInterpreterEntry Plane PlaneResetControls
   rem *** Boat Behaviour setup ***
   Ai.SetVehicleBehaviour Boat Avoid AvoidCollision2d 1 0
   Ai.SetVehicleBehaviour Boat MoveTo GotoWaypoint2d 4 0
   Ai.SetVehicleBehaviour Boat Idle Idle2d 5 0
   Ai.SetVehicleBehaviour Boat Fire Fire2d 4 0
   Ai.AddInterpreterEntry Boat BoatMoveTo
   Ai.AddInterpreterEntry Boat BoatMoveToDirection
   Ai.AddInterpreterEntry Boat BoatMoveToObject
   Ai.AddInterpreterEntry Boat Trigger
   Ai.AddInterpreterEntry Boat TriggerContinously
   rem *** Infantery Behaviour setup ***
   Ai.SetVehicleBehaviour Infantery Avoid AvoidCollision2d 1 0
   Ai.SetVehicleBehaviour Infantery MoveTo GotoWaypoint2d 4 0
   Ai.SetVehicleBehaviour Infantery Idle Idle2d 5 0
   Ai.SetVehicleBehaviour Infantery Fire Fire2d 4 0
   Ai.SetVehicleBehaviour Infantery Roam Roam2d 8 0
   Ai.AddInterpreterEntry Infantery InfanteryMoveTo
   Ai.AddInterpreterEntry Infantery InfanteryMoveToDirection
   Ai.AddInterpreterEntry Infantery InfanteryMoveToObject
   Ai.AddInterpreterEntry Infantery Trigger
   Ai.AddInterpreterEntry Infantery TriggerContinously
   Ai.AddInterpreterEntry Infantery MouseTurretAimAt
   Ai.AddInterpreterEntry Infantery InfanteryResetControls
   rem ********************************* Test ********************************
   Ai.CreateBehaviourModifiers MoveToMods
   Ai.SetBehaviourModifier Avoid 1.0
   Ai.SetBehaviourModifier MoveTo 2.0
   Ai.SetBehaviourModifier Idle 0.1
   Ai.SetBehaviourModifier Fire 1.0
   Ai.SetBehaviourModifier Roam 0.5
   Ai.SetBehaviourModifier Scout 1.0


Go to the Ai properties list page, Ai page, All Properties list, or Main scripting page.