UGX-Mods

Call of Duty: Black Ops 1 => Tutorial Desk => Scripting => Topic started by: klevi on May 10, 2022, 08:10:55 pm

Title: Song Easter Egg
Post by: klevi on May 10, 2022, 08:10:55 pm
A quick kino der toten easter egg for bo1 in case someone needs it:
 
1.Open your mapname.gsc and find the funciton named init_zombie_mapname() and paste this line in the bottom of the function
Code Snippet
xml
level thread song_easter_egg();
2. Sroll down in the bottom of the file and paste this code:
Code Snippet
cpp
song_easter_egg()
{
    level.song_meteors_found = 0;
    triggers = GetEntArray( "meteor_trig","targetname" );
    size = triggers.size;
    array_thread(triggers  , ::activate_meteor, size);
}

activate_meteor(size)
{

    self SetHintString( "" );
    self SetCursorHint( "HINT_NOICON" );
    self UseTriggerRequireLookAt();

    self PlayLoopSound( "meteor_loop" );
    self waittill( "trigger" );
    self StopLoopSound();
    self PlaySound( "meteor_affirm" );
    self Delete();
    level.song_meteors_found++;
   
    if(level.song_meteors_found == size)
        players = get_players();
            for(i = 0; i < players.size; i++)
                players[i] PlaySound("INSERT YOUR SONG ALIAS NAME HERE");
}
3. Go in radiant, and make some trigger_use , as much as you want, can be more than 3. Then press N at each of them and give them
key: targetname
value:meteor_trig
 
 
Then compile, don't also forget to build your sound too, but that's not a part of what im gonna cover, this is only the main part that you need.