def __init__(self): ActivateTrapGag.__init__(self, CIGlobals.BananaPeel, 'phase_5/models/props/banana-peel-mod.bam', 10, GagGlobals.BANANA_SFX, 2.0, mode=1, anim='phase_5/models/props/banana-peel-chan.bam', activateSfx=GagGlobals.FALL_SFX, autoRelease=True) self.slipSfx = None self.setImage('phase_3.5/maps/banana-peel.png') if game.process == 'client': self.slipSfx = base.audio3d.loadSfx(GagGlobals.PIE_WOOSH_SFX) return
def onActivate(self, entity, suit): ActivateTrapGag.onActivate(self, entity, suit) x, y, z = entity.getPos(render) sinkPos = Point3(x, y, z - 9.1) dropPos = Point3(x, y, z + 15) landPos = Point3(x, y, z) suit.d_disableMovement() suit.setPos(x, y, z) entTrack = Sequence(Wait(0.4), Func(entity.setColor, Vec4(0, 0, 0, 1)), Wait(0.4), LerpScaleInterval(entity, 0.8, GagGlobals.PNT3NEAR0)) suitTrack = Sequence( self.getSplicedLerpAnimsTrack(suit, 'flail', 0.7, 0.25), Wait(0.2), LerpPosInterval(suit, 0.4, sinkPos), Func(suit.setPos, dropPos), Func(suit.hide), ActorInterval(suit, 'neutral', duration=0.5), Wait(0.75), Func(suit.show), Parallel(LerpPosInterval(suit, 0.3, landPos), Func(suit.play, 'slip-forward')), SoundInterval(self.activateSfx, node = suit), Func(self.damageSuit, suit), Func(suit.d_enableMovement) ) soundTrack = Sequence(SoundInterval(self.hitSfx, node = suit), Wait(0.8)) Parallel(entTrack, suitTrack, soundTrack).start()
def onActivate(self, entity, suit): ActivateTrapGag.onActivate(self, entity, suit) x, y, z = entity.getPos(render) sinkPos01 = Point3(x, y, z - 3.1) sinkPos02 = Point3(x, y, z - 9.1) dropPos = Point3(x, y, z + 15) landPos = Point3(x, y, z) suit.d_disableMovement() suit.setPos(x, y, z) entTrack = Sequence( Wait(2.4), LerpScaleInterval(entity, 0.8, GagGlobals.PNT3NEAR0)) suitTrack = Sequence( Wait(0.9), LerpPosInterval(suit, 0.9, sinkPos01), LerpPosInterval(suit, 0.4, sinkPos02), Func(suit.setPos, dropPos), Func(suit.hide), Wait(1.1), Func(suit.show), Func(suit.setPos, dropPos), Parallel(LerpPosInterval(suit, 0.3, landPos), Func(suit.play, 'slip-forward')), Func(self.damageSuit, suit), Func(suit.d_enableMovement)) animTrack = Sequence(ActorInterval(suit, 'flail'), ActorInterval(suit, 'flail', startTime=1.1), Wait(0.7), ActorInterval(suit, 'slip-forward', duration=2.1)) soundTrack = Sequence(Wait(0.7), SoundInterval(self.hitSfx, node=suit), Wait(0.1), SoundInterval(self.activateSfx, node=suit)) Parallel(entTrack, suitTrack, animTrack, soundTrack).start()
def onActivate(self, entity, suit): ActivateTrapGag.onActivate(self, entity, suit) slidePos = entity.getPos(render) slidePos.setY(slidePos.getY() - 5.1) moveTrack = Sequence(Wait(0.1), LerpPosInterval(self.gag, 0.1, slidePos)) animTrack = Sequence(ActorInterval(self.gag, 'banana', startTime=3.1), Wait(1.1), LerpScaleInterval(self.gag, 1, Point3(0.01, 0.01, 0.01))) suitTrack = ActorInterval(suit, 'slip-backward') soundTrack = Sequence(SoundInterval(self.slipSfx, duration=0.55, node=suit), SoundInterval(self.activateSfx, node=suit)) Parallel(moveTrack, animTrack, suitTrack, soundTrack).start()
def __init__(self): ActivateTrapGag.__init__(self, CIGlobals.Quicksand, 'phase_5/models/props/quicksand.bam', 50, GagGlobals.QUICKSAND_SFX, 2.5, activateSfx=GagGlobals.FALL_SFX) self.setImage('phase_3.5/maps/quicksand.png')
def onActivate(self, entity, suit): ActivateTrapGag.onActivate(self, entity, suit) x, y, z = entity.getPos(render) sinkPos = Point3(x, y, z - 9.1) dropPos = Point3(x, y, z + 15) landPos = Point3(x, y, z) suit.d_disableMovement() suit.setPos(x, y, z) entTrack = Sequence(Wait(0.4), Func(entity.setColor, Vec4(0, 0, 0, 1)), Wait(0.4), LerpScaleInterval(entity, 0.8, GagGlobals.PNT3NEAR0)) suitTrack = Sequence(self.getSplicedLerpAnimsTrack(suit, 'flail', 0.7, 0.25), Wait(0.2), LerpPosInterval(suit, 0.4, sinkPos), Func(suit.setPos, dropPos), Func(suit.hide), ActorInterval(suit, 'neutral', duration=0.5), Wait(0.75), Func(suit.show), Parallel(LerpPosInterval(suit, 0.3, landPos), Func(suit.play, 'slip-forward')), SoundInterval(self.activateSfx, node=suit), Func(self.damageSuit, suit), Func(suit.d_enableMovement)) soundTrack = Sequence(SoundInterval(self.hitSfx, node=suit), Wait(0.8)) Parallel(entTrack, suitTrack, soundTrack).start()
def onActivate(self, entity, suit): ActivateTrapGag.onActivate(self, entity, suit) slidePos = entity.getPos(render) slidePos.setY(slidePos.getY() - 5.1) moveTrack = Sequence(Wait(0.1), LerpPosInterval(self.gag, 0.1, slidePos)) animTrack = Sequence( ActorInterval(self.gag, 'banana', startTime=3.1), Wait(1.1), LerpScaleInterval(self.gag, 1, Point3(0.01, 0.01, 0.01))) suitTrack = ActorInterval(suit, 'slip-backward') soundTrack = Sequence( SoundInterval(self.slipSfx, duration=0.55, node=suit), SoundInterval(self.activateSfx, node=suit)) Parallel(moveTrack, animTrack, suitTrack, soundTrack).start()
def onActivate(self, entity, suit): ActivateTrapGag.onActivate(self, entity, suit) x, y, z = entity.getPos(render) sinkPos01 = Point3(x, y, z - 3.1) sinkPos02 = Point3(x, y, z - 9.1) dropPos = Point3(x, y, z + 15) landPos = Point3(x, y, z) suit.d_disableMovement() suit.setPos(x, y, z) entTrack = Sequence(Wait(2.4), LerpScaleInterval(entity, 0.8, GagGlobals.PNT3NEAR0)) suitTrack = Sequence(Wait(0.9), LerpPosInterval(suit, 0.9, sinkPos01), LerpPosInterval(suit, 0.4, sinkPos02), Func(suit.setPos, dropPos), Func(suit.hide), Wait(1.1), Func(suit.show), Func(suit.setPos, dropPos), Parallel(LerpPosInterval(suit, 0.3, landPos), Func(suit.play, 'slip-forward')), Func(self.damageSuit, suit), Func(suit.d_enableMovement)) animTrack = Sequence(ActorInterval(suit, 'flail'), ActorInterval(suit, 'flail', startTime=1.1), Wait(0.7), ActorInterval(suit, 'slip-forward', duration=2.1)) soundTrack = Sequence(Wait(0.7), SoundInterval(self.hitSfx, node=suit), Wait(0.1), SoundInterval(self.activateSfx, node=suit)) Parallel(entTrack, suitTrack, animTrack, soundTrack).start()
def __init__(self): ActivateTrapGag.__init__( self, CIGlobals.BananaPeel, 'phase_5/models/props/banana-peel-mod.bam', 10, GagGlobals.BANANA_SFX, 2.0, mode=1, anim='phase_5/models/props/banana-peel-chan.bam', activateSfx=GagGlobals.FALL_SFX, autoRelease=True) self.slipSfx = None self.setImage('phase_3.5/maps/banana-peel.png') if game.process == 'client': self.slipSfx = base.audio3d.loadSfx(GagGlobals.PIE_WOOSH_SFX) return
def equip(self): ActivateTrapGag.equip(self) self.build() self.gag.reparentTo(self.handJoint)
def __init__(self): ActivateTrapGag.__init__(self, CIGlobals.TrapDoor, 'phase_5/models/props/trapdoor.bam', 70, GagGlobals.TRAP_DOOR_SFX, 2.5, activateSfx = GagGlobals.FALL_SFX) self.setImage('phase_3.5/maps/trap-door.png')
def __init__(self): ActivateTrapGag.__init__(self, CIGlobals.TrapDoor, 'phase_5/models/props/trapdoor.bam', 70, GagGlobals.TRAP_DOOR_SFX, 2.5, activateSfx=GagGlobals.FALL_SFX) self.setImage('phase_3.5/maps/trap-door.png')