Maybe what I'm trying to do is impossible but I was trying to edit the way zombies spawn for my map because I can't have so many zombie ents (g-spawn ).
I have a zone that covers all the map and one zombie targeted to hat zone. I'm only using risers and all of them are normal risers. Then I edited this function in _zombiemode_zone_manager.gsc:
Code Snippet
Plaintext
manage_zones( initial_zone )
Just before the else I changed this:
Code Snippet
Plaintext
// activate any associated zombie_rise locations if ( level.zones[ zone_name ].rise_locations.size > 0 ) // level.zones[ zone_name ].rise_locations.size == 9 { // Soy-yo's edit level.zombie_rise_spawners = []; // restart variable if( true )//if( no_dupes ) Soy-yo's edit: leave this here; maybe need to re-edit { for(x=0; x<level.zones[ zone_name ].rise_locations.size; x++) { // Soy-yo's edit unlock = false; level.zones[ zone_name ].rise_locations[x].locked_spawner = true; unlock = maps\cube::checkCanActivateStruct(level.zones[ zone_name ].rise_locations[x]); // only get structs in a cube where a player is if( unlock ) { level.zones[ zone_name ].rise_locations[x].locked_spawner = false; level.zombie_rise_spawners[ level.zombie_rise_spawners.size ] = level.zones[ zone_name ].rise_locations[x]; } } } }
And for this line:
Code Snippet
Plaintext
unlock = maps\cube::checkCanActivateStruct(level.zones[ zone_name ].rise_locations[x]); // only get structs in a cube where a player is
"player.isInCube" has the number of the cube where the player is; and "check_point_in_active_zone()" return the zone where the struct is.
Well, and the problem here is that zombies continue spawning all over the map. Then I checked how many times "checkCanActivateStruct()" is called and it's only called with the first struct.
Maybe I misunderstood the function or there's something wrong there I can't see. Hope you understand what I'm trying to explain, and thank you for any help.
I really don't understand why you are getting g-spawn with less than 500 ents, but if you are getting it so often, then you will want to check coop, cause I thought I fixed mine and a few more players brought it back. Also, make sure your not using glowing eyes on zombies, that spawns an ent too. You could also disable gibbing, by setting each zombie to gibbed already, which should help.
Did you check what your function is returning? That continue should not be there, cause that can cause undefined, which will make all structs available for spawning. Perhaps print something or make false? Also you may need to add something else that then locks them again if it returns false.
Code Snippet
Plaintext
// activate any associated zombie_rise locations if ( level.zones[ zone_name ].rise_locations.size > 0 ) // level.zones[ zone_name ].rise_locations.size == 9 { // Soy-yo's edit level.zombie_rise_spawners = []; // restart variable if( true )//if( no_dupes ) Soy-yo's edit: leave this here; maybe need to re-edit { for(x=0; x<level.zones[ zone_name ].rise_locations.size; x++) { // Soy-yo's edit unlock = false; level.zones[ zone_name ].rise_locations[x].locked_spawner = true; unlock = maps\cube::checkCanActivateStruct(level.zones[ zone_name ].rise_locations[x]); // only get structs in a cube where a player is if(isdefined(unlock)){ iprintlnbold(unlock, " lock status"); }else{ iprintlnbold("unlock not defined"); } wait(.4);//added so you can see the prints. remove then if( unlock ) { level.zones[ zone_name ].rise_locations[x].locked_spawner = false; level.zombie_rise_spawners[ level.zombie_rise_spawners.size ] = level.zones[ zone_name ].rise_locations[x]; }else{ level.zones[ zone_name ].rise_locations[x].locked_spawner = true; //maybe use array_remove for the level.zombie_rise_spawners array if you are still using it...? } } } }
As far as editing the existing script, its up to you, but might just be easier to make your own spawning system. Then you don't need zones or script_flags or anything. I'm not even sure how your script_flags are working then with only one zone on the whole map, which is how it locks and unlocks spawn points I thought...
You could make them reg zombies spawning, or risers, at structs with some fx, similar to deadship. A custom spawning system could be implemented with script_structs in the center of the cubes, you could get the struct that is closest to each player, basically establishing which cube they are in, and with kvps, get all the other structs and lock or unlock those structs in each cube for spawning or just update a level array for zombiemode gsc. Then just modify the script that spawns zombies in zombiemode gsc, and maybe an edit or two in spawner gsc for no windows needed on normal zombies.
Last Edit: October 20, 2015, 04:10:47 pm by MakeCents
I really don't understand why you are getting g-spawn with less than 500 ents, but if you are getting it so often, then you will want to check coop, cause I thought I fixed mine and a few more players brought it back. Also, make sure your not using glowing eyes on zombies, that spawns an ent too. You could also disable gibbing, by setting each zombie to gibbed already, which should help.
I had less than 500 when I didn't have the triggers for the doors. Now I have near 800. I'm not getting g-spawn now, but I want to have at least 100 free entities to add perks and stuff and so the map is playable and you don't get g-spawn with two zombies.
As far as editing the existing script, its up to you, but might just be easier to make your own spawning system. Then you don't need zones or script_flags or anything. I'm not even sure how your script_flags are working then with only one zone on the whole map, which is how it locks and unlocks spawn points I thought...
You could make them reg zombies spawning, or risers, at structs with some fx, similar to deadship. A custom spawning system could be implemented with script_structs in the center of the cubes, you could get the struct that is closest to each player, basically establishing which cube they are in, and with kvps, get all the other structs and lock or unlock those structs in each cube for spawning or just update a level array for zombiemode gsc. Then just modify the script that spawns zombies in zombiemode gsc, and maybe an edit or two in spawner gsc for no windows needed on normal zombies.
LOL. I've been reading spawn functions the last two days to learn how they work and do this and I just understood a bit of them. I don't want to mess anything up. "If something works, don't touch it".
Last Edit: October 20, 2015, 05:35:48 pm by Soy-Yo
It was true cause of the bug. That is why they were spawning from everywhere. That is why I said to add the println cube was most likely undefined and here would return true:
Code Snippet
Plaintext
if( cube == players[i].isInCube ) return true;
I would remove those triggers, and do an alternative method, if you added 300-400, holy crap. Something that checks the distance of players instead.
If you want scripts / features made for you, then contact me by PM or email / skype etc it will cost you tho so if you have no intention of reciprocating don't even waste my time
I really don't understand why you are getting g-spawn with less than 500 ents, but if you are getting it so often, then you will want to check coop, cause I thought I fixed mine and a few more players brought it back. Also, make sure your not using glowing eyes on zombies, that spawns an ent too. You could also disable gibbing, by setting each zombie to gibbed already, which should help.
Did you check what your function is returning? That continue should not be there, cause that can cause undefined, which will make all structs available for spawning. Perhaps print something or make false? Also you may need to add something else that then locks them again if it returns false.
Code Snippet
Plaintext
// activate any associated zombie_rise locations if ( level.zones[ zone_name ].rise_locations.size > 0 ) // level.zones[ zone_name ].rise_locations.size == 9 { // Soy-yo's edit level.zombie_rise_spawners = []; // restart variable if( true )//if( no_dupes ) Soy-yo's edit: leave this here; maybe need to re-edit { for(x=0; x<level.zones[ zone_name ].rise_locations.size; x++) { // Soy-yo's edit unlock = false; level.zones[ zone_name ].rise_locations[x].locked_spawner = true; unlock = maps\cube::checkCanActivateStruct(level.zones[ zone_name ].rise_locations[x]); // only get structs in a cube where a player is if(isdefined(unlock)){ iprintlnbold(unlock, " lock status"); }else{ iprintlnbold("unlock not defined"); } wait(.4);//added so you can see the prints. remove then if( unlock ) { level.zones[ zone_name ].rise_locations[x].locked_spawner = false; level.zombie_rise_spawners[ level.zombie_rise_spawners.size ] = level.zones[ zone_name ].rise_locations[x]; }else{ level.zones[ zone_name ].rise_locations[x].locked_spawner = true; //maybe use array_remove for the level.zombie_rise_spawners array if you are still using it...? } } } }
As far as editing the existing script, its up to you, but might just be easier to make your own spawning system. Then you don't need zones or script_flags or anything. I'm not even sure how your script_flags are working then with only one zone on the whole map, which is how it locks and unlocks spawn points I thought...
You could make them reg zombies spawning, or risers, at structs with some fx, similar to deadship. A custom spawning system could be implemented with script_structs in the center of the cubes, you could get the struct that is closest to each player, basically establishing which cube they are in, and with kvps, get all the other structs and lock or unlock those structs in each cube for spawning or just update a level array for zombiemode gsc. Then just modify the script that spawns zombies in zombiemode gsc, and maybe an edit or two in spawner gsc for no windows needed on normal zombies.
redspace informs me he also found some potential Gspawns with the treyarch code for this
He said this :
Quote
Yeah like for the eye glow it was assigned to a zombie ent but it did not always get deleted. When I made it local and ran a loop that runs for the duration the ai is alive, and run delete after the loop broke, the eye ent deleted fine. I've had a few other situations like this before to
he mentioned another with risers, if you kill em too quick apparently the anchor doesnt get deleted
Last Edit: October 23, 2015, 07:23:53 am by Harry Bo21
redspace informs me he also found some potential Gspawns with the treyarch code for this
He said this : Yeah like for the eye glow it was assigned to a zombie ent but it did not always get deleted. When I made it local and ran a loop that runs for the duration the ai is alive, and run delete after the loop broke, the eye ent deleted fine. I've had a few other situations like this before to
he mentioned another with risers, if you kill em too quick apparently the anchor doesnt get deleted
Cool, then. Thanks for the info. I'll try to make something to make sure those things get deleted or something. I don't want people to get g-spawn on round 10.