Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tank_drop_powerups()
- {
- flag_wait( "start_zombie_round_logic" );
- a_drop_nodes = [];
- i = 0;
- while ( i < 3 )
- {
- drop_num = i + 1;
- a_drop_nodes[ i ] = getvehiclenode( "tank_powerup_drop_" + drop_num, "script_noteworthy" );
- a_drop_nodes[ i ].next_drop_round = level.round_number + i;
- s_drop = getstruct( "tank_powerup_drop_" + drop_num, "targetname" );
- a_drop_nodes[ i ].drop_pos = s_drop.origin;
- i++;
- }
- a_possible_powerups = array( "nuke", "full_ammo", "zombie_blood", "insta_kill", "fire_sale", "double_points" );
- while ( 1 )
- {
- self ent_flag_wait( "tank_moving" );
- _a129 = a_drop_nodes;
- _k129 = getFirstArrayKey( _a129 );
- while ( isDefined( _k129 ) )
- {
- node = _a129[ _k129 ];
- dist_sq = distance2dsquared( node.origin, self.origin );
- if ( dist_sq < 250000 )
- {
- a_players = get_players_on_tank( 1 );
- if ( a_players.size > 0 )
- {
- if ( level.staff_part_count[ "elemental_staff_lightning" ] == 0 && level.round_number >= node.next_drop_round )
- {
- str_powerup = random( a_possible_powerups );
- level thread maps/mp/zombies/_zm_powerups::specific_powerup_drop( str_powerup, node.drop_pos );
- node.next_drop_round = level.round_number + randomintrange( 8, 12 );
- break;
- }
- else
- {
- level notify( "sam_clue_tank" );
- }
- }
- }
- _k129 = getNextArrayKey( _a129, _k129 );
- }
- wait 2;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment