Package pajammin :: Package ai :: Package script :: Module script
[show private | hide private]
[frames | no frames]

Module pajammin.ai.script.script

AI scripting for Pajammin' entities. Each entity may be associated with a Script, which controls the behavior of that entity. A script consists of a list of Tasks that the entity should accomplish; these tasks will be completed in order. To complete a given task, the script repeatedly calls the task's act() method, which performs actions in an attempt to complete the task. Each time the act() method is called, it returns a TaskResult, indicating what action should be taken next by the script.
Classes
Condition A condition on the world that can be true or false.
DoFirst The task can't be completed yet; perform the given list of subtasks first, and then try the task again.
DoInstead The task can't be completed yet; perform the given list of subtasks instead, and if they all succeed, then the task is finished.
EndTask Do nothing, forever.
Failed The task could not be completed; notify the parent task (if any).
Finished The task was successfully completed; move on to the next task.
Idle Take no action for a fixed period of time (default of 1 minute).
Script A script that controls the behavior of one or more entities in a level.
Task A task that a script should attempt to accomplish.
TaskResult The result of attempting to perform a task.
Wait The task can't be completed yet; wait the given amount of time, and try the task again.
_ScriptTop A task that performs a given set of subtasks, and optionally loops.