FANDOM


Objectives are relatively simple to create and maintain from within Map Events scripts or GameScripts.

Commands you need to know are:

setObjective("id", "shorttext", "longtext");

completeObjective("id", ticked, alert);

failObjective("id", crossed, alert);

Parameters: Edit

setObjective(id, shorttext, longtext); Edit

Param Required Description
id Yes Not visible to the player. Must be unique for each objective in the map. You can overwrite an objective by calling setObjective with the same id.
shorttext Yes The text displayed on-screen at all times, next to the checkbox.
longtext No The text in the textbox when the objective is clicked, to give a more detailed explanation of what to do.

completeObjective(id, ticked, alert); Edit

Param Required Description
id Yes Not visible to the player. Must be unique for each objective in the map. You can overwrite an objective by calling setObjective with the same id.
ticked No Whether or not the objective should be ticked or unticked. If omitted, will tick the objective.
alert No (requires something for this, but need further discussion as to what)

failObjective(id, crossed, alert); Edit

Param Required Description
id Yes Not visible to the player. Must be unique for each objective in the map. You can overwrite an objective by calling setObjective with the same id.
crossed No Whether or not the objective is crossed out or not. If omitted, will cross out the objective.
alert No (requires something for this, but need further discussion as to what)

Examples Edit

Save Kelgo Edit

In the below example, an objective is added that is un-clickable, since it has no longtext assigned to it.

setObjective("saveKelgo", "Save Kelgo from the Goblins!");

In the event of Kelgo being saved, the following code should be called:

completeObjective("saveKelgo");

In the event of Kelgo dying, the following code should be called:

failObjective("saveKelgo");

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.