That little Easter Egg do you need? I can write it for you please send me a reply
Thanks
So i have planned, at round 20 there spawns around the map 3 teddybear, the players shoot them all 3 teddybears and they go away and there spawn another teddybear and then you can go to them and pay 20`000 to end the game.
endgame_ee_init() { //if called from wrong place level.round_number is considered undefined, so just gonna put this here. if(!IsDefined(level.round_number)) level.round_number = 0; //level var to increment/check against level.teddy_bear_hit = 0; //grab our main teddy, the end game teddy and hide/disable it. main_teddy = GetEnt("main_teddy_bear_ee", "targetname"); main_teddy Hide(); main_teddy trigger_off(); //grab the 3 teddies and hide & disable them until round 20 as well. teddy_loc = GetEntArray("teddy_bear_ee", "targetname"); for(i = 0; i < teddy_loc.size; i++) { teddy_loc[i] Hide(); teddy_loc[i] trigger_off(); } //wait until round 20 reaches in order to start the teddy logics. while(level.round_number < 20) level waittill("between_round_over"); array_thread( teddy_loc, ::endgame_ee_logic ); }
endgame_ee_logic() { //make ourselves visible and enable our trigger self Show(); self trigger_on(); //make it a damagable ent then grab a damage notify, disable it, and then hide it. self SetCanDamage( true ); self waittill("damage"); self SetCanDamage( false ); self Hide(); //increment teddy_bear_hit, necessary for below level.teddy_bear_hit++; //if we didn't hit at least 3 bears yet, exit the func here. //if we did that means all 3 were hit and now we can do the final bear logic. if(level.teddy_bear_hit < 3) return; else level thread endgame_ee_final_logic(); }
endgame_ee_final_logic() { //some ranom sound I found. play_sound_2D( "bright_sting" ); //grab main bear, make it visible and turn on its trigger main_teddy = GetEnt("main_teddy_bear_ee", "targetname"); main_teddy Show(); main_teddy trigger_on(); wait 0.05; //create scoped var for cost end_game_cost = 20000; //give it its hint string stuff. main_teddy.trigger = Spawn("trigger_radius", main_teddy.origin, 9, 80, 64); main_teddy.trigger SetCursorHint("HINT_NOICON"); main_teddy.trigger UseTriggerRequireLookAt(); main_teddy.trigger SetHintString("Press ^3&&1^7 to end the game [Cost: ^3" + end_game_cost + "^7]"); while( true ) { main_teddy.trigger waittill("trigger", player); //don't recall if UseButtonPressed condition is needed here, give it a try anyway if it acts funky remove it and see what happens //anyway you know what goes on here. if( is_player_valid(player) && player UseButtonPressed() && player.score >= end_game_cost ) { player maps\_zombiemode_score::minus_to_player_score( end_game_cost ); //if you're using the ugx mod then use this //level notify("end_game"); //if not don't uncomment this maps\_zombiemode::end_game(); break; }
} }
Last Edit: January 08, 2015, 09:16:50 pm by DidUknowiPwn
endgame_ee_init() { //if called from wrong place level.round_number is considered undefined, so just gonna put this here. if(!IsDefined(level.round_number)) level.round_number = 0; //level var to increment/check against level.teddy_bear_hit = 0;; //grab our main teddy, the end game teddy and hide/disable it. main_teddy = GetEnt("main_teddy_bear_ee", "targetname"); main_teddy Hide(); main_teddy trigger_off(); //wait until round 20 reaches in order to start the teddy logics. while(level.round_numer < 20 ) level waittill("between_round_over");
endgame_ee_logic() { //make it a damagable ent then grab a damage notify, disable it, and then hide it. self SetCanDamage( true ); self waittill("damage"); self SetCanDamage( false ); self Hide(); //increment teddy_bear_hit, necessary for below level.teddy_bear_hit++; //if we didn't hit at least 3 bears yet, exit the func here. //if we did that means all 3 were hit and now we can do the final bear logic. if(level.teddy_bear_hit < 3) return; else level thread endgame_ee_final_logic(); }
endgame_ee_final_logic() { //some ranom sound I found. play_sound_2D( "bright_sting" ); //grab main bear, make it visible and turn on its trigger main_teddy = GetEnt("main_teddy_bear_ee", "targetname"); main_teddy Show(); main_teddy trigger_on(); waittillframeend; Earthquake( 1, 3, main_teddy.origin, 500 );//have a small earthquake? idk your call. waittillframeend; //create scoped var for cost end_game_cost = 20000; //give it its hint string stuff. main_teddy SetCursorHint("HINT_NOICON"); main_teddy UseTriggerRequireLookAt(); main_teddy SetHintString("Press ^3&&1^7 to end the game [Cost: ^3" + end_game_cost + "^7]"); while( true ) { main_teddy waittill("trigger", player); //don't recall if UseButtonPressed condition is needed here, give it a try anyway if it acts funky remove it and see what happens //anyway you know what goes on here. if( is_player_valid(player) && player UseButtonPressed() && player.score >= end_game_cost ) { player maps\_zombiemode_score::minus_to_player_score( end_game_cost ); //if you're using the ugx mod then use this and delete the end_game func below //level notify("end_game"); //if not don't comment this out maps\_zombiemode::end_game(); break; }
If you want scripts / features made for you, then contact me by PM or email / skype etc it will cost you tho so if you have no intention of reciprocating don't even waste my time