Ignore:
Timestamp:
10/09/09 20:03:08 (10 years ago)
Author:
eliedebrauwer
Message:

Ticket #66: Patch by saritor (& eliedebrauwer), implements saritors rework of teleporting, at this point it implements the within-a-map teleport successfully, but cross map teleport still has in issue which probably has to do with the setup of the PC. comment[s:trac, t:66]

File:
1 edited

Legend:

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

    r295 r310  
    136136        self.state = _AGENT_STATE_RUN 
    137137        self.behaviour.agent.move('walk', location, self.behaviour.speed-1) 
    138        
     138 
     139    def teleport(self, location): 
     140        """Teleports a PC instantly to the given location. 
     141           @type location: fife.Location 
     142           @param location: Target coordinates for PC. 
     143           @return: None""" 
     144        self.state = _AGENT_STATE_IDLE 
     145        self.behaviour.agent.setLocation(location) 
     146 
    139147    def approach(self, location, action = None): 
    140148        """Approaches an npc and then ???. 
Note: See TracChangeset for help on using the changeset viewer.