Scripting missions
- Last UpdatedDec 04, 2023
- 1 minute read
The folder Gamedata/Logic/missione_user contains the four mission files.
Mission files
Each file contains the definition of the TaskManager assigned to the mission procedure.
Code example
A code example for a mission.
<ft>
<!-- task hierarchy-->
<taskmanager name="tm_1" >
<task name="mission" startTasks="">
</task>
</taskmanager>
</ft>
Task hierarchy
You must script the task hierarchy and the procedure behavior, which can be a complex job.
The mission logic module contains a set of predefined script commands and nodes that can be used during mission procedure scripting.
Command arguments
|
Commands |
Arguments |
Description |
|---|---|---|
|
missione_finish |
no args |
Ends mission suddenly (user performed fatal error). |
|
tasktimer_start |
duration |
Displays a countdown timer setting its duration. |
|
tasktimer_pause |
no args |
Pauses the countdown. |
|
tasktimer_stop |
no args |
Stops and hides countdown. |
|
log_right |
log |
Text Logs a right action. |
|
log_wrong |
log |
Text Logs a wrong action. |
|
action_wrong |
no args |
Increments the number of wrong actions. |
Object nodes
|
Object |
Node |
Description |
|---|---|---|
|
achievement |
Use the Show parameter to display positive or negative achievements. Default images are ach_ok.png and ach_ko.png. |
|
|
tasktimer |
Contains only the SBOOL Expired parameter that can track when the tasktimer time has elapsed. |