Mission
Runtime mission state machines assignable through mission-valued scripting payloads.
- Engine enum
MissionType- Input form
- Integer
These are the mission states used by live objects. They are separate from the team-script mission opcodes listed under Mapping.
The Do this… team mission is the only script that names one, and what becomes of the state between the script line and the team member belongs to that page. QMove is the one value that never reaches an object as itself, whichever route assigns it.
Four of the states belong to particular kinds of object rather than to objects at large. Repair is a structure servicing what it holds or has docked: a repair bay repairs and reloads the vehicle in radio contact with it, a hospital heals the infantryman it holds, and an armory promotes one instead of healing it. A construction yard answers to the same state with a production animation and nothing more. A vehicle put on Repair finds the repair bay named in the rules and switches itself to Enter. Missile is a structure’s launch sequence — a missile silo’s, whichever missile the silo was given, or an EM pulse cannon’s — and Open a gate opening and closing again, and no kind but a structure carries either. Rescue is the one of the four that infantry, vehicles and aircraft all run: it clears the threats around a nominated spot, heads for the destination its house picks, and settles into guarding that area on arrival — which is what most of the defenders a computer house calls up when its base is attacked are put on, with the object under attack as the spot.
A state an object has no handling for is not refused. It becomes that object’s mission and then does nothing, waking every thirty seconds to do nothing again until something else replaces it, so a script that hands a team Missile or Open leaves its members standing where they are.
Values
25 of 25
| Input | Meaning | Engine constant | Stored value |
|---|---|---|---|
0 | Sleep and perform no active task. | MISSION_SLEEP | 0 |
1 | Attack the nearest suitable enemy. | MISSION_ATTACK | 1 |
2 | Move toward the assigned destination. | MISSION_MOVE | 2 |
3 | Rewritten to Move before the mission is queued. | MISSION_QMOVE | 3 |
4 | Retreat toward home or safety. | MISSION_RETREAT | 4 |
5 | Hold position and guard. | MISSION_GUARD | 5 |
6 | Hold position without being recruited. | MISSION_STICKY | 6 |
7 | Enter another object cooperatively. | MISSION_ENTER | 7 |
8 | Enter a target to capture it. | MISSION_CAPTURE | 8 |
9 | Find and collect nearby Tiberium. | MISSION_HARVEST | 9 |
10 | Actively guard an area. | MISSION_GUARD_AREA | 10 |
11 | Return to a refinery or delivery point. | MISSION_RETURN | 11 |
12 | Stop and remain still. | MISSION_STOP | 12 |
13 | Wait in ambush until discovered. | MISSION_AMBUSH | 13 |
14 | Search for and destroy enemies. | MISSION_HUNT | 14 |
15 | Find a location and unload cargo. | MISSION_UNLOAD | 15 |
16 | Enter a target to destroy it. | MISSION_SABOTAGE | 16 |
17 | Run building buildup. | MISSION_CONSTRUCTION | 17 |
18 | Run building builddown or selling. | MISSION_DECONSTRUCTION | 18 |
19 | Repair or reload a docked vehicle, heal or promote held infantry, or send a vehicle to the repair bay. | MISSION_REPAIR | 19 |
20 | Clear the threats around a nominated spot, then move to the cell the house picks and guard the area there. | MISSION_RESCUE | 20 |
21 | Run a structure's launch sequence: a missile silo's, or an EM pulse cannon's aim and fire. | MISSION_MISSILE | 21 |
22 | Remain passive and appear nonthreatening. | MISSION_HARMLESS | 22 |
23 | Open a gate and close it again once the way is clear. | MISSION_OPEN | 23 |
24 | Patrol assigned points. | MISSION_PATROL | 24 |
No enum values match this filter.
Used by
- Do this...
TMISSION_DO
Source files
Linked at revision 59fae722af8c.