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

Type JumpOff

object --+    
         |    
      Task --+
             |
            JumpOff


Make the agent jump off the side of a surface, by moving it in a given direction with a given speed, and waiting until it becomes unsupported. If the agent does not lose support within one second, this task will timeout.
Method Summary
  __init__(self, agent, walk_dir, walk_speed)
  act(self, level)
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.
    Inherited from Task
  __repr__(self)
  initialize(self, level)
This method is called when a script starts using this task.
  interrupt(self, level, condition, task_stack)
Attempt to accomplish this task, given that an interrupt condition occured.
  recover(self, level, failed_subtask, remaining_subtasks, failure_info)
Attempt to accomplish this task, given that a subtask failed.
  register(cls, *typesignature)
Register this task class as a task that can be used in the task list of a script. (Class method)
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
Return hash(x)...
  __new__(T, S, ...)
Return a new object with type S, a subtype of T...
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
Return str(x)...

Instance Variable Summary
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.
    Inherited from Task
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.

Class Variable Summary
    Inherited from Task
tuple interrupts = ()
NoneType require = None                                                                  
NoneType signature: The type signature of this task.
dict task_classes = {'WaitForAvatar': <class 'pajammin.ai.scr...

Instance Method Details

__init__(self, agent, walk_dir, walk_speed)
(Constructor)

Overrides:
pajammin.ai.script.script.Task.__init__

act(self, level)

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. See the class descriptions for the subclasses of TaskResult for information about the actions performed by each task.

Each time act() is called, it should only do a very small amount of work -- this will ensure that the game runs more smoothly.
Overrides:
pajammin.ai.script.script.Task.act (inherited documentation)

Instance Variable Details

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. (If a task has subtasks, then its timeout value will only be checked after all of the subtasks have returned.)
Type:
NoneType
Value:
1000