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

Plutonium

  1. Home
  2. BO1 Modding Support & Discussion
  3. .GSC Scripts for Zombies Only

.GSC Scripts for Zombies Only

Scheduled Pinned Locked Moved BO1 Modding Support & Discussion
7 Posts 4 Posters 1.3k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Gremulockundefined Offline
    Gremulockundefined Offline
    Gremulock
    wrote on last edited by Gremulock
    #1

    I'm having a problem with GSC scripts. I have created and been simply running scripts through the Plutonium\storage\t5\scripts folder. The scripts work fine and everything, it is just the problem is I am trying to figure out how I can get certain scripts to only load for zombies. I know that for T6, you create a sub-folder called "zm" and put them in there. However, when I do that same process for T5, the scripts are never executed. The main reason why this is a problem is because when the game loads the front end (main menu), by my understanding, when the script attempts to compile, it can't read a function such as "give_perk" from "maps/_zombiemode_perks" because the front end fast file does not have that script, resulting in a crash. I have tried putting the scripts into "sp/zom", but with no success. Any help with this would be greatly appreciated!

    Here is one of the scripts that I have created, which puts my issue onto display. It simply gives a player juggernog for free when they spawn. The script works fine if you put it into the scripts folder AFTER loading the game, and then boot into a zombies map. But upon going to the main menu, the game will crash, because it can't find the script "maps/_zombiemode_perks":

    #include common_scripts\utility;
    #include maps\_utility;
    
    init()
    {
    	if (GetDvarInt("zombiemode") == 0 || !IsSubStr(level.script, "zombie_") || isdefined(level.zombietron_mode))
    	{
    		return;
    	}
    
    	flag_init("initial_blackscreen_passed");
    
    	level thread on_player_connect();
    	level thread on_fade_in_complete();
    }
    
    on_player_connect()
    {
    	for (;;)
    	{
    		level waittill("connecting", player);
    		player thread on_player_spawned();
    	}
    }
    
    on_player_spawned()
    {
    	self endon("disconnect");
    	level endon("end_game");
    
    	for (;;)
    	{
    		self waittill("spawned_player");
    		self thread give_free_juggernog();
    	}
    }
    
    give_free_juggernog()
    {
    	self notify("end_give_free_juggernog");
    	self endon("end_give_free_juggernog");
    	self endon("death");
    	self endon("disconnect");
    	self endon("player_downed");
    	level endon("end_game");
    
    	flag_wait("initial_blackscreen_passed");
    
    	if (is_juggernog_active() && !self HasPerk("specialty_armorvest"))
    	{
    		self maps\_zombiemode_perks::give_perk("specialty_armorvest", false);
    	}
    }
    
    on_fade_in_complete()
    {
    	level endon("end_game");
    
    	level waittill("fade_in_complete");
    
    	flag_set("initial_blackscreen_passed");
    }
    
    is_juggernog_active()
    {
    	vending_triggers = GetEntArray("zombie_vending", "targetname");
    
    	for (i = 0; i < vending_triggers.size; i++)
    	{
    		perk = vending_triggers[i].script_noteworthy;
    
    		if (perk == "specialty_armorvest")
    		{
    			return true;
    		}
    	}
    
    	return false;
    }
    
    
    1 Reply Last reply
    0
    • FragsAreUsundefined Offline
      FragsAreUsundefined Offline
      FragsAreUs Plutonium Staff
      wrote on last edited by
      #2

      there should be a scripts/sp/zom folder, and you can put your zombie only scripts in there

      Gremulockundefined 1 Reply Last reply
      0
      • Gremulockundefined Offline
        Gremulockundefined Offline
        Gremulock
        replied to FragsAreUs on last edited by
        #3

        FragsAreUs As I said in my post, I have already tried that, and the scripts are never executed unfortunately. The only one that gets executed is the one in there, called "zm_spawn_fix.gsc", which I believe Plutonium adds automatically.

        FragsAreUsundefined 1 Reply Last reply
        0
        • dontknowletsplundefined Offline
          dontknowletsplundefined Offline
          dontknowletspl
          wrote on last edited by dontknowletspl
          #4

          For me sp/zom folder scripts only load on server. For now best option for me has been file replace with maps folder.

          Gremulockundefined 1 Reply Last reply
          0
          • FragsAreUsundefined Offline
            FragsAreUsundefined Offline
            FragsAreUs Plutonium Staff
            replied to Gremulock on last edited by
            #5

            Gremulock change your init to main and they should load

            tiger9980undefined 1 Reply Last reply
            0
            • Gremulockundefined Offline
              Gremulockundefined Offline
              Gremulock
              replied to dontknowletspl on last edited by
              #6

              @dontknowletsplay FragsAreUs Thanks for the help guys, I appreciate it!

              1 Reply Last reply
              0
              • tiger9980undefined Offline
                tiger9980undefined Offline
                tiger9980
                replied to FragsAreUs on last edited by tiger9980
                #7

                FragsAreUs Could you explain what you mean by your comment?

                I don't understand "change your init to main and they should load"

                1 Reply Last reply
                0

                • Login

                • Don't have an account? Register

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