Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Donate
Collapse

Plutonium

gawtnoodundefined

gawtnood

@gawtnood
About
Posts
3
Topics
2
Shares
0
Groups
0
Followers
4
Following
5

Posts

Recent Best Controversial

  • Could someone help me figure out the issue with this if statement?
    gawtnoodundefined gawtnood

    Im trying to set up an if-statement for a wonderfizz mod to be universal. Essentially im trying to add a new function which specifically checks which perks the player has per whatever respective map they're on, this is the first snippet from an elseif chain I use to establish that. It checks the map, then checks which perks the player has drank, and returns the mPerks list at the end with a int.

    getMPerks()
    {
        mperks = [];
        
        if(level.script == "zm_highrise"){
        if(isDefined( level.zombiemode_using_juggernaut_perk) && level.zombiemode_using_juggernaut_perk)
        {
            mperks[mperks.size] = "specialty_armorvest";
        }
        if ( isDefined( level.zombiemode_using_sleightofhand_perk ) && level.zombiemode_using_sleightofhand_perk )
        {
            mperks[mperks.size] = "specialty_fastreload";
        }
        if ( isDefined( level.zombiemode_using_revive_perk ) && level.zombiemode_using_revive_perk )
        {
            mperks[mperks.size] = "specialty_quickrevive";
        }
        if ( isDefined( level.zombiemode_using_doubletap_perk ) && level.zombiemode_using_doubletap_perk )
        {
            mperks[mperks.size] = "specialty_rof";
        }
        if(isDefined( level.zombiemode_using_additionalprimaryweapon_perk) && level.zombiemode_using_additionalprimaryweapon_perk)
        {
            mperks[mperks.size] = "specialty_additionalprimaryweapon";
        }
        if ( isDefined( level.zombiemode_using_chugabud_perk ) && level.zombiemode_using_chugabud_perk )
        {
            mperks[mperks.size] = "specialty_finalstand";
        }
    return mPerks;
    }
    
    

    This is another function I use which checks the current map and returns the base amount of perks, regardless of what the player has drank.

    
            mLimit = 0;
            if(level.script == "zm_highrise"){
                mLimit = 6;
            }
            else if(level.script == "zm_transit")
            {
                mLimit = 6;
            }
            else if(level.script == "zm_buried")
            {
                mLimit = 7;
            }
            else if(level.script == "zm_prison")
            {
                mLimit = 5;
            }
            else if(level.script == "zm_nuked")
            {
                mLimit = 4;
            }
            else if(level.script == "zm_tomb")
            {
                mLimit = 9;    
            }
    
            return mlimit;
    
        }
    
    

    My problem lies here, these if statements checks to see which perks the player has drank, and compares it to the map's perk limit. Then, it checks if the perks they've drank is less than the base limit per the map.

    alt text

    But when I load into a game, the machine functions fine until you've drank the max amount of perks, originally it prompts you that you have either reached the map limit, or cant drink anymore perks. But if you use it once more from the perks available on the map, the game crashes. Why arent these if statements working?

    alt text

    BO2 Modding Support & Discussion

  • Is there a GSC which adds all existing perks to every map?
    gawtnoodundefined gawtnood

    Pistakilla Well, more specifically, only the custom machines for the missing perks on the map which are purchasable. Without all the extras like the unique power-ups, zombie counter, tweaked spawnrates etc

    BO2 Modding Support & Discussion

  • Is there a GSC which adds all existing perks to every map?
    gawtnoodundefined gawtnood

    I like zombies++ because of its feature where it adds all perks, but I want to avoid the un-necessary extras. Is this possible?

    BO2 Modding Support & Discussion
  • 1 / 1
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Donate