Modme Forums

Help Free Perk Drop Powerup

Game Modding | Call of Duty: Black Ops 3 | Scripting


ModmeBot:

Thread By: nabere
Hey, I'm currently trying to add a powerup that will give a free perk. I understand that the code is already in the giant. If anyone can direct me how to use this that would be great.


ModmeBot:

Reply By: WARDOGSK93
Black Ops III already has a powerup for giving players a free perk and this powerups script is by default included in MAPNAME GSC and CSC only reason it doesn't drop is because the free perk script tells it not to ever drop when the script is loaded to make it drop with regular powerups add this code at the bottom of your MAPNAME GSC main function

if(isdefined(level.zombie_powerups) && isdefined(level.zombie_powerups["free_perk"]))
    level.zombie_powerups["free_perk"].func_should_drop_with_regular_powerups = &zm_powerups::func_should_always_drop;

to make the powerup drop at diff times you're going to have to change the '&zm_powerups::func_should_always_drop' to your own function and make that function return 'TRUE' / 'FALSE' depending on if it can be dropped, look in other power up scripts for examples, fire sale / bonfire sale scripts for example have there own functions which tell the game when they can be dropped 'func_should_drop_fire_sale' in 'zm_powerup_fire_sale.gsc'


ModmeBot:

Reply By: nabere

WARDOGSK93
Black Ops III already has a powerup for giving players a free perk and this powerups script is by default included in MAPNAME GSC and CSC only reason it doesn't drop is because the free perk script tells it not to ever drop when the script is loaded to make it drop with regular powerups add this code at the bottom of your MAPNAME GSC main function if(isdefined(level.zombie_powerups) && isdefined(level.zombie_powerups["free_perk"])) level.zombie_powerups["free_perk"].func_should_drop_with_regular_powerups = &zm_powerups::func_should_always_drop; to make the powerup drop at diff times you're going to have to change the '&zm_powerups::func_should_always_drop' to your own function and make that function return 'TRUE' / 'FALSE' depending on if it can be dropped, look in other power up scripts for examples, fire sale / bonfire sale scripts for example have there own functions which tell the game when they can be dropped 'func_should_drop_fire_sale' in 'zm_powerup_fire_sale.gsc'


Thanks for the help :), I'll try this later.