예제 #1
0
def enter():
	# Stop the idle sounds
	ghost_story_sound.stop()
	director.play_sound("scenes/p2/audio/take_a_seat.ogg", channel=INSIDE_CHANNEL)

	director.set_off(WELCOME_SIGN_RELAY, 2)
	director.remove_trigger(DOOR_TRIGGER)
예제 #2
0
def play():
    # TOXIC_HAMMER_RELAY
    # TOXIC_LIFT_RELAY
    director.play_sound("scenes/p1/audio/toxic_trigger.ogg",
                        loops=3,
                        channel=SOUND_CHANNEL)
    director.set_on(TOXIC_LIFT_RELAY, 0, 15)
예제 #3
0
def enter():
    # Stop the idle sounds
    ghost_story_sound.stop()
    director.play_sound("scenes/p2/audio/take_a_seat.ogg",
                        channel=INSIDE_CHANNEL)

    director.set_off(WELCOME_SIGN_RELAY, 2)
    director.remove_trigger(DOOR_TRIGGER)
예제 #4
0
def background_sound():
    sounds = (
        "scenes/p1/audio/grave_yard_owl.ogg",
        "scenes/p1/audio/grave_yard_crickets.ogg",
        "scenes/p1/audio/grave_yard_crow.ogg",
    )
    director.play_sound(random.choice(sounds),
                        volume=0.5,
                        channel=SOUND_CHANNEL)

    director.schedule(random.randrange(7, 20), background_sound, ())
예제 #5
0
def reset():
	director.set_on(WELCOME_SIGN_RELAY)
	director.set_on(CHAIR_SPOT_RELAY)
	director.set_off(GREEN_LIGHT_RELAY)
	director.set_off(RED_LIGHT_RELAY)

	director.add_trigger(PROXIMITY_TRIGGER, welcome, (), bouncetime=2)
	director.add_trigger(DOOR_TRIGGER, enter, (), bouncetime=2)
	director.add_trigger(CHAIR_TRIGGER, play, (), bouncetime=2)

	director.play_sound(ghost_story_sound, loops=-1, channel=INSIDE_CHANNEL)
예제 #6
0
def reset():
    director.set_on(WELCOME_SIGN_RELAY)
    director.set_on(CHAIR_SPOT_RELAY)
    director.set_off(GREEN_LIGHT_RELAY)
    director.set_off(RED_LIGHT_RELAY)

    director.add_trigger(PROXIMITY_TRIGGER, welcome, (), bouncetime=2)
    director.add_trigger(DOOR_TRIGGER, enter, (), bouncetime=2)
    director.add_trigger(CHAIR_TRIGGER, play, (), bouncetime=2)

    director.play_sound(ghost_story_sound, loops=-1, channel=INSIDE_CHANNEL)
예제 #7
0
def play():
    # Stop the idle sounds
    ghost_story_sound.stop()

    # Siren
    director.set_on(SIREN_RELAY, 0, 13)
    director.play_sound("scenes/p2/audio/siren.ogg", channel=INSIDE_CHANNEL)

    # Green light and hum sound effect
    director.play_sound(switch_sound, 5, channel=INSIDE_CHANNEL)
    director.set_on(GREEN_LIGHT_RELAY, 5.5, 7.5)
    director.play_sound("scenes/p2/audio/switch_hum.ogg",
                        5,
                        loops=-1,
                        maxtime=4,
                        channel=INSIDE_CHANNEL)

    # Red light
    director.play_sound(switch_sound, 6, channel=INSIDE_CHANNEL)
    director.set_on(RED_LIGHT_RELAY, 6.5, 6.5)

    # fire the chair
    director.set_on(CHAIR_VIBRATE_RELAY, 6.8, 5)
    director.play_sound("scenes/p2/audio/electric.ogg",
                        6,
                        maxtime=6.5,
                        channel=INSIDE_CHANNEL)

    # Flicker chair light
    director.set_off(CHAIR_SPOT_RELAY, 6.8)
    director.set_on(CHAIR_SPOT_RELAY, 6.9, 0.2)
    director.set_on(CHAIR_SPOT_RELAY, 7.9, 0.2)
    director.set_on(CHAIR_SPOT_RELAY, 8.3, 0.1)
    director.set_on(CHAIR_SPOT_RELAY, 8.7, 0.1)
    director.set_on(CHAIR_SPOT_RELAY, 8.9, 0.3)
    director.set_on(CHAIR_SPOT_RELAY, 9.5, 0.1)
    director.set_on(CHAIR_SPOT_RELAY, 9.7, 0.1)
    director.set_on(CHAIR_SPOT_RELAY, 10.4, 0.3)
    director.set_on(CHAIR_SPOT_RELAY, 11, 0.1)
    director.set_on(CHAIR_SPOT_RELAY, 11.3, 0.4)
    director.set_on(CHAIR_SPOT_RELAY, 12.2, 0.3)
    director.set_on(CHAIR_SPOT_RELAY, 12.8)

    # Air blast
    director.set_on(AIR_BLAST_RELAY, 6.9, 2)
    director.set_on(AIR_BLAST_RELAY, 10, 1)

    # End sound
    director.play_sound(switch_sound, 12.5, channel=INSIDE_CHANNEL)

    # Reset
    director.schedule(20, reset, ())

    director.remove_trigger(CHAIR_TRIGGER)
