When I try to compile the script it says that it is bad syntax at line 219 which in my .gsc is timer--;
Any help is appreciated
When I try to compile the script it says that it is bad syntax at line 219 which in my .gsc is timer--;
Any help is appreciated
JezuzLizard Thanks a lot! I did not realise it was a loop.
Are two+ players still needed for tombstone? Because I can not get it working. Im trying to have this and the perk limit removal scripts in the same one if that is possible? Also I do not know gsc so I probably did something wrong but the perk limit removal works just not the tombstone fix. Here is the code if I could get some help.
#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.perk_purchase_limit = 9;
for(;;)
{
level waittill("connected", player);
player thread welcome();
}
isTown();
}
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 );
}
}
}
isTown()
{
if (isDefined(level.zombiemode_using_tombstone_perk) && level.zombiemode_using_tombstone_perk)
{
level thread perk_machine_spawn_init();
thread solo_tombstone_removal();
thread turn_tombstone_on();
}
}
welcome()
{
self endon("disconnect");
self waittill("spawned_player");
wait 7;
self iprintln("^2" +self.name + "^7 , your perk limit has been removed");
}