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

How do you set a win game button on a custom COD5 map?

broken avatar :(
Created 10 years ago
by MechaniCole
0 Members and 1 Guest are viewing this topic.
1,628 views
broken avatar :(
×
broken avatar :(
Location: ca
Date Registered: 24 August 2016
Last active: 10 years ago
Posts
2
Respect
Forum Rank
Fresh Corpse
Primary Group
Member
×
MechaniCole's Groups
MechaniCole's Contact & Social Links
I just finished my first map and I can not find any tutorial to create a finish button. HELP
broken avatar :(
×
broken avatar :(
The King of Zombies
Location: usLouisiana
Date Registered: 24 June 2013
Last active: 6 years ago
Posts
2,148
Respect
Forum Rank
King of the Zombies
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Signature
Donate to me if you enjoy my work. https://www.paypal.me/thezombiekilla6
×
Dust's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Dust's Contact & Social Linksdust103194MrZ0mbiesFanaticMrZ0mbiesFanatic
open up your mapname.gsc, at the end put this.

Code Snippet
Plaintext
ending()
{
cost = 0; //Change this to how much you want the buyable ending to cost
ending_trig = getent("ending_trig","targetname");
ending_trig SetCursorHint("HINT_NOICON");
ending_trig sethintstring ("Press &&1 to end the game [Cost: " + cost + "]"); //Change the stuff in "" to what you want the text to say that the players see, the %%1 indicates the players "use" button
while(1)
{
ending_trig waittill("trigger",player);
if( player.score >= cost )
{
                player maps\_zombiemode_score::minus_to_player_score( cost );
                level notify( "end_game" );
}
}
}

at the top under zombiemode::main() put
Code Snippet
Plaintext
thread ending();

In radiant, create a trigger_use and give it the targetname of ending_trig
Last Edit: August 28, 2016, 01:25:58 am by Dust

 
Loading ...