예제 #8
0
def play():
	# TOXIC_HAMMER_RELAY
	# TOXIC_LIFT_RELAY
	director.play_sound("scenes/p1/audio/toxic_trigger.ogg", delay=1, channel=SOUND_CHANNEL)
	director.set_on(TOXIC_LIFT_RELAY, 0, 15)
예제 #9
0
def welcome():
    director.play_sound("scenes/p2/audio/take_a_seat.ogg",
                        channel=OUTSIDE_CHANNEL)
예제 #10
0
def play():
	director.play_sound("scenes/p1/audio/grave_yard_moans.ogg", channel=SOUND_CHANNEL)
	director.set_on(GRABBER_RELAY, 0, 6)
	director.set_on(GRABBER_RELAY, 7.5, 9)
	director.set_on(GRABBER_RELAY, 17.5, 5)
예제 #11
0
def background_sound():
	sounds = ("scenes/p1/audio/grave_yard_owl.ogg", "scenes/p1/audio/grave_yard_crickets.ogg", "scenes/p1/audio/grave_yard_crow.ogg",)
	director.play_sound(random.choice(sounds), volume=0.5, channel=SOUND_CHANNEL)

	director.schedule(random.randrange(7, 20), background_sound, ())
예제 #12
0
SOUND_CHANNEL = "left"
RUN_TIME = 22

def play():
	director.play_sound("scenes/p1/audio/grave_yard_moans.ogg", channel=SOUND_CHANNEL)
	director.set_on(GRABBER_RELAY, 0, 6)
	director.set_on(GRABBER_RELAY, 7.5, 9)
	director.set_on(GRABBER_RELAY, 17.5, 5)


# Setup a sound to play at random intervals
def background_sound():
	sounds = ("scenes/p1/audio/grave_yard_owl.ogg", "scenes/p1/audio/grave_yard_crickets.ogg", "scenes/p1/audio/grave_yard_crow.ogg",)
	director.play_sound(random.choice(sounds), volume=0.5, channel=SOUND_CHANNEL)

	director.schedule(random.randrange(7, 20), background_sound, ())


# init triggers etc
print('Load the grabber')
# Trigger the grabber on button 2 and disable button for RUNTIME+2 seconds after push
director.add_trigger(GRABBER_TRIGGER, play, (), bouncetime=RUN_TIME+2)


# Ambient track to loop in background
director.play_sound("scenes/p1/audio/grave_yard_idle.ogg", delay=0, loops=-1, channel=SOUND_CHANNEL)


# kick off the random background sounds
director.schedule(5, background_sound, ())
예제 #13
0
def play():
    director.play_sound("scenes/p1/audio/grave_yard_moans.ogg",
                        channel=SOUND_CHANNEL)
    director.set_on(GRABBER_RELAY, 0, 6)
    director.set_on(GRABBER_RELAY, 7.5, 9)
    director.set_on(GRABBER_RELAY, 17.5, 5)
예제 #14
0
def hammer_time():
	director.play_sound(hammer_sound, channel=SOUND_CHANNEL);
	director.set_on(TOXIC_HAMMER_RELAY, 0, random.randrange(2000, 5000)/1000)
	director.schedule(random.randrange(20, 120), hammer_time, ())
