$customHeader
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

Mark a mission as finished, either as successful or failed...

 

Syntax

Mission.finish( success );

Parameters

ParameterTypeMandatoryNotesAPI Version
success

Boolean

Constant

(tick)

Defines whether the mission is successful or not.

Specify either a boolean or one of the following constants:

  • Mission.SUCCESSFUL or true – Mission successful
  • Mission.FAILED or false – Mission failed
1.0

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

// 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;
Availability DEV

Requires:

Contents

Jump to:

See also

Related articles:

 

  • No labels