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

Plutonium

  1. Home
  2. BO1 Modding Support & Discussion
  3. Unable to #include custom .gsc and maps/ scripts

Unable to #include custom .gsc and maps/ scripts

Scheduled Pinned Locked Moved BO1 Modding Support & Discussion
5 Posts 3 Posters 618 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.
  • bhfffundefined Offline
    bhfffundefined Offline
    bhfff
    wrote on last edited by bhfff
    #1

    Hello, I'm pretty lost right now as I have no idea what I'm doing wrong.

    I want to test my gsc code for zombies, but it seems like my files aren't getting loaded.

    Here's a screenshot of my current setup:
    alt text

    and here's my console output.

    +                                                                                                                       maps/so_narrative2_frontend_anim                                                                                        Loading script "scripts/zm_dragitz_init"...                                                                             scripts/zm_dragitz_init                                                                                                 Error:                                                                                                                  ******* Server script compile error *******                                                                             Error: Could not find script 'dragitz_lib/zm_dragitz_custom_functions'                                                  ************************************                                                                                                                                                                                                            ====================================================                                                                    Com_ERROR: ^U Server script compile error                                                                               Could not find script 'dragitz_lib/zm_dragitz_custom_functions'                                                                                                                                                                                 (see console for details)                                                                                                                                                                                                                       ====================================================                                                                                                                                                                                            Plutonium r3178> 
    

    Edit: for some reason, the above console output is badly formatted

    I think I have looked pretty much everywhere, but I can not find any code example to including custom files. The best examples are here but, unfortunately, no example code is shown.
    https://plutonium.pw/docs/modding/gsc/how-to-gsc/#including-other-gsc
    https://plutonium.pw/docs/modding/gsc/new-scripting-features/#custom-named-scripts-specifics

    The other solution would be putting all files in \scripts\ , but then another problem arises.

    Some of the .gsc scripts in map, can not be loaded.

    I'll give an example:

    The following string:

    monkey_zombie = self maps\_zombiemode_net::network_safe_stalingrad_spawn( "monkey_zombie_spawn", 1 );
    

    throws: Could not find script 'maps/_zombiemode_net' in the console

    I fully understand that custom_scripts::main() is called before anything else, but the string is in its own function.
    Also#include maps\_utility; loads without problems, so I don't understand why maps/_zombiemode_net can't be found.

    Unfortunately I can not attach .zip / .7z files, so below you can find the minimal code for reproduction of this behaviour.

    #include maps\_utility;
    #include common_scripts\utility;
    
    /*
    
    _zombiemode_ai_monkey.gsc
    The following function has been taken from _zombiemode_ai_monkey.gsc for a different purpose, so the original code wouldn't be affected.
    		
    */
    
    BRUDDA_monkey_zombie_spawn( OWNER ){	
    	
    	pack = OWNER;
    	
    	self.script_moveoverride = true; 
    	
    	if( !isDefined( level.num_monkey_zombies ) )
    	{
    		level.num_monkey_zombies = 0;
    	}
    	level.num_monkey_zombies++;
    	
    	monkey_zombie = self maps\_zombiemode_net::network_safe_stalingrad_spawn( "monkey_zombie_spawn", 1 );
    	
    	monkey_zombie.team = "allies";
    	
    	monkey_zombie.owner = OWNER;
    	
    	self.count = 666;
    
    	self.last_spawn_time = GetTime();
    
    	if( !spawn_failed( monkey_zombie ) ) 
    	{ 
    		monkey_zombie.script_noteworthy = self.script_noteworthy;
    		monkey_zombie.targetname = self.targetname;
    		monkey_zombie.target = self.target;
    		monkey_zombie.deathFunction = maps\_zombiemode_ai_monkey::monkey_zombie_die;
    		monkey_zombie.animname = "monkey_zombie";
    
    		monkey_zombie.pack = OWNER;
    		monkey_zombie.ground_hit_time = pack.ground_hit_time;
    
    		monkey_zombie.spawn_origin = self.origin;
    		monkey_zombie.spawn_angles = self.angles;
    
    		monkey_zombie.team = "allies";
    		
    		monkey_zombie thread monkey_zombie_think();
    	}
    
    
    	return monkey_zombie;
    }
    
    1 Reply Last reply
    0
    • Soliderrorundefined Offline
      Soliderrorundefined Offline
      Soliderror
      wrote on last edited by
      #2

      If these scripts are ment to be in zombies only do this.

      In the t5/scripts folder make a new folder for each zombies map. Like this, t5/scripts/zombie_theater and then in that zombie_theater add your scripts, this will allow the scripts to load on kino. Do this for all the maps, and it load on each map. Just make sure each script either had an init or main function threading all the functions that need to be threaded.

      1 Reply Last reply
      0
      • Soliderrorundefined Offline
        Soliderrorundefined Offline
        Soliderror
        wrote on last edited by Soliderror
        #3
        This post is deleted!
        1 Reply Last reply
        0
        • Soliderrorundefined Offline
          Soliderrorundefined Offline
          Soliderror
          wrote on last edited by
          #4

          I would like to help you more, If you have discord please ask me some questions and ill help, my discord is Soliderror#9431

          Imshishiundefined 1 Reply Last reply
          1
          • Imshishiundefined Offline
            Imshishiundefined Offline
            Imshishi
            replied to Soliderror on last edited by
            #5

            Soliderror Could you possibly help me with some mapping issues? I'm getting the error 'Could not find script "maps/_zombiesmode_utility"

            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