def generate(self):
     DistributedNode.generate(self)
     self.cart = loader.loadModel(self.cartModelPath)
     self.cart.reparentTo(self)
     self.cart.setH(180)
     heads = []
     for head in CIGlobals.SuitBodyData.keys():
         if CIGlobals.SuitBodyData[head][0] != 'B':
             heads.append(head)
     head = random.choice(heads)
     suitType = CIGlobals.SuitBodyData[head][0]
     suitDept = CIGlobals.SuitBodyData[head][1]
     self.suitInCar = Suit()
     self.suitInCar.generateSuit(suitType, head, suitDept, 137, 0, False)
     self.suitInCar.loop('sit')
     self.suitInCar.disableRay()
     self.suitInCar.setScale(0.7)
     self.suitInCar.setH(180)
     self.suitInCar.setPos(0, -1, -1.5)
     self.suitInCar.reparentTo(self.cart.find('**/seat1'))
     self.soundEngineLoop = base.audio3d.loadSfx('phase_6/audio/sfx/KART_Engine_loop_0.ogg')
     base.audio3d.attachSoundToObject(self.soundEngineLoop, self)
     base.playSfx(self.soundEngineLoop, looping = 1)
     self.soundDriveByHorn = base.audio3d.loadSfx(self.honkSfxPath)
     base.audio3d.attachSoundToObject(self.soundDriveByHorn, self)
     self.soundDriveBy = base.audio3d.loadSfx('phase_14/audio/sfx/cogtropolis_citycar_driveby.ogg')
     base.audio3d.attachSoundToObject(self.soundDriveBy, self)
     sphere = CollisionSphere(0, 0, 0, 2.5)
     sphere.setTangible(0)
     node = CollisionNode(self.uniqueName('cartSphere'))
     node.setCollideMask(CIGlobals.WallBitmask)
     node.addSolid(sphere)
     self.collNodePath = self.attachNewNode(node)
     self.collNodePath.setZ(1.5)
     self.collNodePath.setSy(2.0)
     self.collNodePath.setSx(1.75)
from lib.coginvasion.cthood.ElevatorUtils import *

leftDoor = elevator1.find('**/left-door')
rightDoor = elevator1.find('**/right-door')
closeDoors(leftDoor, rightDoor)

ival = getRideElevatorInterval()
ival.append(getOpenInterval(base.localAvatar, leftDoor, rightDoor, base.loadSfx('phase_5/audio/sfx/elevator_door_open.mp3'), None))
#ival.start()
"""
from lib.coginvasion.cog import Variant

receptionistPosHpr = (0.91, 16.92, 0, 149.53, 0, 0)

base.disableMouse()
suit = Suit()
suit.level = 12
suit.generate(SuitBank.ColdCaller, Variant.NORMAL, hideFirst=False)
suit.setName('Cold Caller', 'Cold Caller')
suit.reparentTo(render)
suit.loop('sit')
suit.cleanupPropeller()
suit.setPosHpr(*receptionistPosHpr)


def printPosHpr():
    print 'Pos: {0}'.format(base.localAvatar.getPos(render))
    print 'Hpr: {0}'.format(base.localAvatar.getHpr(render))


base.accept('p', printPosHpr)