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:

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