UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

Zoning problem

HOT
broken avatar :(
Created 10 years ago
by fanmagic
0 Members and 1 Guest are viewing this topic.
7,453 views
broken avatar :(
×
broken avatar :(
Location: deDortmund
Date Registered: 20 December 2015
Last active: 2 years ago
Posts
307
Respect
Forum Rank
Perk Hacker
Primary Group
Scripter
My Groups
More
Personal Quote
Payback
Signature
Tears Of The Fallen | Join the project https://discord.gg/8gDNQRj
×
fanmagic's Groups
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
fanmagic's Contact & Social LinksTears Of The Fallen
Code Snippet
Plaintext
#include maps\_utility; 
#include common_scripts\utility;
#include maps\_zombiemode_utility;

main()
{
iPrintLnBold ("Delta Manager started");
thread delta_zones_init();
}

delta_zones_init()
{
thread zone_hide();
level waittill ("deltastart");
level thread zone_active( "start_zone" );
level waittill ("between_round_over");
level thread zone_delete( "start_zone" );
level thread zone_active( "zone2" );
level waittill ("between_round_over");
level thread zone_delete( "zone2" );
level thread zone_active( "zone3" );
level waittill ("between_round_over");
level thread zone_delete( "zone3" );
}

zone_delete( zone )
{
for(x=0;x<level.zones[ zone ].spawners.size;x++)
{
level.zones[ zone ].spawners[x].locked_spawner = true;
level.enemy_spawns = array_remove_nokeys(level.enemy_spawns, level.zones[ zone ].spawners[x]);
}
level.zones[ zone ].is_enabled = false;
level.zones[ zone ].is_occupied = false;
level.zones[ zone ].is_active = false;
iPrintLnBold ("" + zone + " delete");
}

zone_hide()
{
level thread zone_delete( "start_zone" );
level thread zone_delete( "zone2" );
level thread zone_delete( "zone3" );
}

zone_active( zone )
{
for(x=0;x<level.zones[ zone ].spawners.size;x++)
{
level.zones[ zone ].spawners[x].locked_spawner = false;
level.enemy_spawns = array_remove_nokeys(level.enemy_spawns, level.zones[ zone ].spawners[x]);
}
level.zones[ zone ].is_enabled = true;
level.zones[ zone ].is_occupied = true;
level.zones[ zone ].is_active = true;
iPrintLnBold ("" + zone + " active");
}
Hey guys,
i have another problem. The script on top works fine, but the zombies also spawn in the last zone im in. For example: I spawn in zone 1 and all zombies also spawn only in this zone. After this round i teleport into zone 2, activate zone 2 and deactivate zone 1, so that the zombies only can spawn in zone 2 where im in. But a few zombies spawn again in zone 1. Hope you understand my problem. I thinks it's because im waittill ("between_round_over"): after this notify i teleport the player and deactivate the zone.



-fanmagic.
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 24 February 2014
Last active: 4 years ago
Posts
240
Respect
Forum Rank
Mr. Elemental
Primary Group
Mapper
My Groups
More
×
josemassacre's Groups
Mapper Has released one or more maps to the UGX-Mods community.
josemassacre's Contact & Social Links
Make cents told us that if you just put all your zones under the initial zones and remove your add adjacent zones and they will only spawn in the zone you are in. And you can use a respawn script to make sure no zombies get left behind
broken avatar :(
×
broken avatar :(
Location: deDortmund
Date Registered: 20 December 2015
Last active: 2 years ago
Posts
307
Respect
Forum Rank
Perk Hacker
Primary Group
Scripter
My Groups
More
Personal Quote
Payback
×
fanmagic's Groups
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
fanmagic's Contact & Social LinksTears Of The Fallen
Make cents told us that if you just put all your zones under the initial zones and remove your add adjacent zones and they will only spawn in the zone you are in. And you can use a respawn script to make sure no zombies get left behind
Ok, thanks. But i dont know how to make a respawn script.
broken avatar :(
×
broken avatar :(
Location: deDortmund
Date Registered: 20 December 2015
Last active: 2 years ago
Posts
307
Respect
Forum Rank
Perk Hacker
Primary Group
Scripter
My Groups
More
Personal Quote
Payback
×
fanmagic's Groups
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
fanmagic's Contact & Social LinksTears Of The Fallen
Don't do a respawn script. You arent fixing the root problem that way.
Ok, but what can i do instead of respawn the ai? I thougth of making jumps for the ai, but then i would need over 80 of them and this would slow down the gameplay of the map.
broken avatar :(
×
broken avatar :(
Location: nlApeldoorn
Date Registered: 17 December 2013
Last active: 2 years ago
Posts
1,186
Respect
1,332Add +1
Forum Rank
Zombie Colossus
Primary Group
Scripter Elite
My Groups
More
My Contact & Social Links
More
Personal Quote
It aint much, if it aint Dutch
Signature
×
BluntStuffy's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
Oil Rig Beta Access
Oil Rig Beta Access
BluntStuffy's Contact & Social LinksBluntStuffyBluntstuffy@BluntZombieStuffyZombie
Make cents told us that if you just put all your zones under the initial zones and remove your add adjacent zones and they will only spawn in the zone you are in. And you can use a respawn script to make sure no zombies get left behind

^
think he's right though, there was a topic about this a little while ago. You should try just removing the adjacent_zone lines from your mapname.gsc, and add them all as an initial zone. See if that works, you're switching zones in between rounds so prob dont need a respawn script.
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 24 February 2014
Last active: 4 years ago
Posts
240
Respect
Forum Rank
Mr. Elemental
Primary Group
Mapper
My Groups
More
×
josemassacre's Groups
Mapper Has released one or more maps to the UGX-Mods community.
josemassacre's Contact & Social Links
I suggested the respawn because I didn't know if in his map they would be able to teleport mid round. So I was trying to think of a way to make sure none get left behind.
I didn't suggest the respawn as a bandaid for his script
I use the zone setup thatmake cents talked about and I have zero problems zombies only spawn in the zones players are in. There's no need to make a script that deactivates zone so zombies can't spawn there when you can already do that with zero work really.
broken avatar :(
×
broken avatar :(
Location: deDortmund
Date Registered: 20 December 2015
Last active: 2 years ago
Posts
307
Respect
Forum Rank
Perk Hacker
Primary Group
Scripter
My Groups
More
Personal Quote
Payback
×
fanmagic's Groups
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
fanmagic's Contact & Social LinksTears Of The Fallen
^
think he's right though, there was a topic about this a little while ago. You should try just removing the adjacent_zone lines from your mapname.gsc, and add them all as an initial zone. See if that works, you're switching zones in between rounds so prob dont need a respawn script.
I already added the zones only as initial zones.
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 6 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
Signature
×
MakeCents's Groups
Mapper Has released one or more maps to the UGX-Mods community.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
Ok, but what can i do instead of respawn the ai? I thougth of making jumps for the ai, but then i would need over 80 of them and this would slow down the gameplay of the map.

Move the zombies to acceptable areas would be more suiting than jumps.

I already added the zones only as initial zones.

Show us what you script looks like, and when you did, did you stop calling the script you posted?

There are a few ways to do this. You could just put all zones as starting zones, like said already. Or, you could just move the zombies to structs on spawn like risers work. You would have to track active zones probably with a level var, and give a kvp to the structs you want to move the zombies to, that relates to the active zone tracking. Get an array of all the structs and then make an array of the ones matching that kvp. Then any zombie that spawns would be in the zone you needed. You could further add a notify and a while loop to this function that moves the zombies, with an endon death. Then you could even teleport mid round if you liked. I would randomize the array of acceptable structs each time you move a zombie just to make it more interesting, if you decided to do it this way. I would only do it this way if you wanted to teleport mid round though.

Last Edit: August 08, 2016, 12:42:53 pm by MakeCents
broken avatar :(
×
broken avatar :(
Location: deDortmund
Date Registered: 20 December 2015
Last active: 2 years ago
Posts
307
Respect
Forum Rank
Perk Hacker
Primary Group
Scripter
My Groups
More
Personal Quote
Payback
×
fanmagic's Groups
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
fanmagic's Contact & Social LinksTears Of The Fallen
Move the zombies to acceptable areas would be more suiting than jumps.

Show us what you script looks like, and when you did, did you stop calling the script you posted?

There are a few ways to do this. You could just put all zones as starting zones, like said already. Or, you could just move the zombies to structs on spawn like risers work. You would have to track active zones probably with a level var, and give a kvp to the structs you want to move the zombies to, that relates to the active zone tracking. Get an array of all the structs and then make an array of the ones matching that kvp. Then any zombie that spawns would be in the zone you needed. You could further add a notify and a while loop to this function that moves the zombies, with an endon death. Then you could even teleport mid round if you liked. I would randomize the array of acceptable structs each time you move a zombie just to make it more interesting, if you decided to do it this way. I would only do it this way if you wanted to teleport mid round though.
I setup the zones like this:
zones[ zones.size ] = "start_zone"
zones[ zones.size ] = "zone2"
zones[ zones.size ] = "zone3"

and i call my script above in the first post under zombiemode::main (); in my mapname.gsc.

But is it possible to move riser structs? It tried it with getstructarray but it doesnt work.
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 6 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
×
MakeCents's Groups
Mapper Has released one or more maps to the UGX-Mods community.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
I setup the zones like this:
zones[ zones.size ] = "start_zone"
zones[ zones.size ] = "zone2"
zones[ zones.size ] = "zone3"

and i call my script above in the first post under zombiemode::main (); in my mapname.gsc.

But is it possible to move riser structs? It tried it with getstructarray but it doesnt work.

It's usually best to copy your code and put in code tags. Re typing often doesn't show the mistake. If this is copied then your missing ; at the end of each line, but would cause a serious error.

You can move structs, by changing there origin, but that won't help with risers since they are randomly selected from available zones.

Edit: when I said move zombies like risers, I meant move the spawned zombie to the structs you wanted, like risers work, not move the structs, but I guess that could work too.
Last Edit: August 13, 2016, 09:52:22 pm by MakeCents
broken avatar :(
×
broken avatar :(
Location: deDortmund
Date Registered: 20 December 2015
Last active: 2 years ago
Posts
307
Respect
Forum Rank
Perk Hacker
Primary Group
Scripter
My Groups
More
Personal Quote
Payback
×
fanmagic's Groups
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
fanmagic's Contact & Social LinksTears Of The Fallen
It's usually best to copy your code and put in code tags. Re typing often doesn't show the mistake. If this is copied then your missing ; at the end of each line, but would cause a serious error.

You can move structs, by changing there origin, but that won't help with risers since they are randomly selected from available zones.
I thougth of making only one zone for the map. When i teleport the players, i would like to move the riser structs to the next area - so i don't need other zones if this would work.
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 6 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
×
MakeCents's Groups
Mapper Has released one or more maps to the UGX-Mods community.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
I thougth of making only one zone for the map. When i teleport the players, i would like to move the riser structs to the next area - so i don't need other zones if this would work.

I'm fairly certain you can move a struct just by getting the struct and then setting the origin to the new origin.

Personally I would find it easier to move a normal zombie and then play riser anims and fx, but to each their own.

If you want to use risers normally though, it may be easier just to lock your spawners and stuff.
Last Edit: August 13, 2016, 10:00:33 pm by MakeCents
broken avatar :(
×
broken avatar :(
Location: deDortmund
Date Registered: 20 December 2015
Last active: 2 years ago
Posts
307
Respect
Forum Rank
Perk Hacker
Primary Group
Scripter
My Groups
More
Personal Quote
Payback
×
fanmagic's Groups
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
fanmagic's Contact & Social LinksTears Of The Fallen
I'm fairly certain you can move a struct just by getting the struct and then setting the origin to the new origin.

Personally I would find it easier to move a normal zombie and then play riser anims and fx, but to each their own.
Can i move the spawner with getEnt and a targetname followed by spawner movez (777,7); or spawner setorigin (xyz);? Or is there something like getspawner?
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 6 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
×
MakeCents's Groups
Mapper Has released one or more maps to the UGX-Mods community.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
Can i move the spawner with getEnt and a targetname followed by spawner movez (777,7); or spawner setorigin (xyz);? Or is there something like getspawner?

Let me look at your original code and see what your issue is, rather than doing all this. But in the mean time you can read the scripts in spawner for risers, in the do_zombie_rise function, to familiarize yourself with how they work.

broken avatar :(
×
broken avatar :(
Location: deDortmund
Date Registered: 20 December 2015
Last active: 2 years ago
Posts
307
Respect
Forum Rank
Perk Hacker
Primary Group
Scripter
My Groups
More
Personal Quote
Payback
×
fanmagic's Groups
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
fanmagic's Contact & Social LinksTears Of The Fallen
Let me look at your original code and see what your issue is, rather than doing all this. But in the mean time you can read the scripts in spawner for risers, in the do_zombie_rise function, to familiarize yourself with how they work.
Ok thanks. I will learn the scripts when im on my pc ;)

 
Loading ...