mirror of
https://github.com/JezuzLizard/BO2-Reimagined.git
synced 2025-06-11 15:48:05 -05:00
Powerups: add last powerup fx
This commit is contained in:
@ -354,6 +354,7 @@
|
||||
|
||||
## Powerups
|
||||
* Grabbing time based powerups that are already active add to timer instead of resetting timer
|
||||
* An fx plays when a powerup drops if it is the last powerup of a cycle
|
||||
|
||||
### Nuke
|
||||
* Kills all zombies instantly
|
||||
|
@ -83,6 +83,7 @@ main()
|
||||
replaceFunc(maps\mp\zombies\_zm_perks::turn_tombstone_on, scripts\zm\replaced\_zm_perks::turn_tombstone_on);
|
||||
replaceFunc(maps\mp\zombies\_zm_perks::wait_for_player_to_take, scripts\zm\replaced\_zm_perks::wait_for_player_to_take);
|
||||
replaceFunc(maps\mp\zombies\_zm_power::standard_powered_items, scripts\zm\replaced\_zm_power::standard_powered_items);
|
||||
replaceFunc(maps\mp\zombies\_zm_powerups::get_next_powerup, scripts\zm\replaced\_zm_powerups::get_next_powerup);
|
||||
replaceFunc(maps\mp\zombies\_zm_powerups::powerup_grab, scripts\zm\replaced\_zm_powerups::powerup_grab);
|
||||
replaceFunc(maps\mp\zombies\_zm_powerups::full_ammo_powerup, scripts\zm\replaced\_zm_powerups::full_ammo_powerup);
|
||||
replaceFunc(maps\mp\zombies\_zm_powerups::nuke_powerup, scripts\zm\replaced\_zm_powerups::nuke_powerup);
|
||||
|
@ -2,6 +2,42 @@
|
||||
#include common_scripts\utility;
|
||||
#include maps\mp\zombies\_zm_utility;
|
||||
|
||||
get_next_powerup()
|
||||
{
|
||||
powerup = level.zombie_powerup_array[level.zombie_powerup_index];
|
||||
level.zombie_powerup_index++;
|
||||
|
||||
if ( level.zombie_powerup_index >= level.zombie_powerup_array.size )
|
||||
{
|
||||
level.zombie_powerup_index = 0;
|
||||
randomize_powerups();
|
||||
level thread play_fx_on_powerup_dropped();
|
||||
}
|
||||
|
||||
return powerup;
|
||||
}
|
||||
|
||||
play_fx_on_powerup_dropped()
|
||||
{
|
||||
level waittill( "powerup_dropped", powerup );
|
||||
|
||||
if ( powerup.solo )
|
||||
{
|
||||
playfx( level._effect["powerup_grabbed_solo"], powerup.origin );
|
||||
playfx( level._effect["powerup_grabbed_wave_solo"], powerup.origin );
|
||||
}
|
||||
else if ( powerup.caution )
|
||||
{
|
||||
playfx( level._effect["powerup_grabbed_caution"], powerup.origin );
|
||||
playfx( level._effect["powerup_grabbed_wave_caution"], powerup.origin );
|
||||
}
|
||||
else
|
||||
{
|
||||
playfx( level._effect["powerup_grabbed"], powerup.origin );
|
||||
playfx( level._effect["powerup_grabbed_wave"], powerup.origin );
|
||||
}
|
||||
}
|
||||
|
||||
powerup_grab( powerup_team )
|
||||
{
|
||||
if ( isdefined( self ) && self.zombie_grabbable )
|
||||
|
Reference in New Issue
Block a user