#include maps\mp\_utility; #include common_scripts\utility; #include maps\mp\gametypes_zm\_hud_util; #include maps\mp\gametypes_zm\_hud_message; #include maps\mp\zombies\_zm_perks; init() { level thread perk_machine_spawn_init(); thread solo_tombstone_removal(); thread turn_tombstone_on(); } solo_tombstone_removal() { notify( "tombstone_on" ); } turn_tombstone_on() { while ( 1 ) { machine = getentarray( "vending_tombstone", "targetname" ); machine_triggers = getentarray( "vending_tombstone", "target" ); i = 0; while ( i < machine.size ) { machine[ i ] setmodel( level.machine_assets[ "tombstone" ].off_model ); i++; } level thread do_initial_power_off_callback( machine, "tombstone" ); array_thread( machine_triggers, ::set_power_on, 0 ); level waittill( "tombstone_on" ); i = 0; while ( i < machine.size ) { machine[ i ] setmodel( level.machine_assets[ "tombstone" ].on_model ); machine[ i ] vibrate( vectorScale( ( 0, -1, 0 ), 100 ), 0,3, 0,4, 3 ); machine[ i ] playsound( "zmb_perks_power_on" ); machine[ i ] thread perk_fx( "tombstone_light" ); machine[ i ] thread play_loop_on_machine(); i++; } level notify( "specialty_scavenger_power_on" ); array_thread( machine_triggers, ::set_power_on, 1 ); if ( isDefined( level.machine_assets[ "tombstone" ].power_on_callback ) ) { array_thread( machine, level.machine_assets[ "tombstone" ].power_on_callback ); } level waittill( "tombstone_off" ); if ( isDefined( level.machine_assets[ "tombstone" ].power_off_callback ) ) { array_thread( machine, level.machine_assets[ "tombstone" ].power_off_callback ); } array_thread( machine, ::turn_perk_off ); players = get_players(); _a1718 = players; _k1718 = getFirstArrayKey( _a1718 ); while ( isDefined( _k1718 ) ) { player = _a1718[ _k1718 ]; player.hasperkspecialtytombstone = undefined; _k1718 = getNextArrayKey( _a1718, _k1718 ); } } }