Versions Compared
compared with
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Excerpt |
---|
Mark a mission as finished, either as successful or failed... |
Syntax
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
Mission.finish( success ); |
Parameters
Parameter | Type | Mandatory | Notes | API Version |
---|---|---|---|---|
success | Boolean Constant | Defines whether the mission is successful or not. Specify either a boolean or one of the following constants:
|
Return value
Does not return anything
Notes
You can also finish a mission by setting the Mission.status parameter to the desired success value.
When the mission finishes, Mission.onFinish() will be triggered.
Example
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
// ways to finish a mission successfully Mission.finish( Mission.SUCCESSFUL ); Mission.finish( true ); Mission.status = Mission.SUCCESSFUL; // ways to finish a mission as failed Mission.finish( Mission.FAILED ); Mission.finish( false ); Mission.status = Mission.FAILED; |
Div | ||||||
---|---|---|---|---|---|---|
| ||||||
Availability
Requires:
|
Div | ||||
---|---|---|---|---|
| ||||
ContentsJump to:
|
Div | ||
---|---|---|
| ||
See alsoRelated articles:
|