UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

Buyable Ending ( All in zombie_MAPNAME.gsc )

broken avatar :(
Created 2 years ago
by NGcaudle
0 Members and 1 Guest are viewing this topic.
594 views
broken avatar :(
×
broken avatar :(
Location: caOntario
Date Registered: 31 August 2014
Last active: 3 days ago
Posts
265
Respect
Forum Rank
Mr. Elemental
Primary Group
Community Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
Kiss me daddy
×
NGcaudle's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
NGcaudle's Contact & Social LinksNGcaudle
Hello today I bring my buyable ending script for black ops 1. Please note that I used Toms WaW buyable ending as a base for this so if you added that into WaW you should remember some of this a bit. I also made the script only in the zombie_MAPNAME.gsc to make it easier to add.
 
 
Step 1. in zombie_mapname.gsc add this in the main() function above: maps\_zombiemode::main();
Code Snippet
cpp
    end_trig = getentarray( "end_game","targetname" );
    array_thread( end_trig,::end_game );

Step 2. At the bottom of your zombie_mapname.gsc paste this functions below:
Code Snippet
cpp
end_game()
{
    user = undefined;
    cost = 25000;                        // Cost here                        

    self setCursorHint("HINT_NOICON");
    self UseTriggerRequireLookAt();
    self setHintString("press ^3&&1 ^7to End the Game [Cost: "+cost+"]");    // Hintstring for buyable ending

    while(1)
    {
        self waittill("trigger", user);
        if( is_player_valid(user) && user.score >= cost )
        {
            play_sound_at_pos( "cha_ching", self.origin );
            user thread maps\_zombiemode_score::minus_to_player_score( cost );
            self delete();

            level notify( "end_game" );
            level thread end_text();
        }
        else
        {
            play_sound_at_pos( "no_cha_ching", self.origin );
        }
    }
}

end_text()    // Buyable ending display after bought
{
    end_text = [];

    players = get_players();
    for( i = 0; i < players.size; i++ )
    {
        end_text[i] = NewClientHudElem( players[i] );
        end_text[i].alignX = "center";
        end_text[i].alignY = "middle";
        end_text[i].horzAlign = "center";
        end_text[i].vertAlign = "middle";
        end_text[i].y -= 80;                            // - Moves the Text Down/ + Move the text up
        end_text[i].foreground = true;
        end_text[i].fontScale = 2;
        end_text[i].alpha = 0;
        end_text[i].color = ( 1.0, 1.0, 1.0 );
        end_text[i] SetText( "You Beat The Map" );        // Edit the ending saying here
        end_text[i] FadeOverTime( 1 );
        end_text[i].alpha = 1;
    }    
    wait 6;
    {
        end_text[i] FadeOverTime( 1 );
        end_text[i].alpha = 0;
    }
}
Feel free to change the buyable ending quote. Please make sure to credit everyone that was a part of making his possible for Black Ops 1.
 
Credit:
NGcaudle
Tom_BMX
Vertasea

 
Loading ...