1
world
Bruno Carneiro edited this page 2026-02-13 18:25:50 -03:00

World API (maddox.game.world)

Types in maddox.game.world represent actors (air, ground), triggers, spawn points, airports, targets, time, and user labels. Mission scripts get these from IGamePlay (e.g. gpActorByName, gpBirthPlaces, gpGetTrigger) or receive them in AMission event arguments.


Documentation index

Document Description
Actor Hierarchy AiActor, AiPerson, AiCart, AiGroup, AiBridge, AiWayPoint; damage types (AiDamageInitiator, AiDamageTool, DamagerScore, AiLimbDamage); CrewFunction
Air AiAircraft, AiAirGroup, AiAirWayPoint, AiAirEnemyElement; enums IDState, AircraftType, DangerType, AiAirWayPointType, AiAirWayPointGAttackType, AiAirWayPointGAttackPasses, AiAirGroupTask; EnemyAirInterf
Ground AiGroundActor, AiGroundGroup, AiGroundWayPoint, AiAIChief; GroundStationary, GroundBuilding, GroundBombExplosion; AiGroundGroupType, AiGroundActorType; AiAIChiefType
Triggers Spawns And Targets AiTrigger, AiAction; AiBirthPlace; AiAirport, AiAirportType, AiAirportStripState; AiTarget, AiTargetType, AiTargetGoal; Regiment
Time And User Labels ITime (cross-link), GPUserLabel, GPUserIconType

When to use which

  • Actors — Resolve by name with GamePlay.gpActorByName(); check gpActorIsValid(). Use AiActor for position, army, group; AiCart for vehicles/aircraft (places, crew, destroy); AiAircraft for fuel, rearm, damage; AiGroundActor for ground units.
  • Triggers / actionsGamePlay.gpGetTrigger(name), gpGetAction(name). In OnTrigger, get the action and call Do() to run it.
  • Spawns / airportsGamePlay.gpBirthPlaces(), gpAirports() for spawn and airfield data.
  • User labels — Create with GamePlay.gpMakeUserLabel(); draw/delete with gpDrawUserLabel / gpDeleteUserLabel. Use GPUserLabel and GPUserIconType for properties and icon type.
  • Time — Use ITime from Mission.Time or GamePlay.gpTime() (see also Time And Difficulty).