Variables

summary:String

The summary of your scenario/mission in the Victory window.

title:String

The title visible in the Victory window.

Methods

add(id:String, desc:String, ?params:Null<ObjectiveParams>, ?button:Null<ButtonOptions>):Void

Add an objective. Must be called in the init() function.

Parameters:

id

The unique id of your objective.

desc

The description of the objective that will be visible in the top right corner. If you have a goal value, you can display it using ::value::, ::percent::, ::value_percent:: or ::inv_percent:: in your description.

params

The options of your objective, using the objective parameters.

button

Options to display a simple labeled button and link it to a script function.

getCurrentVal(id:String):Float

Get the current value toward the objective. Must be manually set with setCurrentVal

Parameters:

id

Returns:

Float

getGoalVal(id:String):Float

Get the goal value that was set for your objective.

Parameters:

id

Returns:

Float

getOtherPlayerVal(id:String, player:Player):Float

Get the current values of other players if set.

Parameters:

id
player

Returns:

Float

getStatus(id:String):OStatus

Get the objective status.

Parameters:

id

Returns:

OStatus

isVisible(id:String):Bool

Is your objective visible to player.

Parameters:

id

Returns:

Bool

setCurrentVal(id:String, val:Float):Void

Set the current value of your objective. A goal val needs to be set and it will be visible only with the progress bar active.

Parameters:

id
null

val

setGoalVal(id:String, val:Float):Void

Set the goal value of your objective. Goal value is either displayed either in your description if you used the proper keywords, or in the progress bar if enabled.

Parameters:

id
null

val

setOtherPlayerVal(id:String, player:Player, val:Float):Void

Set the current values of other players that will be visible if you enabled showOtherPlayers in the ObjectiveParams.

Parameters:

id
player
null

val

setStatus(id:String, status:OStatus):Void

Set the objective status. You can have the status be updated automatically if you provide a goal value and a current value. Otherwise, you can set it yourself at any time.

Parameters:

id
null

status

setVisible(id:String, visible:Bool):Void

Set your objective visible or hidden. Objectives needs to be added on init to be used. Use setVisible if you want to hide some and keep them for later.

Parameters:

id
null

visible