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

Randomized Starting Spawn Areas

broken avatar :(
Created 8 years ago
by MakeCents
0 Members and 1 Guest are viewing this topic.
2,881 views
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 4 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
Signature
×
MakeCents's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
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
RANDOMIZED STARTING SPAWN AREAS

This tutorial will show you an easy way to make multiple possible randomized starting spawn areas  for all players to spawn in together. There will be an option to set it truly random, or not to repeat the same spawn area twice. Truly random could repeat the same area many many times.

RADIANT
1. Open Radiant
2. Find your initial_spawn_points structs.
3. Select one of the structs and press the space bar
4. Place the new struct in the center of the other 4
5. Change the new struct kvp targetname to randomize_start
Spoiler: click to open...

6. Select all 5 structs and press  the space bar
7. Move the new set to another zone you would like to spawn in (write down this zone's targetname value)
8. Repeat steps 4 and 5 for each zone you would like to possibly start in.
9. Save and compile map

SCRIPT
10. Open your nazi_zombie_mapname
11. Find the following:
Code Snippet
Plaintext
	zones = [];
zones[ zones.size ] = "start_zone";
12. Add the zones that you added spawns to in radiant like this:
Code Snippet
Plaintext
	zones = [];
zones[ zones.size ] = "start_zone";
zones[ zones.size ] = "another_zone";//another_zone will be replaced by the name of the zone you put other structs in
//zones[ zones.size ] = "yes_another_zone";//yes_another_zone will be replaced by the name of the zone you put other structs in
13. Save and close nazi_zombie_mapname.gsc
14. If you don't have a copy of zombiemode.gsc in your mods/mapname/maps folder, copy one from raw/maps now
15. Open the _zombiemode.gsc from mods/mapname/maps folder
16. Find and replace this:
Code Snippet
Plaintext
coop_player_spawn_placement()
{
structs = getstructarray( "initial_spawn_points", "targetname" );
With this:
Code Snippet
Plaintext
coop_player_spawn_placement()
{
never_same_area = 1;//make undefined or 0 if you don't mind the same area in a row possibility
randomstarts = GetStructArray( "randomize_start","targetname" );
randnum = randomInt(randomstarts.size);
if(IsDefined( never_same_area ) && never_same_area && randomstarts.size>1){
if(randnum==getdvarint("laststart")){
if(randnum==(randomstarts.size-1)) randnum = 0;
else randnum++;
}
}
setdvar("laststart",randnum);
randomstart = randomstarts[randnum];
structs = [];
allstructs = GetStructArray( "initial_spawn_points", "targetname" );
for( i=0;i<allstructs.size;i++ ){
//distance of 150 may need adjusted depending on how you space your structs
if(Distance( allstructs[i].origin,randomstart.origin )<150) structs[structs.size] = allstructs[i];
}
17. Review never_same_area comment to see if this is how you want it:
    - never_same_area = 1 will spawn a different area every time
    - never_same_area = undefined or never_same_area = 0 will be truly random
18. Save and close _zombiemode.gsc
19. When map is done compiling, select _zombiemode.gsc in the Mod Builder tab, if necessary, and build mod.
20. Start map and test.
Last Edit: August 03, 2016, 08:43:16 pm by MakeCents
broken avatar :(
×
broken avatar :(
Location: england
Date Registered: 26 July 2013
Last active: 7 years ago
Posts
331
Respect
Forum Rank
Perk Hacker
Primary Group
Community Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
Action is the enemy of thought
Signature
×
tudark's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
tudark's Contact & Social Linkstudark71The Morgue
Wow great work ,you really did simplify it for people +1 :)
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 4 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
×
MakeCents's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
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
Wow great work ,you really did simplify it for people +1 :)

Thanks man, I'd like to see more people do it. It's a bit tiring starting in the same area all the time. I feel you can get even more usage and scenarios out of a map with multiple starting areas.
broken avatar :(
×
broken avatar :(
Location: ph
Date Registered: 22 May 2016
Last active: 5 months ago
Posts
225
Respect
Forum Rank
Mr. Elemental
Primary Group
Member
Signature
×
KhelMho's Groups
KhelMho's Contact & Social Links
Oh wow, thank you  :rainbow:
broken avatar :(
×
broken avatar :(
Location: deDortmund
Date Registered: 20 December 2015
Last active: 5 months ago
Posts
307
Respect
Forum Rank
Perk Hacker
Primary Group
Community Scripter
My Groups
More
Personal Quote
Payback
Signature
Tears Of The Fallen | Join the project https://discord.gg/8gDNQRj
×
fanmagic's Groups
Community 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
Great work. Thanks ;)
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 4 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
×
MakeCents's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
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
Oh wow, thank you  :rainbow:

Great work. Thanks ;)

Thanks! I can't wait to see it in another map!

 
Loading ...