Answered his script applies to all doors, how do I make it only apply to doors you can buy to open

Discussion in 'Call of Duty: Black Ops 2 Answered Questions' started by UnsignedGlitch, Jul 17, 2018.

  1. UnsignedGlitch

    UnsignedGlitch #C? Donator

    126
    62
    303
    Credits:
    712
    Code:
    DoorDebrisvalues(value)
    {
    foreach( door in getentarray( "zombie_door", "targetname" ) )
    {
    door.zombie_cost = value;
    door thread maps/mp/zombies/_zm_utility::set_hint_string( door, "default_buy_door", value );
    }
    foreach( debris in getentarray( "zombie_debris", "targetname" ) )
    {
    debris.zombie_cost = value;
    debris thread maps/mp/zombies/_zm_utility::set_hint_string( debris, "default_buy_debris", value );
    }
    }
    
    how can I make every door change the cost even the powered doors that need turbine :wink:
     
  2. candy

    candy G59 Terrorist Donator

    1,189
    778
    398
    Credits:
    6,421
    Just thread this on your DoorDebrisvalues function;
    Code:
    setTurbineDoorCost( val )
    {
        ary = getentarray("zombie_door", "targetname");
        trig = spawn("trigger_radius", (-7163,5246,-55), 1, 20, 10);
        while(1)
        {
            trig waittill("trigger", user);
            if(user useButtonPressed())
            {
                user maps/mp/zombies/_zm_score::minus_to_player_score( val, 1 );
                ary[14] notify("local_power_on");
                ary[15] notify("local_power_on");
                break;
            }
        }
    }
     
    DF_AUS likes this.

Share This Page