Example #1
0
 def __init__(self, name, model, damage, hitSfx, idleSfx = None, particlesFx = None, anim = None, wantParticles = True):
     TrapGag.__init__(self, name, model, damage, hitSfx, anim)
     self.wantParticles = wantParticles
     self.particles = None
     self.particlesFx = particlesFx
     self.idleSfx = None
     if game.process == 'client':
         if idleSfx:
             self.idleSfx = base.audio3d.loadSfx(idleSfx)
     return
Example #2
0
 def __init__(self, name, model, damage, hitSfx, collRadius, mode = 0, anim = None, autoRelease = True, activateSfx = None):
     TrapGag.__init__(self, name, model, damage, hitSfx, anim, doesAutoRelease=autoRelease)
     LocationGag.__init__(self, 10, 50, shadowScale=0.25)
     self.trapMode = mode
     self.entities = []
     self.lifeTime = 120
     self.minSafeDistance = 5
     self.collRadius = collRadius
     self.activateSfx = None
     if game.process == 'client':
         if activateSfx:
             self.activateSfx = base.audio3d.loadSfx(activateSfx)
     return
Example #3
0
 def __init__(self, name, model, damage, hitSfx, collRadius, mode=0, anim=None, autoRelease=True, activateSfx=None):
     TrapGag.__init__(self, name, model, damage, hitSfx, anim, doesAutoRelease=autoRelease)
     LocationGag.__init__(self, 10, 50, shadowScale=0.25)
     self.trapMode = mode
     self.entities = []
     self.lifeTime = 120
     self.minSafeDistance = 5
     self.collRadius = collRadius
     self.activateSfx = None
     self.entityTrack = None
     if game.process == 'client':
         if activateSfx:
             self.activateSfx = base.audio3d.loadSfx(activateSfx)
     return
    def __init__(self,
                 name,
                 model,
                 damage,
                 hitSfx,
                 idleSfx=None,
                 particlesFx=None,
                 anim=None,
                 wantParticles=True):
        TrapGag.__init__(self, name, model, damage, hitSfx, anim)
        self.wantParticles = wantParticles
        self.particles = None
        self.particlesFx = particlesFx
        self.idleSfx = None
        self.timeout = 5.0

        if game.process == 'client':
            if idleSfx:
                self.idleSfx = base.audio3d.loadSfx(idleSfx)
Example #5
0
    def __init__(self,
                 name,
                 model,
                 damage,
                 hitSfx,
                 collRadius,
                 mode=0,
                 anim=None,
                 autoRelease=True,
                 activateSfx=None):
        TrapGag.__init__(self,
                         name,
                         model,
                         damage,
                         hitSfx,
                         anim,
                         doesAutoRelease=autoRelease)
        LocationGag.__init__(self, 10, 50, shadowScale=0.25)

        # This is the mode the trap gag is on. 0) Trapdoor/Quicksand and 1) Banana Peel, marbles, etc.
        self.trapMode = mode

        # This keeps track of the entities we drop.
        self.entities = []

        # This is the length (in seconds) of how long an entity exists.
        self.lifeTime = 120

        # This is the minimum distance an entity has to be from another.
        self.minSafeDistance = 5

        # This is the radius of the CollisionSphere that detects suits.
        self.collRadius = collRadius

        # This is the sound effect called when a trap is tripped.
        self.activateSfx = None

        self.entityTrack = None

        if game.process == 'client':
            if activateSfx:
                self.activateSfx = base.audio3d.loadSfx(activateSfx)