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 carpenter

broken avatar :(
Created 12 years ago
by pcmodder
0 Members and 1 Guest are viewing this topic.
4,075 views
broken avatar :(
×
broken avatar :(
Location: gb
Date Registered: 22 September 2014
Last active: 6 years ago
Posts
360
Respect
Forum Rank
Perk Hacker
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
Here to make epic maps
×
pcmodder's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
pcmodder's Contact & Social Linksken5hir0pcmodderugx
Credit to n122q45 and ConvictioNDR for a speedy response to me asking about a buyable carpenter i thought i would package it into a quick copy paste for others.

First create a trigger use in radiant and give the KVP " targetname" -- "spawn_carpenter"

Paste this code into nazi_zombie_mapname.gsc

Code Snippet
Plaintext
buy_now(){
trig = getent("spawn_carpenter","targetname");
//trig SetHintString( "Power must be turned on" );
trig SetHintString( "Press and Hold &&1 to buy a Carpenter" );
trig SetCursorHint( "HINT_NOICON" );
trig UseTriggerRequireLookAt();
//flag_wait("electricity_on");
//trig SetHintString( "Press and Hold &&1 to buy a Carpenter" );
for( ;; )
{
trig waittill( "trigger", player );
cost = 5000;
if (player maps\_laststand::player_is_in_laststand() )
{
continue;
}

if(player in_revive_trigger())
{
continue;
}

if( player isThrowingGrenade() )
{
wait( 0.1 );
continue;
}

if( player isSwitchingWeapons() )
{
wait(0.1);
continue;
}

if ( player.score < cost )
{
//player iprintln( "Not enough points to buy Perk: " + perk );
self playsound("deny");
player thread maps\_zombiemode_perks::play_no_money_perk_dialog();
continue;
}

player maps\_zombiemode_score::minus_to_player_score( cost );
level thread maps\_zombiemode_powerups::start_carpenter(player.origin);
}
}

Add the thread to the same file here

Code Snippet
Plaintext
/*--------------------
ZOMBIE MODE
----------------------*/
[[level.DLC3.weapons]]();
[[level.DLC3.powerUps]]();
maps\_zombiemode::main();
        thread buy_now();

Build the mod and compile the map. This is good for an ingame extra and useful for testing spawns.
broken avatar :(
×
broken avatar :(
Location: gbManchester
Date Registered: 15 March 2014
Last active: 6 years ago
Posts
120
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
ด้้้้้็็็็็้้้้้็็็็็้้้้้้้้็็็็็้้้้้็็็็็้้้้้้
Signature
▒█▀▀▀█ █▀▀ █▀▀ ░▀░ █▀▀ ░▀░ █▀▀█ █░░ ▀▀█▀▀ ▒█▀▀▀█ ▒█▀▀█
▒█░░▒█ █▀▀ █▀▀ ▀█▀ █░░ ▀█▀ █▄▄█ █░░ ░▒█░░ ░▀▀▀▄▄ ▒█░▄▄
▒█▄▄▄█ ▀░░ ▀░░ ▀▀▀ ▀▀▀ ▀▀▀ ▀░░▀ ▀▀▀ ░▒█░░ ▒█▄▄▄█ ▒█▄▄█
×
Official_TSG_'s Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Nice dude! will be using in the future! <3
-TSG
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 16 October 2014
Last active: 11 years ago
Posts
48
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
n122q45's Groups
n122q45's Contact & Social Links
next time ask the person who scripted it if you can release it, because people ( not me ) will get mad because they did all the work. But unlike those people i never require consent for helping people  :lol:
broken avatar :(
×
broken avatar :(
[UGX] Documentation Writer & Programmer
Location: usLos Angeles, CA
Date Registered: 23 August 2013
Last active: 3 years ago
Posts
1,322
Respect
Forum Rank
Zombie Colossus
Primary Group
UGX Team Member
My Groups
More
My Contact & Social Links
More
Personal Quote
(ง º ω º )ง u wont sum m8y?
Signature
Do not take life too seriously. You will never get out of it alive.
×
DidUknowiPwn's Groups
UGX Team Member
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
next time ask the person who scripted it if you can release it, because people ( not me ) will get mad because they did all the work. But unlike those people i never require consent for helping people  :lol:
Why would it matter? The thread where this originated from is open to the public ._.
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 16 October 2014
Last active: 11 years ago
Posts
48
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
n122q45's Groups
n122q45's Contact & Social Links
Why would it matter? The thread where this originated from is open to the public ._.
trust me, even if it was emailed to everyone, some people get really horny over their scripts :troll:

 
Loading ...