Post: Playing TranZit Teddy Bear Sound
02-08-2016, 07:43 PM #1
BullyWiiPlaza
Climbing up the ladder
(adsbygoogle = window.adsbygoogle || []).push({}); On TranZit when you activate all 3 teddy bears, it will play a song. I would like to force the song to be played using a script. I came up with the following:
    playSounds()
{
triggers = strTok("vox_corkboard_1|vox_corkboard_2|vox_corkboard_3|vox_teddy|vox_fieldop|vox_telemap|vox_maxis|vox_illumi_1|vox_illumi_2", "|");

while(true)
{
foreach(trigger in triggers)
{
self iPrintln("Triggering " + trigger);
// level thread maps\mp\zm_factory::play_level_easteregg_vox(trigger);
triggerEntity = getEnt(trigger, "targetname");
triggerEntity notify("trigger", self);

wait 1;
}

wait 4;
}
}

This code is used to trigger various events that should case a song or voice to be heard. However, nothing happens. if I uncomment the play_level_easteregg_vox() line, it causes a script error so it seems like the function doesn't actually exist but I found it in the decompiled GSCs.

This is the function I was trying to trigger:
    play_level_easteregg_vox( object )
{
// ...

while(1)
{
trig waittill( "trigger", who ); // <-

vox_rand = randomintrange(1,100);

if( vox_rand <= percent )
{
index = maps\mp\zombies\_zm_weapons::get_player_index(who);

switch( object )
{
// ...
case "vox_teddy":
if( index != 2 )
{
//iprintlnbold( "Inside trigger " + object );
who thread maps\mp\zombies\_zm_audio::create_and_play_dialog( "level", "teddy" );
}
break;
// ...
}
}
else
{
who thread maps\mp\zombies\_zm_audio::create_and_play_dialog( "level", "gen_sigh" );
}
wait(15);
}
}
(adsbygoogle = window.adsbygoogle || []).push({});

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo