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

[Tutorial] Verruckt player spawns/randomized spawns

broken avatar :(
Created 10 years ago
by daedra descent
0 Members and 1 Guest are viewing this topic.
2,556 views
broken avatar :(
×
broken avatar :(
☭ Soviet Commander ☭
Location: us
Date Registered: 13 August 2012
Last active: 8 years ago
Posts
2,790
Respect
Forum Rank
King of the Zombies
Primary Group
Community Daedra
My Groups
More
My Contact & Social Links
More
Signature
Let's keep this thread on topic from here on in. -DBZ

+1 to off-topic reply -DBZ

lmao. Too funny.

Goliath Script Placer: http://ugx-mods.com/forum/index.php/topic,11234.msg125257/topicseen.html#new

"...Christ, people. Learn C, instead of just stringing random characters
together until it compiles (with warnings)..."

-Linus Torvalds
×
daedra descent's Groups
Community Daedra
Community Daedra
daedra descent's Contact & Social LinksBlueSoviet
In radiant, place four script_structs, give TWO of the four either:

Code Snippet
Plaintext
"script_noteworthy" "north_spawn"

OR

Code Snippet
Plaintext
"script_noteworthy" "south_spawn"

Next, open up _zombiemode.gsc(If it isn't in your IWD then i'd add it at this point). In it find the function:

Code Snippet
Plaintext
coop_player_spawn_placement()
{
structs = getstructarray( "initial_spawn_points", "targetname" );

flag_wait( "all_players_connected" );

//chrisp - adding support for overriding the default spawning method

players = get_players();

for( i = 0; i < players.size; i++ )
{
players[i] setorigin( structs[i].origin );
players[i] setplayerangles( structs[i].angles );
players[i].spectator_respawn = structs[i];
}
}

and replace its contents(code) with:

Code Snippet
Plaintext
	flag_wait( "all_players_connected" );

players = get_players();

//spawn points are split, so grab them both seperately
north_structs = getstructarray("north_spawn","script_noteworthy");
south_structs = getstructarray("south_spawn","script_noteworthy");

side1 = north_structs;
side2 = south_structs;
if(randomint(100)>50)
{
side1 = south_structs;
side2 = north_structs;
}

//spawn players on a specific side, but randomize it up a bit
for( i = 0; i < players.size; i++ )
{
if(i<2)
{
players[i] setorigin( side1[i].origin );
players[i] setplayerangles( side1[i].angles );
players[i].respawn_point = side1[i];
players[i].spawn_side = side1[i].script_noteworthy;
}
else
{
players[i] setorigin( side2[i].origin);
players[i] setplayerangles( side2[i].angles);
players[i].respawn_point = side2[i];
players[i].spawn_side = side2[i].script_noteworthy;
}
}

So it looks like this:

Code Snippet
Plaintext
coop_player_spawn_placement()
{
flag_wait( "all_players_connected" );

players = get_players();

//spawn points are split, so grab them both seperately
north_structs = getstructarray("north_spawn","script_noteworthy");
south_structs = getstructarray("south_spawn","script_noteworthy");

side1 = north_structs;
side2 = south_structs;
if(randomint(100)>50)
{
side1 = south_structs;
side2 = north_structs;
}

//spawn players on a specific side, but randomize it up a bit
for( i = 0; i < players.size; i++ )
{
if(i<2)
{
players[i] setorigin( side1[i].origin );
players[i] setplayerangles( side1[i].angles );
players[i].respawn_point = side1[i];
players[i].spawn_side = side1[i].script_noteworthy;
}
else
{
players[i] setorigin( side2[i].origin);
players[i] setplayerangles( side2[i].angles);
players[i].respawn_point = side2[i];
players[i].spawn_side = side2[i].script_noteworthy;
}
}
}

Done! Launch it in coop with a few friends and give it a try. If you have any issues feel free to post below.
Last Edit: June 11, 2014, 09:47:36 pm by daedra descent
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 8 January 2014
Last active: 6 years ago
Posts
840
Respect
Forum Rank
The Decider
Primary Group
Community Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
Embers are the new lens flares
×
chromastone10's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
chromastone10's Contact & Social Linkschromastone10chromastone1chromastone10
you posted my tutorial...
broken avatar :(
×
broken avatar :(
☭ Soviet Commander ☭
Location: us
Date Registered: 13 August 2012
Last active: 8 years ago
Posts
2,790
Respect
Forum Rank
King of the Zombies
Primary Group
Community Daedra
My Groups
More
My Contact & Social Links
More
×
daedra descent's Groups
Community Daedra
Community Daedra
daedra descent's Contact & Social LinksBlueSoviet
you posted my tutorial...

1. It wasn't in the tutorial section

2. It was made out of scripting I provided. You just took what i gave you and made a mini-tutorial in a help topic.

 
Loading ...