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,210 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
Hi all i was looking at the buyable ammo and i was beginning to think about a buyable carpenter. to include a bit of diversity in the map by removing carpenter from the zombie drops and making it buyable off the wall with a timer for example 45 seconds or a minute. Then different strategies could be used , is it as easy as changing ammo for carpenter in the buyable ammo script? As i would not know how to include a timed delay into it to make it unspammable. Thanks :)
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
try this:

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 );
thread start_carpenter(player.origin);
}
}

make a trigger_use and give it the targetname of "spawn_carpenter"

also dont forget to thread this. It doesnt matter wheather its in _zombiemode.gsc or mapname.gsc as long as u thread it at the bottom of the init/main function

I also put in support for requiring power
Last Edit: November 08, 2014, 09:52:33 pm by n122q45
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
Thanks for that , i am not sure where to add that to or what to put into the main:function ,
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
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
I keep getting script compile erro on the bottom line

thread start_carpenter(player.origin);
              *
****************************************
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
I keep getting script compile erro on the bottom line

thread start_carpenter(player.origin);
              *
****************************************
can i see a picture of the line that u used to thread the function?
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
In my mapname.gsc i added
         /*--------------------
    ZOMBIE MODE
   ----------------------*/
   [[level.DLC3.weapons]]();
   [[level.DLC3.powerUps]]();
   maps\_zombiemode::main();
        thread function_name();buy_now();

Then i added your script to the same file
   

        /*--------------------
    FUNCTION CALLS - POST _Load
   ----------------------*/
   level.zone_manager_init_func = ::dlc3_zone_init;
   level thread DLC3_threadCalls2();
}

buy_now(){

Some reason my steam does not take screenshots in WAW : )  Thanks
Last Edit: November 09, 2014, 12:02:57 am by pcmodder
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 21 March 2014
Last active: 9 months ago
Posts
227
Respect
Forum Rank
Mr. Elemental
Primary Group
Member
My Contact & Social Links
More
Personal Quote
I the Mighty
×
ConvictioNDR's Groups
       thread function_name();buy_now();
should be
Code Snippet
Plaintext
thread buy_now();
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
should be
Code Snippet
Plaintext
thread buy_now();

Even with changing that like you said i get the same error as previously. Do i need to put

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

I am getting confused as the error says this line

thread start_carpenter(player.origin);

Thanks for helping
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 21 March 2014
Last active: 9 months ago
Posts
227
Respect
Forum Rank
Mr. Elemental
Primary Group
Member
My Contact & Social Links
More
Personal Quote
I the Mighty
×
ConvictioNDR's Groups
Just noticed on n1's code it should be
Code Snippet
Plaintext
level thread maps\_zombiemode_powerups::start_carpenter(player.origin);
so replace that line
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
Yes!! Thanks guys changing that line worked perfectly , this will be good for in game and also for testing my spawns. I will thanks accordingly in my map :)
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
Just noticed on n1's code it should be
Code Snippet
Plaintext
level thread maps\_zombiemode_powerups::start_carpenter(player.origin);
so replace that line
woops forgot that he wasnt in _zombiemode_powerups  :facepalm:
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
http://ugx-mods.com/forum/index.php?topic=4648.new#new

For future reference thanks n1q22 and convictioNDR :)

Double Post Merge: November 09, 2014, 01:04:14 am
woops forgot that he wasnt in _zombiemode_powerups  :facepalm:

Still you sent that code less than an hour after my question very nicely done i say
Last Edit: November 09, 2014, 01:04:14 am by pcmodder
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
Still you sent that code less than an hour after my question very nicely done i say
i did that all the time when i had my n123q45 account :P but be careful... i may help people, but im a major troll in the chat :troll:

 
Loading ...