Builder Tasks

From Wherigo Foundation Wiki
Jump to: navigation, search

A task is a goal which you set for the player. You can use tasks to guide game play. For example, when the player enters a zone, you might set tasks which encourage the player to interact with items or characters in the zone. You can, but need not, use tasks as part of scoring the game. For example, you might decide that the player has completed the game when he or she has accomplished all the tasks you've set.


What Makes a Task?

Major, visible characteristics include the following.

  • A brief, unique name. This serves to identify the task to the player. It appears in several places, including the task list.
  • An optional, brief description. This also appears in the task list, as well as on the detail screen for the task. Use this to elaborate on the nature of the task, or to give the player hints as to how to accomplish it.
  • An optional picture. This appears on the detail screen for the task. Use this to add interest, to give additional information about the task, or to give hints about how to accomplish it.
  • An optional icon. This appears next to the task in the task list. If you do not provide an icon, the builder uses a generic icon which automatically reflects whether or not the player has completed the task. As of 03/04/2008 (builder dated 02/28/2008 2.0.4828.4384) icons for tasks are not used. The engine always displays the default icon.


Of State, Status, Visibility and Correctness

Each task has four properties. In the builder, you can set an initial value for each of these. You can also change each property from script during game play. In addition, all of the properties except visibility have an associated event which fires when the property value changes.

  • State. A task can be active (true) or inactive (false). You should make a task active when you want the player to work on it. Tasks show up in the task list only when they are both active and visible. In the builder, the initial value of this property is represented by a check box labeled "Active." This property has an associated event called "When a task state changes." Based on consistency with other objects (such as zones), my guess is that events are not processed for inactive tasks. But that's just a guess.
  • Status. A task can be complete (true) or incomplete (false). You can use this property to track whether or not the player has completed the task. If you do not provide an icon for the task, the builder provides an icon which automatically indicates whether or not the task is complete or incomplete. Otherwise, the status does not affect the visibility of the task. In the builder, the initial value of this property is represented by a check box labeled "Complete." This property has an associated event called "When a task status changes."
  • Correctness. A (presumably) completed task can have one of three values which reflect its correctness: "None" (unknown), "NotCorrect" and "Correct". You can use this property to track the outcome of a completed task in more detail. For example, the task might be to answer a question. You consider the task complete when the player provides an answer, which might be correct or incorrect. You don't have to use this property unless you need its value for some reason. In the builder, the initial value of this property is represented by a drop-down list containing the values None, NotCorrect and Correct.
  • Visible. An active task can be visible (true) or not visible (false). This controls visibility in the task list for active tasks. Inactive tasks are never visible. In the builder, the initial value of this property is represented by a check box labeled "Visible." This property has no associated event.

As of 03/03/2008 (builder dated 02/28/2008 2.0.4828.4384), there are still problems with task events. They apparently do not fire consistently. In addition, new values for the associated properties apparently are not saved when there is script attached to the events.


Tasks in the Builder

To add or edit a task, begin by choosing Tasks from the left sidebar. This will display a list of existing tasks. To the right of this list, there is a second list of events. When you select an entry in the main list, the events corresponding to the state, status and correctness changes for that task appear in the second list.

  • To add a new task, choose Add, and provide the requested information.
  • To edit an existing task, select the task in the list, choose Edit, and provide or change the requested information.
  • To delete an existing task, select the task in the list, choose Delete, and confirm your intention to delete it.
  • To add a script for an event, select the task in the left-hand list, select an event for which no script exists in the right-hand list, and choose New Script. Then create the script.
  • To edit an existing script for an event, select the task in the left-hand list, select an event for which script already exists in the right-hand list, and choose Edit Script. Make any needed changes to the script.
  • To delete an existing script for an event, select the task in the left-hand list, select an event for which script exists in the right-hand list, and choose Delete Script. Confirm your intention to delete the script.

Scripts can also be added, edited and deleted from the Task dialog, on the Events tab, as you add or edit the task.

When you add or edit a task, you will be asked to provide the following information.

  • The name of the task. Required.
  • A brief description. Optional but highly recommended.
  • A piece of media (picture) to represent the task on its detail screen. Optional. If omitted, no picuture appears on the detail screen.
  • An icon to represent the task in lists. Optional. If omitted, the builder provides a default icon. As of 03/04/2008, apparently not used.
  • The initial visibility setting for the task. Remember that this interacts with the active setting for the task.
  • The initial value for the active property.
  • The initial value for the complete property.
  • The initial value for the correct property.