Home | Trees | Index | Help |
---|
|
object
--+
|
Task
AttackAvatar
,
AttackTarget
,
Defend
,
EndTask
,
FarieFollow
,
FireProjectileAt
,
Idle
,
Jump
,
JumpOff
,
LandOn
,
Say
,
UseMeleeAttack
,
WaitFor
,
WaitForAvatar
,
WalkAround
,
WalkPath
,
WalkToEntity
,
WalkToPos
,
WalkToX
,
WalkUpToEntity
,
Wander
,
_ScriptTop
Task
are used to define specific tasks.
Method Summary | |
---|---|
__init__(self)
| |
__repr__(self)
| |
Attempt to accomplish this task, by examining and/or modifying the level; and should return a TaskResult object, indicating
what action should be taken next. | |
This method is called when a script starts using this task. | |
Attempt to accomplish this task, given that an interrupt condition occured. | |
Attempt to accomplish this task, given that a subtask failed. | |
Register this task class as a task that can be used in the task list of a script. (Class method) | |
Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
Return hash(x)... | |
Return a new object with type S, a subtype of T... | |
helper for pickle | |
helper for pickle | |
x.__setattr__('name', value) <==> x.name = value | |
Return str(x)... |
Instance Variable Summary | |
---|---|
NoneType |
fail_task : A variable used to hold the task that should be notified if this task
fails. |
NoneType |
next_task : A variable used to hold the task that should be performed after this
task. |
NoneType |
timeout : If set to a value other than None , then this task will
automatically fail if it has not finished before this amount of time (in
msec) has elapsed. |
Class Variable Summary | |
---|---|
tuple |
interrupts = ()
|
NoneType |
require = None |
dict |
task_classes = {'WaitForAvatar': <class 'pajammin.ai.scr...
|
Level Editor | |
NoneType |
signature : The type signature of this task. |
Instance Method Details |
---|
__init__(self)
|
__repr__(self)
|
act(self, level)Attempt to accomplish this task, by examining and/or modifying the
level; and should return a act() is called, it should only do a very
small amount of work -- this will ensure that the game runs more
smoothly.
|
initialize(self, level)This method is called when a script starts using this task. It should initialize any instance variables used by the task. (Note that tasks can be reused, so this method may be called more than once.) By default, it does nothing. |
interrupt(self, level, condition, task_stack)Attempt to accomplish this task, given that an interrupt condition occured. This method is called if one of the task's interrupt conditions becomes true. By default,interrupt() returns
Failed() .
|
recover(self, level, failed_subtask, remaining_subtasks, failure_info)Attempt to accomplish this task, given that a subtask failed. This
method is called if recover() simply returns
Failed() .
|
Class Method Details |
---|
register(cls, *typesignature)Register this task class as a task that can be used in the task list of a script. This will add it to the listtask_classes ,
and will initialize its signature class variable. Tasks
that register themselves are required to define instance variables
corresponding to each of their constructor arguments (with the same
names).
|
Instance Variable Details |
---|
fail_taskA variable used to hold the task that should be notified if this task fails. This variable should never be used or modified by the task itself; it is set and used by theScript class.
|
next_taskA variable used to hold the task that should be performed after this task. This variable should never be used or modified by the task itself; it is set and used by theScript class.
|
Class Variable Details |
---|
signatureThe type signature of this task. This class variable is set by the class methodregister() , which registers this task for use
with the level editor.
|
interrupts
|
require
|
task_classes
|
Home | Trees | Index | Help |
---|
Generated by Epydoc 2.1 on Thu Sep 22 22:52:49 2005 | http://epydoc.sf.net |