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
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
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
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