
Posts
2,789
Respect
230Add +1
Forum Rank
King of the Zombies
Primary Group
Community Daedra
Login Issues
Forgot password?Activate Issues
Account activation email not received? Wrong account activation email used?Other Problems?
Contact Support - Help Center Get help on the UGX Discord. Join it now!
power_switch_1()
{
//Used for setting the notify's for the perk machines aswell as the trigger,
//you will need to copy/paste this function for multiple switches.
//make sure to change the KVP info for each power switch if needed.
trig = getent("power_switch_1", "targetname");
trig.zombie_cost = 0;
trig sethintstring("Press & hold &&1 to turn perks on");
while(1)
{
trig waittill( "trigger", who );
{
if( is_player_valid( who ) )
{
if( who.score >= trig.zombie_cost )
{
level notify("juggernog_on");
level notify("sleight_on");
level notify("doubletap_on");
level notify( "Pack_A_Punch_on" );
level notify( "revive_on" );
level thread power_switch_init();
trig delete();
}
}
}
}
}
power_switch_visual_1()
{
// Makes the switch look normal, we NEED to run a seperate function on EACH switch that we use
//them
sub_switch_1 = getent("power_switch_lever","targetname");
sub_switch_1 notsolid();
sub_switch_1 rotateroll(-90,.3);
sub_switch_1 playsound("switch_flip");
playfx(level._effect["switch_sparks"] ,getstruct("power_switch_fx_1","targetname").origin);
ClientNotify( "pl1" ); // power lights on
exploder(600);
}