Changeset 362 for trunk/game/scripts


Ignore:
Timestamp:
11/02/09 07:06:16 (10 years ago)
Author:
eliedebrauwer
Message:

Ticket #142: Patch by eliedebrauwer, allows a sequence of actions (e.g. walk to an NPC and start to talk) to be aborted. fixes[s:trac, t:142]

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/game/scripts/objects/actors.py

    r361 r362  
    116116 
    117117        self.is_PC = True 
    118          
    119         # PC _has_ an inventory, he _is not_ one 
    120118        self.inventory = set(('beer',)) 
    121119        self.peopleIknow = set() 
    122          
    123120        self.state = _AGENT_STATE_NONE 
    124121        self.layer_id = agent_layer.getId() 
     
    159156           @return: None""" 
    160157        self.state = _AGENT_STATE_RUN 
     158        self.behaviour.nextAction = None 
    161159        self.behaviour.agent.move('run', location, self.behaviour.speed+1) 
    162160 
     
    167165           @return: None""" 
    168166        self.state = _AGENT_STATE_RUN 
     167        self.behaviour.nextAction = None  
    169168        self.behaviour.agent.move('walk', location, self.behaviour.speed-1) 
    170169 
     
    175174           @return: None""" 
    176175        self.state = _AGENT_STATE_IDLE 
     176        self.behaviour.nextAction = None  
    177177        self.behaviour.agent.setLocation(location) 
    178178 
Note: See TracChangeset for help on using the changeset viewer.