Delete page "Mission-Script-API"
parent
74aed518ce
commit
4fbac1b33c
@ -1,46 +0,0 @@
|
|||||||
# Mission Script API — Documentation
|
|
||||||
|
|
||||||
This folder documents the API available to mission scripts. Mission scripts derive from `AMission` and are loaded by the game at runtime.
|
|
||||||
|
|
||||||
Mission scripts also use additional types such as `LimbNames`, `NamedDamageTypes`, `Point2d`, and `Point3d`; those are summarized in [external-types](external-types).
|
|
||||||
|
|
||||||
## How mission scripts are loaded
|
|
||||||
|
|
||||||
1. The game loads a **battle** (one `ABattle` instance) via `IScriptRemote.loadBattleScript`.
|
|
||||||
2. Missions are attached with `loadMissionScript(fileName, missionNumber, scriptFileName)`, which instantiates a class named `Mission` that inherits from `AMission`.
|
|
||||||
3. Each mission’s `Init(battle, missionNumber)` is called; then the battle runs and invokes the mission’s virtual `On*` methods in response to game events.
|
|
||||||
|
|
||||||
## Documentation index
|
|
||||||
|
|
||||||
### Core
|
|
||||||
|
|
||||||
| Document | Description |
|
|
||||||
|----------|-------------|
|
|
||||||
| [01-mission-and-battle](01-mission-and-battle.-) | **AMission**, **ABattle**, **IBattle**, **DoTimeout** |
|
|
||||||
| [02-gameplay](02-gameplay) | **IGamePlay** — main interface to the game (actors, HUD, triggers, section files, etc.) |
|
|
||||||
| [03-time-and-difficulty](03-time-and-difficulty) | **ITime**, **DifficultySetting** |
|
|
||||||
| [04-player](04-player) | **Player** |
|
|
||||||
| [05-events-and-section-file](05-events-and-section-file) | **GameEventId**, **ISectionFile** |
|
|
||||||
| [06-pathfinding-and-terrain](06-pathfinding-and-terrain) | **RecalcPathState**, **PathType**, **LandTypes**, **IRecalcPathParams**, **ActorName** |
|
|
||||||
| [07-script-loading](07-script-loading) | **IScriptRemote**, **ScriptRemote** |
|
|
||||||
| [external-types](external-types) | Additional types used by missions (limbs, damage, geometry) |
|
|
||||||
|
|
||||||
### World
|
|
||||||
|
|
||||||
| Document | Description |
|
|
||||||
|----------|-------------|
|
|
||||||
| [world-README](world-README) | Index of world types |
|
|
||||||
| [world-01-actor-hierarchy](world-01-actor-hierarchy) | **AiActor**, **AiPerson**, **AiCart**, **AiGroup**, damage types, **CrewFunction** |
|
|
||||||
| [world-02-air](world-02-air) | **AiAircraft**, **AiAirGroup**, air waypoints, enums, **EnemyAirInterf** |
|
|
||||||
| [world-03-ground](world-03-ground) | **AiGroundActor**, **GroundStationary**, buildings, bomb explosion, enums |
|
|
||||||
| [world-04-triggers-spawns-targets](world-04-triggers-spawns-targets) | **AiTrigger**, **AiAction**, **AiBirthPlace**, **AiAirport**, **AiTarget**, **Regiment** |
|
|
||||||
| [world-05-time-and-user-labels](world-05-time-and-user-labels) | **ITime** (cross-link), **GPUserLabel**, **GPUserIconType** |
|
|
||||||
|
|
||||||
## Quick start
|
|
||||||
|
|
||||||
1. Create a class `Mission` that inherits from `AMission`.
|
|
||||||
2. Override `OnBattleInit`, `OnBattleStarted`, and any `On*` events you need (e.g. `OnTrigger`, `OnActorCreated`, `OnAircraftKilled`).
|
|
||||||
3. Use `GamePlay` (IGamePlay) for querying actors, triggers, spawning groups, HUD messages, and section files.
|
|
||||||
4. Use `Time` (ITime) for game time and tick conversion (e.g. with `Timeout`).
|
|
||||||
|
|
||||||
Reference the API documented here when building your mission script project.
|
|
||||||
Loading…
x
Reference in New Issue
Block a user