예제 #15
0
    director.set_on(GRABBER_RELAY, 7.5, 9)
    director.set_on(GRABBER_RELAY, 17.5, 5)


# Setup a sound to play at random intervals
def background_sound():
    sounds = (
        "scenes/p1/audio/grave_yard_owl.ogg",
        "scenes/p1/audio/grave_yard_crickets.ogg",
        "scenes/p1/audio/grave_yard_crow.ogg",
    )
    director.play_sound(random.choice(sounds),
                        volume=0.5,
                        channel=SOUND_CHANNEL)

    director.schedule(random.randrange(7, 20), background_sound, ())


# init triggers etc
print('Load the grabber')
# Trigger the grabber on button 2 and disable button for RUNTIME+2 seconds after push
director.add_trigger(GRABBER_TRIGGER, play, (), bouncetime=RUN_TIME + 2)

# Ambient track to loop in background
director.play_sound("scenes/p1/audio/grave_yard_idle.ogg",
                    delay=0,
                    loops=-1,
                    channel=SOUND_CHANNEL)

# kick off the random background sounds
director.schedule(5, background_sound, ())
예제 #16
0
def play():
	# Stop the idle sounds
	ghost_story_sound.stop()

	# Siren
	director.set_on(SIREN_RELAY, 0, 13)
	director.set_on(CLAXON_RELAY, 0, 0.5)
	director.set_on(CLAXON_RELAY, 1, 0.5)
	director.set_on(CLAXON_RELAY, 2, 0.5)
	director.play_sound("scenes/p2/audio/siren.ogg", channel=INSIDE_CHANNEL)

	# Green light and hum sound effect
	director.play_sound(switch_sound, 5, channel=INSIDE_CHANNEL)
	director.set_on(GREEN_LIGHT_RELAY, 5.5, 7.5)
	director.play_sound("scenes/p2/audio/switch_hum.ogg", 5, loops=-1, maxtime=4, channel=INSIDE_CHANNEL)
	
	# Red light
	director.play_sound(switch_sound, 6, channel=INSIDE_CHANNEL)
	director.set_on(RED_LIGHT_RELAY, 6.5, 6.5)
	
	# fire the chair
	director.set_on(CHAIR_VIBRATE_RELAY, 6.8, 5)
	director.play_sound("scenes/p2/audio/electric.ogg", 6, maxtime=6.5, channel=INSIDE_CHANNEL)

	# Flicker chair light
	director.set_off(CHAIR_SPOT_RELAY, 6.8)
	director.set_on(CHAIR_SPOT_RELAY, 6.9, 0.2)
	director.set_on(CHAIR_SPOT_RELAY, 7.9, 0.2)
	director.set_on(CHAIR_SPOT_RELAY, 8.3, 0.1)
	director.set_on(CHAIR_SPOT_RELAY, 8.7, 0.1)
	director.set_on(CHAIR_SPOT_RELAY, 8.9, 0.3)
	director.set_on(CHAIR_SPOT_RELAY, 9.5, 0.1)
	director.set_on(CHAIR_SPOT_RELAY, 9.7, 0.1)
	director.set_on(CHAIR_SPOT_RELAY, 10.4, 0.3)
	director.set_on(CHAIR_SPOT_RELAY, 11, 0.1)
	director.set_on(CHAIR_SPOT_RELAY, 11.3, 0.4)
	director.set_on(CHAIR_SPOT_RELAY, 12.2, 0.3)
	director.set_on(CHAIR_SPOT_RELAY, 12.8)

	# Air blast
	director.set_on(AIR_BLAST_RELAY, 6.9, 2)
	director.set_on(AIR_BLAST_RELAY, 10, 1)

	# End sound
	director.play_sound(switch_sound, 12.5, channel=INSIDE_CHANNEL)

	# Reset
	director.schedule(120, reset, ())

	director.remove_trigger(CHAIR_TRIGGER)
예제 #17
0
import director, random, logging
from constants import *
logger = logging.getLogger(__name__)

# Setup ambient track to loop indefinitely in background
director.play_sound("scenes/audio/marketplace_1.wav",
                    volume=0.5,
                    delay=0,
                    loops=-1,
                    origin="Thunder")
예제 #18
0
def welcome():
	director.play_sound("scenes/p2/audio/welcome.ogg", channel=OUTSIDE_CHANNEL)