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

jcal147

Insane-Known Member
Messages
63
Points
368
Code:
Doorvalues(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 );
    }
}
 

CabCon

Head Administrator
Staff member
Head Staff Team
Messages
4,590
Points
828
Code:
Doorvalues(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 );
    }
}
You could use a if which checks the hint before, because all zombie "buyable" doors hints begin with:
Code:
default_buy_debris
 

jcal147

Insane-Known Member
Messages
63
Points
368
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 );
}
}
 

jcal147

Insane-Known Member
Messages
63
Points
368
problem is that unbuyable doors such as doors opened with turbine say buy door for "value"
how do I fix this?
 

CabCon

Head Administrator
Staff member
Head Staff Team
Messages
4,590
Points
828
problem is that unbuyable doors such as doors opened with turbine say buy door for "value"
how do I fix this?
Yeah
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 );
}
}
This is not correct you can't do it like this. :smile: I will look into it later.
 

Top