Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Donate
Collapse

Plutonium

  1. Home
  2. BO2 Modding Releases & Resources
  3. [Resource] [GSC] Working Tombstone Fix - Works on Tranzit and Town

[Resource] [GSC] Working Tombstone Fix - Works on Tranzit and Town

Scheduled Pinned Locked Moved BO2 Modding Releases & Resources
22 Posts 13 Posters 4.8k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Mr. Androidundefined Offline
    Mr. Androidundefined Offline
    Mr. Android
    Plutonium Admin
    wrote on last edited by
    #2

    Good stuff mate - nice post.

    1 Reply Last reply
    0
    • LuqyAFundefined Offline
      LuqyAFundefined Offline
      LuqyAF
      wrote on last edited by
      #3

      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");
      }
      
      JezuzLizardundefined 1 Reply Last reply
      0
      • LuqyAFundefined LuqyAF

        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");
        }
        
        JezuzLizardundefined Offline
        JezuzLizardundefined Offline
        JezuzLizard
        Plutonium Staff
        wrote on last edited by
        #4

        LuqyAF Anything after a for loop with no end condition will not be read put the isTown() above the level.perk_purchase_limit = 9; so it will run it.

        A while loop or for loop tells a computer to do something indefinitely until told otherwise, this means in your current code isTown() is never read since the current for loop you are using has no end condition which means everything after it won't be run.

        LuqyAFundefined Tomlemanundefined 2 Replies Last reply
        0
        • JezuzLizardundefined JezuzLizard

          LuqyAF Anything after a for loop with no end condition will not be read put the isTown() above the level.perk_purchase_limit = 9; so it will run it.

          A while loop or for loop tells a computer to do something indefinitely until told otherwise, this means in your current code isTown() is never read since the current for loop you are using has no end condition which means everything after it won't be run.

          LuqyAFundefined Offline
          LuqyAFundefined Offline
          LuqyAF
          wrote on last edited by
          #5

          JezuzLizard Thanks a lot! I did not realise it was a loop.

          1 Reply Last reply
          0
          • H3X1Cundefined Offline
            H3X1Cundefined Offline
            H3X1C
            Plutonium Staff
            wrote on last edited by
            #6

            Forgive me but what was actually broken with tombstone?

            JezuzLizardundefined 1 Reply Last reply
            0
            • H3X1Cundefined H3X1C

              Forgive me but what was actually broken with tombstone?

              JezuzLizardundefined Offline
              JezuzLizardundefined Offline
              JezuzLizard
              Plutonium Staff
              wrote on last edited by
              #7

              H3X1C In Plutonium when a dedicated server launches the game thinks its a solo game. Tombstone is removed because of this since tombstone is useless in solo( you have to bleedout to take advantage of tombstone ).

              H3X1Cundefined 1 Reply Last reply
              0
              • JezuzLizardundefined JezuzLizard

                H3X1C In Plutonium when a dedicated server launches the game thinks its a solo game. Tombstone is removed because of this since tombstone is useless in solo( you have to bleedout to take advantage of tombstone ).

                H3X1Cundefined Offline
                H3X1Cundefined Offline
                H3X1C
                Plutonium Staff
                wrote on last edited by
                #8

                JezuzLizard said in [GSC] Working Tombstone Fix - Works on Tranzit and Town:

                H3X1C In Plutonium when a dedicated server launches the game thinks its a solo game. Tombstone is removed because of this since tombstone is useless in solo( you have to bleedout to take advantage of tombstone ).

                Ah that makes sense, thanks for the explanation 🙂

                1 Reply Last reply
                0
                • JezuzLizardundefined JezuzLizard

                  Simply include this code in your script:

                  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 );
                  		}
                  	}
                  }
                  
                  perk_machine_spawn_init()
                  {
                  	match_string = "";
                  	location = level.scr_zm_map_start_location;
                  	if ( location != "default" && location == "" && isDefined( level.default_start_location ) )
                  	{
                  		location = level.default_start_location;
                  	}
                  	match_string = ( level.scr_zm_ui_gametype + "_perks_" ) + location;
                  	pos = [];
                  	if ( isDefined( level.override_perk_targetname ) )
                  	{
                  		structs = getstructarray( level.override_perk_targetname, "targetname" );
                  	}
                  	else
                  	{
                  		structs = getstructarray( "zm_perk_machine", "targetname" );
                  	}
                  	_a3578 = structs;
                  	_k3578 = getFirstArrayKey( _a3578 );
                  	while ( isDefined( _k3578 ) )
                  	{
                  		struct = _a3578[ _k3578 ];
                  		if ( isDefined( struct.script_string ) )
                  		{
                  			tokens = strtok( struct.script_string, " " );
                  			_a3583 = tokens;
                  			_k3583 = getFirstArrayKey( _a3583 );
                  			while ( isDefined( _k3583 ) )
                  			{
                  				token = _a3583[ _k3583 ];
                  				if ( token == match_string )
                  				{
                  					pos[ pos.size ] = struct;
                  				}
                  				_k3583 = getNextArrayKey( _a3583, _k3583 );
                  			}
                  		}
                  		else pos[ pos.size ] = struct;
                  		_k3578 = getNextArrayKey( _a3578, _k3578 );
                  	}
                  	if ( !isDefined( pos ) || pos.size == 0 )
                  	{
                  		return;
                  	}
                  	precachemodel( "zm_collision_perks1" );
                  	i = 0;
                  	while ( i < pos.size )
                  	{
                  		perk = pos[ i ].script_noteworthy;
                  		if ( isDefined( perk ) && isDefined( pos[ i ].model ) )
                  		{
                  			use_trigger = spawn( "trigger_radius_use", pos[ i ].origin + vectorScale( ( 0, -1, 0 ), 30 ), 0, 40, 70 );
                  			use_trigger.targetname = "zombie_vending";
                  			use_trigger.script_noteworthy = perk;
                  			use_trigger triggerignoreteam();
                  			perk_machine = spawn( "script_model", pos[ i ].origin );
                  			perk_machine.angles = pos[ i ].angles;
                  			perk_machine setmodel( pos[ i ].model );
                  			if ( isDefined( level._no_vending_machine_bump_trigs ) && level._no_vending_machine_bump_trigs )
                  			{
                  				bump_trigger = undefined;
                  			}
                  			else
                  			{
                  				bump_trigger = spawn( "trigger_radius", pos[ i ].origin, 0, 35, 64 );
                  				bump_trigger.script_activated = 1;
                  				bump_trigger.script_sound = "zmb_perks_bump_bottle";
                  				bump_trigger.targetname = "audio_bump_trigger";
                  				if ( perk != "specialty_weapupgrade" )
                  				{
                  					bump_trigger thread thread_bump_trigger();
                  				}
                  			}
                  			collision = spawn( "script_model", pos[ i ].origin, 1 );
                  			collision.angles = pos[ i ].angles;
                  			collision setmodel( "zm_collision_perks1" );
                  			collision.script_noteworthy = "clip";
                  			collision disconnectpaths();
                  			use_trigger.clip = collision;
                  			use_trigger.machine = perk_machine;
                  			use_trigger.bump = bump_trigger;
                  			if ( isDefined( pos[ i ].blocker_model ) )
                  			{
                  				use_trigger.blocker_model = pos[ i ].blocker_model;
                  			}
                  			if ( isDefined( pos[ i ].script_int ) )
                  			{
                  				perk_machine.script_int = pos[ i ].script_int;
                  			}
                  			if ( isDefined( pos[ i ].turn_on_notify ) )
                  			{
                  				perk_machine.turn_on_notify = pos[ i ].turn_on_notify;
                  			}
                  			if ( perk == "specialty_scavenger" || perk == "specialty_scavenger_upgrade" )
                  			{
                  				use_trigger.script_sound = "mus_perks_tombstone_jingle";
                  				use_trigger.script_string = "tombstone_perk";
                  				use_trigger.script_label = "mus_perks_tombstone_sting";
                  				use_trigger.target = "vending_tombstone";
                  				perk_machine.script_string = "tombstone_perk";
                  				perk_machine.targetname = "vending_tombstone";
                  				if ( isDefined( bump_trigger ) )
                  				{
                  					bump_trigger.script_string = "tombstone_perk";
                  				}
                  			}
                  			if ( isDefined( level._custom_perks[ perk ] ) && isDefined( level._custom_perks[ perk ].perk_machine_set_kvps ) )
                  			{
                  				[[ level._custom_perks[ perk ].perk_machine_set_kvps ]]( use_trigger, perk_machine, bump_trigger, collision );
                  			}
                  		}
                  		i++;
                  	}
                  }
                  
                  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();
                  	}
                  }
                  

                  and this code in your init():

                  isTown();
                  

                  and finally make sure to include:

                  #include maps\mp\zombies\_zm_perks;
                  

                  Basically the way it works is GSC only reads the first function with the same name. So if you have a function that you want to override simply call it first before the game calls the base function and it will be overridden.

                  edit: Updated to be map agnostic so it will only attempt to fix tombstone on Tranzit and Town.
                  edit2: Changed the condition to something more accurate - credit to Sparker for the recommendation.

                  tedundefined Offline
                  tedundefined Offline
                  ted
                  wrote on last edited by
                  #9

                  JezuzLizard Hey, are you able to message me on Discord? I have a question ted#1404, would really appreciate your assistance

                  1 Reply Last reply
                  0
                  • JezuzLizardundefined JezuzLizard

                    LuqyAF Anything after a for loop with no end condition will not be read put the isTown() above the level.perk_purchase_limit = 9; so it will run it.

                    A while loop or for loop tells a computer to do something indefinitely until told otherwise, this means in your current code isTown() is never read since the current for loop you are using has no end condition which means everything after it won't be run.

                    Tomlemanundefined Offline
                    Tomlemanundefined Offline
                    Tomleman
                    wrote on last edited by
                    #10

                    JezuzLizard #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();
                    isTown();
                    {
                    level.perk_purchase_limit = 9;
                    for(;;)
                    {
                    level waittill("connected", player);
                    player thread welcome();
                    }

                    }

                    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");
                    }

                    i have it like this but it says it has a ad syntax around line 6

                    1 Reply Last reply
                    0
                    • Altrucityundefined Offline
                      Altrucityundefined Offline
                      Altrucity
                      wrote on last edited by
                      #11

                      I'm having some issues getting this to work, I'm getting these errors:

                      **** 5 script error(s):
                      **** Unresolved external : "array_thread" with 3 parameters in "tombstone" at l
                      ines 1,1 ****
                      **** Too many parameters: "vibrate" with 6 parameters in "tombstone"
                      **** Unresolved external : "array_thread" with 2 parameters in "tombstone" at l
                      ines 1,1,1 *

                      The only lines that have been modified are lines 1 - 7, everything else has not been touched, only copied from the original post.

                      Here is the code:

                      #include maps\mp\zombies\_zm_perks;
                      
                      init()
                      {
                      	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 );
                      		}
                      	}
                      }
                      
                      perk_machine_spawn_init()
                      {
                      	match_string = "";
                      	location = level.scr_zm_map_start_location;
                      	if ( location != "default" && location == "" && isDefined( level.default_start_location ) )
                      	{
                      		location = level.default_start_location;
                      	}
                      	match_string = ( level.scr_zm_ui_gametype + "_perks_" ) + location;
                      	pos = [];
                      	if ( isDefined( level.override_perk_targetname ) )
                      	{
                      		structs = getstructarray( level.override_perk_targetname, "targetname" );
                      	}
                      	else
                      	{
                      		structs = getstructarray( "zm_perk_machine", "targetname" );
                      	}
                      	_a3578 = structs;
                      	_k3578 = getFirstArrayKey( _a3578 );
                      	while ( isDefined( _k3578 ) )
                      	{
                      		struct = _a3578[ _k3578 ];
                      		if ( isDefined( struct.script_string ) )
                      		{
                      			tokens = strtok( struct.script_string, " " );
                      			_a3583 = tokens;
                      			_k3583 = getFirstArrayKey( _a3583 );
                      			while ( isDefined( _k3583 ) )
                      			{
                      				token = _a3583[ _k3583 ];
                      				if ( token == match_string )
                      				{
                      					pos[ pos.size ] = struct;
                      				}
                      				_k3583 = getNextArrayKey( _a3583, _k3583 );
                      			}
                      		}
                      		else pos[ pos.size ] = struct;
                      		_k3578 = getNextArrayKey( _a3578, _k3578 );
                      	}
                      	if ( !isDefined( pos ) || pos.size == 0 )
                      	{
                      		return;
                      	}
                      	precachemodel( "zm_collision_perks1" );
                      	i = 0;
                      	while ( i < pos.size )
                      	{
                      		perk = pos[ i ].script_noteworthy;
                      		if ( isDefined( perk ) && isDefined( pos[ i ].model ) )
                      		{
                      			use_trigger = spawn( "trigger_radius_use", pos[ i ].origin + vectorScale( ( 0, -1, 0 ), 30 ), 0, 40, 70 );
                      			use_trigger.targetname = "zombie_vending";
                      			use_trigger.script_noteworthy = perk;
                      			use_trigger triggerignoreteam();
                      			perk_machine = spawn( "script_model", pos[ i ].origin );
                      			perk_machine.angles = pos[ i ].angles;
                      			perk_machine setmodel( pos[ i ].model );
                      			if ( isDefined( level._no_vending_machine_bump_trigs ) && level._no_vending_machine_bump_trigs )
                      			{
                      				bump_trigger = undefined;
                      			}
                      			else
                      			{
                      				bump_trigger = spawn( "trigger_radius", pos[ i ].origin, 0, 35, 64 );
                      				bump_trigger.script_activated = 1;
                      				bump_trigger.script_sound = "zmb_perks_bump_bottle";
                      				bump_trigger.targetname = "audio_bump_trigger";
                      				if ( perk != "specialty_weapupgrade" )
                      				{
                      					bump_trigger thread thread_bump_trigger();
                      				}
                      			}
                      			collision = spawn( "script_model", pos[ i ].origin, 1 );
                      			collision.angles = pos[ i ].angles;
                      			collision setmodel( "zm_collision_perks1" );
                      			collision.script_noteworthy = "clip";
                      			collision disconnectpaths();
                      			use_trigger.clip = collision;
                      			use_trigger.machine = perk_machine;
                      			use_trigger.bump = bump_trigger;
                      			if ( isDefined( pos[ i ].blocker_model ) )
                      			{
                      				use_trigger.blocker_model = pos[ i ].blocker_model;
                      			}
                      			if ( isDefined( pos[ i ].script_int ) )
                      			{
                      				perk_machine.script_int = pos[ i ].script_int;
                      			}
                      			if ( isDefined( pos[ i ].turn_on_notify ) )
                      			{
                      				perk_machine.turn_on_notify = pos[ i ].turn_on_notify;
                      			}
                      			if ( perk == "specialty_scavenger" || perk == "specialty_scavenger_upgrade" )
                      			{
                      				use_trigger.script_sound = "mus_perks_tombstone_jingle";
                      				use_trigger.script_string = "tombstone_perk";
                      				use_trigger.script_label = "mus_perks_tombstone_sting";
                      				use_trigger.target = "vending_tombstone";
                      				perk_machine.script_string = "tombstone_perk";
                      				perk_machine.targetname = "vending_tombstone";
                      				if ( isDefined( bump_trigger ) )
                      				{
                      					bump_trigger.script_string = "tombstone_perk";
                      				}
                      			}
                      			if ( isDefined( level._custom_perks[ perk ] ) && isDefined( level._custom_perks[ perk ].perk_machine_set_kvps ) )
                      			{
                      				[[ level._custom_perks[ perk ].perk_machine_set_kvps ]]( use_trigger, perk_machine, bump_trigger, collision );
                      			}
                      		}
                      		i++;
                      	}
                      }
                      
                      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();
                      	}
                      }
                      
                      
                      1 Reply Last reply
                      0
                      • 115Gameplaysundefined Offline
                        115Gameplaysundefined Offline
                        115Gameplays
                        wrote on last edited by
                        #12

                        Just adding this code snippet in %localappdata%\Plutonium\storage\t6\scripts\zm\zm_transit should work fine. (Create all folders if not exist)

                        main()
                        {
                        	replaceFunc( maps/mp/zm_transit_utility::solo_tombstone_removal, ::solo_tombstone_removal );
                        }
                        
                        solo_tombstone_removal()
                        {
                        	return;
                        }
                        

                        Don't forget to compile it properly before adding it into that folder.

                        water-meh-lawnundefined litbeepundefined Altrucityundefined 3 Replies Last reply
                        1
                        • 115Gameplaysundefined 115Gameplays

                          Just adding this code snippet in %localappdata%\Plutonium\storage\t6\scripts\zm\zm_transit should work fine. (Create all folders if not exist)

                          main()
                          {
                          	replaceFunc( maps/mp/zm_transit_utility::solo_tombstone_removal, ::solo_tombstone_removal );
                          }
                          
                          solo_tombstone_removal()
                          {
                          	return;
                          }
                          

                          Don't forget to compile it properly before adding it into that folder.

                          water-meh-lawnundefined Offline
                          water-meh-lawnundefined Offline
                          water-meh-lawn
                          wrote on last edited by
                          #13

                          115Gameplays Works, thank you!

                          1 Reply Last reply
                          0
                          • 115Gameplaysundefined 115Gameplays

                            Just adding this code snippet in %localappdata%\Plutonium\storage\t6\scripts\zm\zm_transit should work fine. (Create all folders if not exist)

                            main()
                            {
                            	replaceFunc( maps/mp/zm_transit_utility::solo_tombstone_removal, ::solo_tombstone_removal );
                            }
                            
                            solo_tombstone_removal()
                            {
                            	return;
                            }
                            

                            Don't forget to compile it properly before adding it into that folder.

                            litbeepundefined Offline
                            litbeepundefined Offline
                            litbeep
                            wrote on last edited by
                            #14

                            115Gameplays did not work for me, I receive the error

                            local variable 'maps' not found.
                            when compiling

                            1 Reply Last reply
                            0
                            • GabrielCrackundefined Offline
                              GabrielCrackundefined Offline
                              GabrielCrack
                              wrote on last edited by
                              #15

                              can someon pass the copiled file?

                              115Gameplaysundefined 1 Reply Last reply
                              0
                              • 115Gameplaysundefined 115Gameplays

                                Just adding this code snippet in %localappdata%\Plutonium\storage\t6\scripts\zm\zm_transit should work fine. (Create all folders if not exist)

                                main()
                                {
                                	replaceFunc( maps/mp/zm_transit_utility::solo_tombstone_removal, ::solo_tombstone_removal );
                                }
                                
                                solo_tombstone_removal()
                                {
                                	return;
                                }
                                

                                Don't forget to compile it properly before adding it into that folder.

                                Altrucityundefined Offline
                                Altrucityundefined Offline
                                Altrucity
                                wrote on last edited by
                                #16

                                115Gameplays It’s still not working for me. I very well may not be doing it correctly though. Any more help would be greatly appreciated!

                                115Gameplaysundefined 1 Reply Last reply
                                0
                                • Cirossundefined Offline
                                  Cirossundefined Offline
                                  Ciross
                                  wrote on last edited by
                                  #17

                                  I got this error:

                                  ******* script compile error *******
                                  [ERROR]:compiler:scripts/zm/hello.gsc:30:2: syntax error, unexpected notify
                                  ************************************
                                  
                                  Cirossundefined 1 Reply Last reply
                                  0
                                  • Cirossundefined Ciross

                                    I got this error:

                                    ******* script compile error *******
                                    [ERROR]:compiler:scripts/zm/hello.gsc:30:2: syntax error, unexpected notify
                                    ************************************
                                    
                                    Cirossundefined Offline
                                    Cirossundefined Offline
                                    Ciross
                                    wrote on last edited by
                                    #18

                                    For those having this error, you can simply fix it by adding level behind the notify function.
                                    Since the event is listened to it.

                                    1 Reply Last reply
                                    0
                                    • badbugundefined Offline
                                      badbugundefined Offline
                                      badbug
                                      wrote on last edited by
                                      #19
                                      This post is deleted!
                                      1 Reply Last reply
                                      0
                                      • JezuzLizardundefined JezuzLizard

                                        Simply include this code in your script:

                                        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 );
                                        		}
                                        	}
                                        }
                                        
                                        perk_machine_spawn_init()
                                        {
                                        	match_string = "";
                                        	location = level.scr_zm_map_start_location;
                                        	if ( location != "default" && location == "" && isDefined( level.default_start_location ) )
                                        	{
                                        		location = level.default_start_location;
                                        	}
                                        	match_string = ( level.scr_zm_ui_gametype + "_perks_" ) + location;
                                        	pos = [];
                                        	if ( isDefined( level.override_perk_targetname ) )
                                        	{
                                        		structs = getstructarray( level.override_perk_targetname, "targetname" );
                                        	}
                                        	else
                                        	{
                                        		structs = getstructarray( "zm_perk_machine", "targetname" );
                                        	}
                                        	_a3578 = structs;
                                        	_k3578 = getFirstArrayKey( _a3578 );
                                        	while ( isDefined( _k3578 ) )
                                        	{
                                        		struct = _a3578[ _k3578 ];
                                        		if ( isDefined( struct.script_string ) )
                                        		{
                                        			tokens = strtok( struct.script_string, " " );
                                        			_a3583 = tokens;
                                        			_k3583 = getFirstArrayKey( _a3583 );
                                        			while ( isDefined( _k3583 ) )
                                        			{
                                        				token = _a3583[ _k3583 ];
                                        				if ( token == match_string )
                                        				{
                                        					pos[ pos.size ] = struct;
                                        				}
                                        				_k3583 = getNextArrayKey( _a3583, _k3583 );
                                        			}
                                        		}
                                        		else pos[ pos.size ] = struct;
                                        		_k3578 = getNextArrayKey( _a3578, _k3578 );
                                        	}
                                        	if ( !isDefined( pos ) || pos.size == 0 )
                                        	{
                                        		return;
                                        	}
                                        	precachemodel( "zm_collision_perks1" );
                                        	i = 0;
                                        	while ( i < pos.size )
                                        	{
                                        		perk = pos[ i ].script_noteworthy;
                                        		if ( isDefined( perk ) && isDefined( pos[ i ].model ) )
                                        		{
                                        			use_trigger = spawn( "trigger_radius_use", pos[ i ].origin + vectorScale( ( 0, -1, 0 ), 30 ), 0, 40, 70 );
                                        			use_trigger.targetname = "zombie_vending";
                                        			use_trigger.script_noteworthy = perk;
                                        			use_trigger triggerignoreteam();
                                        			perk_machine = spawn( "script_model", pos[ i ].origin );
                                        			perk_machine.angles = pos[ i ].angles;
                                        			perk_machine setmodel( pos[ i ].model );
                                        			if ( isDefined( level._no_vending_machine_bump_trigs ) && level._no_vending_machine_bump_trigs )
                                        			{
                                        				bump_trigger = undefined;
                                        			}
                                        			else
                                        			{
                                        				bump_trigger = spawn( "trigger_radius", pos[ i ].origin, 0, 35, 64 );
                                        				bump_trigger.script_activated = 1;
                                        				bump_trigger.script_sound = "zmb_perks_bump_bottle";
                                        				bump_trigger.targetname = "audio_bump_trigger";
                                        				if ( perk != "specialty_weapupgrade" )
                                        				{
                                        					bump_trigger thread thread_bump_trigger();
                                        				}
                                        			}
                                        			collision = spawn( "script_model", pos[ i ].origin, 1 );
                                        			collision.angles = pos[ i ].angles;
                                        			collision setmodel( "zm_collision_perks1" );
                                        			collision.script_noteworthy = "clip";
                                        			collision disconnectpaths();
                                        			use_trigger.clip = collision;
                                        			use_trigger.machine = perk_machine;
                                        			use_trigger.bump = bump_trigger;
                                        			if ( isDefined( pos[ i ].blocker_model ) )
                                        			{
                                        				use_trigger.blocker_model = pos[ i ].blocker_model;
                                        			}
                                        			if ( isDefined( pos[ i ].script_int ) )
                                        			{
                                        				perk_machine.script_int = pos[ i ].script_int;
                                        			}
                                        			if ( isDefined( pos[ i ].turn_on_notify ) )
                                        			{
                                        				perk_machine.turn_on_notify = pos[ i ].turn_on_notify;
                                        			}
                                        			if ( perk == "specialty_scavenger" || perk == "specialty_scavenger_upgrade" )
                                        			{
                                        				use_trigger.script_sound = "mus_perks_tombstone_jingle";
                                        				use_trigger.script_string = "tombstone_perk";
                                        				use_trigger.script_label = "mus_perks_tombstone_sting";
                                        				use_trigger.target = "vending_tombstone";
                                        				perk_machine.script_string = "tombstone_perk";
                                        				perk_machine.targetname = "vending_tombstone";
                                        				if ( isDefined( bump_trigger ) )
                                        				{
                                        					bump_trigger.script_string = "tombstone_perk";
                                        				}
                                        			}
                                        			if ( isDefined( level._custom_perks[ perk ] ) && isDefined( level._custom_perks[ perk ].perk_machine_set_kvps ) )
                                        			{
                                        				[[ level._custom_perks[ perk ].perk_machine_set_kvps ]]( use_trigger, perk_machine, bump_trigger, collision );
                                        			}
                                        		}
                                        		i++;
                                        	}
                                        }
                                        
                                        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();
                                        	}
                                        }
                                        

                                        and this code in your init():

                                        isTown();
                                        

                                        and finally make sure to include:

                                        #include maps\mp\zombies\_zm_perks;
                                        

                                        Basically the way it works is GSC only reads the first function with the same name. So if you have a function that you want to override simply call it first before the game calls the base function and it will be overridden.

                                        edit: Updated to be map agnostic so it will only attempt to fix tombstone on Tranzit and Town.
                                        edit2: Changed the condition to something more accurate - credit to Sparker for the recommendation.

                                        badbugundefined Offline
                                        badbugundefined Offline
                                        badbug
                                        wrote on last edited by
                                        #20
                                        This post is deleted!
                                        1 Reply Last reply
                                        0
                                        • Altrucityundefined Altrucity

                                          115Gameplays It’s still not working for me. I very well may not be doing it correctly though. Any more help would be greatly appreciated!

                                          115Gameplaysundefined Offline
                                          115Gameplaysundefined Offline
                                          115Gameplays
                                          wrote on last edited by
                                          #21

                                          Altrucity hello it is possible that plutonium updated its way to interact with the game and the script no longer works

                                          Still I have the scripts I made compiled in a GitHub repo where you can download here:
                                          https://github.com/raulrm00/plutonium-t6-scripts/releases/download/v3.0.0/compiled_scripts.zip

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • 1
                                          • 2
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Users
                                          • Groups
                                          • Donate