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

Who's Who [Update 5-2-2015]

HOT
broken avatar :(
Created 9 years ago
by alaurenc9
0 Members and 1 Guest are viewing this topic.
24,261 views
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 30 December 2012
Last active: 9 months ago
Posts
577
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Signature
My preferred name is "xSanchez78".
Check me out here: www.steamcommunity.com/id/xSanchez78
×
alaurenc9's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
alaurenc9's Contact & Social LinksxSanchez78xSanchez78xSanchez78xSanchez78xSanchez78xSanchez78
Hello guys
my name is xSanchez78
and today i have something
that i am sure the
zombie community has wanted
for a long time
Today I have for you:

Who's Who

I have spent about a month scripting
this, making sure that the perk is exactly
like black ops 2 die rise, and has no
glitched or bugs. And it is PERFECT!

Perk Features:
   When you die, you save your stock
   ( perks, weapons, and points )
   and respawn to revive a clone.
   When you revive yourself, you get
   your guns, including offhand grenades,
   bouncing betties, and your mule kick
   weapon. You also get every perk back
   except for who's who itself. Also if
   you lost points, you get them back.
   If you dont revive yourself in 45 seconds,
   if you had quick revive in solo mode when
   you died, you automatically revive but
   you dont get quick revive back. If you
   dont, your clone dissapears and you lose
   EVERYTHING. just like black ops 2.

Let's Get Started!

Xmodels:

This tutorial does not provide xmodels for you.
It is up to you to export the xmodels, as posting
them in download links is against the UGX Mods
rules. But here is an Easy-To-Follow tutorial:

http://www.zombiemodding.com/index.php?topic=12436.0

Follow that and you will learn how to port xmodels.
The models you need are "bo2_p6_zm_vending_chugabud",
"bo2_p6_zm_vending_chugabud_on", "bo2_t6_wpn_zmb_perk_bottle_whoswho_view",
and "bo2_t6_wpn_zmb_perk_bottle_whoswho_world". The models
in lime may not have the prefix "bo2_" but just look for these
names and when you convert them, make sure they match
or else this tutorial will not work properly.
In mod.csv, be sure to add the following:

Code Snippet
Plaintext
xmodel,bo2_p6_zm_vending_chugabud
xmodel,bo2_p6_zm_vending_chugabud_on
xmodel,bo2_t6_wpn_zmb_perk_bottle_whoswho_view
xmodel,bo2_t6_wpn_zmb_perk_bottle_whoswho_world


Weapons:

You are probably thinking, what do weapons
have to do with this? Well the weapon
I am talking about is the perk bottle that
you drink when you buy the perk. If you
exported all the models correctly in the first
step, you will have the models needed.
First, go to "root/raw/weapons/sp" and find
"zombie_perk_bottle_jugg". Copy it and rename it
to "zombie_perk_bottle_whoswho". Now open it
with notepad, and find "GunModel". In the next
set of slashes, it should say "zombie_perk_bottle_jugg".
Rename this to "bo2_t6_wpn_zmb_perk_bottle_whoswho_view".
Then find "WorldModel". Next to it, it should say
"zombie_3rd_perk_bottle_jugg". Rename this to
"bo2_t6_wpn_zmb_perk_bottle_whoswho_world".
Save & Close. Now you have your weapon file.
Place it in "root/mods/mapname/weapons/sp".
In mod.csv, make sure to add this:

Code Snippet
Plaintext
weapon,sp/zombie_perk_bottle_whoswho


Radiant:

In radiant, you need to make your own prefab.
First add a trigger_multiple. Add these KVP's
   targetname - audio_bump_trigger
   script_sound - perks_rattle

This will be the trigger where you go prone
and it gives you 25 points. Now add a script_struct.
Give it these KVP's
   targetname - perksacola
   script_sound - mx_whoswho_jingle

This will be the spot where it plays the
perk jingle when it is idle. Now add a
trigger_use. Give it these KVP's:
   targetname - vending_trigger_whoswho

This will be the trigger that the players
use to buy the perk. Now add a script_model
Give it these KVP's
   targetname - vending_whoswho
   model - bo2_p6_zm_vending_chugabud

This will be the actual perk model.
Now just add a clip around your perk
and you should have your perk prefab!
Now here is one more thing you need to do.
Add script_origin's where you want your
player to be able to respawn in who's who
mode. Currently, this does not check for
active zones, so if you place it behind
an opened door, you may end up spawning behind
it. Don't worry, this will be updated at a
later date. Make sure each script_origin
gets this KVP
   targetname - whoswho_spawn_point

Images:

You need to get your own perk shader.
These are easy to find. You can probably
find one in the forums, or even be a prick
and steal one from someone's IWD file.
When you get it, make sure when you convert
it that it is called "whoswho_vending_zombies".

Animtrees:

Open notepad and save it as "whoswho_animation.atr".
In it, simply type the line "pb_laststand_idle".
Save and and put it in "root/mods/mapname/animtrees".

Sounds:

The sounds are also up to you to get.
The functions for playing sound are already
in the script, you just need to do this:
For the stinger sound, in the alias, make
sure you call it "mx_whoswho_sting", and for
the jingle call it "mx_whoswho_jingle". For
the whos who trance sound that plays in the
backround, you need to make sure it is one long
sound that lasts for 45 seconds, ( because thats
how long whos who mode lasts ) and can be
stopped using the StopSounds() function.
It needs to be called "whoswho_spawn".

Scripts:

Alright, you have done every other step, time for the
last. Scripting. This is the hardest part, there is much to
do. First, copy this script and name it to

"_zombiemode_perks_whoswho.gsc"

Code Snippet
Plaintext
#include maps\_utility; 
#include common_scripts\utility;
#include maps\_zombiemode_utility;
#include maps\_hud_util;
#using_animtree( "whoswho_animation" );

init()
{
vending_triggers = GetEntArray( "vending_trigger_whoswho", "targetname" );
if( vending_triggers.size < 1 )
{
return;
}
PrecacheItem( "zombie_perk_bottle_whoswho" );
PrecacheShader( "whoswho_vending_zombies" );
PrecacheShader( "waypoint_revive" );
PrecacheModel( "bo2_p6_zm_vending_chugabud_on" );
level._effect["whoswho_light"] = loadfx("misc/fx_zombie_cola_on");
array_thread( vending_triggers, ::vending_trigger_think );
array_thread( vending_triggers, maps\_zombiemode_perks::electric_perks_dialog );
level thread turn_whoswho_on();
level thread machine_watcher();
level.whoswho_jingle = 0;
}

turn_whoswho_on()
{
machine = getentarray("vending_whoswho", "targetname");
level waittill("juggernog_on");
for( i = 0; i < machine.size; i++ )
{
machine[i] setmodel("bo2_p6_zm_vending_chugabud_on");
machine[i] vibrate((0,-100,0), 0.3, 0.4, 3);
machine[i] playsound("perks_power_on");
machine[i] thread maps\_zombiemode_perks::perk_fx( "whoswho_light" );

}
level notify( "specialty_shades_power_on" );
}

vending_trigger_think()
{
self SetHintString( &"ZOMBIE_FLAMES_UNAVAILABLE" );
self SetCursorHint( "HINT_NOICON" );
self UseTriggerRequireLookAt();
level waittill( "specialty_shades_power_on" );
perk_hum = spawn("script_origin", self.origin);
perk_hum playloopsound("perks_machine_loop");
self thread maps\_zombiemode_perks::check_player_has_perk( "specialty_shades" );
self setHintString( "Press & hold &&1 to buy Who's Who [Cost: 2000]" );
for( ;; )
{
self waittill( "trigger", player );
index = maps\_zombiemode_weapons::get_player_index(player);
cost = 2000;
if (player maps\_laststand::player_is_in_laststand() )
{
continue;
}
if(player in_revive_trigger())
{
continue;
}
if( player isThrowingGrenade() )
{
wait( 0.1 );
continue;
}
if( player isSwitchingWeapons() )
{
wait(0.1);
continue;
}
if ( player HasPerk( "specialty_shades" ) )
{
self playsound("deny");
player thread maps\_zombiemode_perks::play_no_money_perk_dialog();
continue;
}
if ( player.score < cost )
{
self playsound("deny");
player thread maps\_zombiemode_perks::play_no_money_perk_dialog();
continue;
}
sound = "bottle_dispense3d";
player achievement_notify( "perk_used" );
playsoundatposition(sound, self.origin);
player maps\_zombiemode_score::minus_to_player_score( cost );
self thread play_vendor_stings();
gun = player perk_give_bottle_begin();
player.is_drinking = 1;
player waittill_any( "fake_death", "death", "player_downed", "weapon_change_complete" );
player perk_give_bottle_end( gun );
player.is_drinking = undefined;
if ( player maps\_laststand::player_is_in_laststand() )
{
continue;
}
player SetPerk( "specialty_shades" );
player thread perk_vo();
player setblur( 4, 0.1 );
wait(0.1);
player setblur(0, 0.1);
player perk_hud_create();
player.stats["perks"]++;
bbPrint( "zombie_uses: playername %s playerscore %d round %d cost %d name %s x %f y %f z %f type perk", player.playername, player.score, level.round_number, cost, "specialty_shades", self.origin );
player thread maps\_zombiemode_perks::perk_think( "specialty_shades" );

}
}

perk_hud_create()
{
if ( !IsDefined( self.perk_hud ) )
{
self.perk_hud = [];
}
hud = create_simple_hud( self );
hud.foreground = true;
hud.sort = 1;
hud.hidewheninmenu = false;
hud.alignX = "left";
hud.alignY = "bottom";
hud.horzAlign = "left";
hud.vertAlign = "bottom";
hud.x = self.perk_hud.size * 30;
hud.y = hud.y - 70;
hud.alpha = 1;
hud SetShader( "whoswho_vending_zombies", 24, 24 );
self.perk_hud[ "specialty_shades" ] = hud;
}

perk_give_bottle_begin()
{
self DisableOffhandWeapons();
self DisableWeaponCycling();
self AllowLean( false );
self AllowAds( false );
self AllowSprint( false );
self AllowProne( false );
self AllowMelee( false );
wait( 0.05 );
if ( self GetStance() == "prone" )
{
self SetStance( "crouch" );
}
gun = self GetCurrentWeapon();
self GiveWeapon( "zombie_perk_bottle_whoswho" );
self SwitchToWeapon( "zombie_perk_bottle_whoswho" );
return gun;
}

perk_give_bottle_end( gun )
{
assert( gun != "zombie_perk_bottle_doubletap" );
assert( gun != "zombie_perk_bottle_revive" );
assert( gun != "zombie_perk_bottle_jugg" );
assert( gun != "zombie_perk_bottle_sleight" );
assert( gun != "zombie_perk_bottle_whoswho" );
assert( gun != "syrette" );
self EnableOffhandWeapons();
self EnableWeaponCycling();
self AllowLean( true );
self AllowAds( true );
self AllowSprint( true );
self AllowProne( true );
self AllowMelee( true );
if ( self maps\_laststand::player_is_in_laststand() )
{
self TakeWeapon("zombie_perk_bottle_whoswho");
return;
}
if ( gun != "none" && gun != "mine_bouncing_betty" )
{
self SwitchToWeapon( gun );
}
else
{
primaryWeapons = self GetWeaponsListPrimaries();
if( IsDefined( primaryWeapons ) && primaryWeapons.size > 0 )
{
self SwitchToWeapon( primaryWeapons[0] );
}
}
self TakeWeapon("zombie_perk_bottle_whoswho");
}

perk_vo()
{
self endon("death");
self endon("disconnect");
index = maps\_zombiemode_weapons::get_player_index(self);
if(!isdefined (level.player_is_speaking))
{
level.player_is_speaking = 0;
}
player_index = "plr_" + index + "_";
wait(1.0);
self maps\_zombiemode_spawner::do_player_playdialog(player_index, "vox_perk_jugga_0", 0.25);
}

machine_watcher()
{
level thread machine_watcher_factory();
}

machine_watcher_factory()
{
level waittill("specialty_shades_power_on");
temp_machines = getstructarray("perksacola", "targetname");
for (x = 0; x < temp_machines.size; x++)
{
if (temp_machines[x].script_sound == "mx_whoswho_jingle")
{
temp_machines[x] thread perks_a_cola_jingle();
}
}

}

play_vendor_stings()
{
if(!IsDefined (level.whoswho_jingle))
{
level.whoswho_jingle = 0;
}
if(!IsDefined (level.eggs))
{
level.eggs = 0;
}
if (level.eggs == 0)
{
if(level.whoswho_jingle == 0 )
{
level.whoswho_jingle = 1;
temp_org_whoswho_s = spawn("script_origin", self.origin);
temp_org_whoswho_s playsound ("mx_whoswho_sting", "sound_done");
temp_org_whoswho_s waittill("sound_done");
level.whoswho_jingle = 0;
temp_org_whoswho_s delete();
}
}
}

perks_a_cola_jingle()
{
self thread maps\_zombiemode_perks::play_random_broken_sounds();
if(!IsDefined(self.perk_jingle_playing))
{
self.perk_jingle_playing = 0;
}
if (!IsDefined (level.eggs))
{
level.eggs = 0;
}
while(1)
{
wait(randomfloatrange(31,45));
if(randomint(100) < 15 && level.eggs == 0)
{
level notify ("jingle_playing");
playsoundatposition ("electrical_surge", self.origin);
if(level.whoswho_jingle == 0)
{
level.whoswho_jingle = 1;
temp_org_whoswho = spawn("script_origin", self.origin);
wait(0.05);
temp_org_whoswho playsound (self.script_sound, "sound_done");
temp_org_whoswho waittill("sound_done");
level.whoswho_jingle = 0;
temp_org_whoswho delete();
}
self thread maps\_zombiemode_perks::play_random_broken_sounds();
}
}
}

PlayerWhosWho()
{
self.inwhoswho = true;
self EnableInvulnerability();
self.downs++;
self.stats["downs"] = self.downs;
dvarName = "player" + self GetEntityNumber() + "downs";
setdvar( dvarName, self.downs );
stock = self whoswho_take_player_weapons();
self freeze_screen();
origin = self getorigin();
angles = ( 0, self getplayerangles()[1], 0 );
body = self spawn_whoswho_body( origin, angles );
self thread respawn_whoswho( origin, angles );
self thread whoswho_bleedout_delay( body, stock, origin, angles );
self thread waittill_whoswho_end( body, stock, origin, angles );
self DisableInvulnerability();
}

freeze_screen()
{
self AllowProne( false );
self AllowStand( false );
self AllowLean( false );
self AllowJump( false );
self AllowCrouch( true );
self SetStance( "crouch" );
self DisableOffhandWeapons();
self DisableWeaponCycling();
self.ignoreme = true;
self SetClientDvar( "cg_hudDamageIconTime", "0" );
while( !self IsOnGround() )
{
wait 0.0001;
}
self freezeControls(true);
wait 5;
self freezeControls(false);
self EnableOffhandWeapons();
self EnableWeaponCycling();
self AllowProne( true );
self AllowStand( true );
self AllowLean( true );
self AllowJump( true );
self AllowCrouch( true );
self SetStance( "stand" );
self.ignoreme = false;
self SetClientDvar( "cg_hudDamageIconTime", "1500" );
}

waittill_whoswho_end( body, stock, origin, angles )
{
self thread whoswho_cleanup_on_disconnect( body );
self thread whoswho_cleanup_on_perkrebuy( body );
self thread whoswho_cleanup_on_spectating( body );
body waittill( "delete_trigger", was_revived );
if( was_revived )
{
body notify( "whoswho_player_revived" );
self thread whoswho_end( true, stock, origin, angles );
}
body.waypointWhi notify( "waypoint_destroy" );
body.waypointWhi destroy();
body.waypointYel destroy();
body.revivetrigger delete();
body delete();
}

whoswho_cleanup_on_disconnect( body )
{
body endon( "delete_trigger" );
self waittill( "disconnect" );
self thread whoswho_end( false, undefined, undefined, undefined );
body notify( "whoswho_player_revived" );
body notify( "delete_trigger", false );
}

whoswho_cleanup_on_perkrebuy( body )
{
body endon( "delete_trigger" );
while( !self hasPerk( "specialty_shades" ) )
{
wait 0.1;
}
self thread whoswho_end( false, undefined, undefined, undefined );
body notify( "whoswho_player_revived" );
body notify( "delete_trigger", false );
}

whoswho_cleanup_on_spectating( body )
{
body endon( "delete_trigger" );
while( self.sessionstate == "playing" )
{
wait 0.1;
}
self thread whoswho_end( false, undefined, undefined, undefined );
body notify( "whoswho_player_revived" );
body notify( "delete_trigger", false );
}

whoswho_take_player_weapons()
{
death_score = self.score;
perks = [];
perks[0] = "specialty_armorvest";
perks[1] = "specialty_fastreload";
perks[2] = "specialty_rof";
perks[3] = "specialty_quickrevive";
perks[4] = "specialty_detectexplosive";
perks[5] = "specialty_longersprint";
perks[6] = "specialty_bulletaccuracy";
perks[7] = "specialty_extraammo";
perks[8] = "specialty_reconnaissance";
perks[9] = "specialty_boost";
perks[10] = "specialty_ordinance";
SavePerks = [];
for( p = 0; p < perks.size; p++ )
{
SavePerks[perks[p]] = false;
if (self hasPerk(perks[p]))
{
SavePerks[perks[p]] = true;
}
}
self maps\_laststand::laststand_take_player_weapons();
self notify( "whoswho_death" );
stuff = [];
stuff[ "score" ] = death_score;
stuff[ "weapList" ] = self.weaponInventory;
stuff[ "lastGun" ] = self.lastActiveWeapon;
stuff[ "ammo" ] = self.weaponAmmo;
stuff[ "perks" ] = SavePerks;
return stuff;
}

spawn_whoswho_body( origin, angles )
{
player_model = spawn( "script_model", origin );
player_model.angles = angles;
switch( self.model )
{
case "char_usa_marine_polonsky_zomb":
player_model setModel( "char_usa_marine_polonsky_zomb" );
break;

case "char_rus_guard_chernova_zomb":
player_model setModel( "char_rus_guard_chernova_zomb" );
break;

case "char_jap_impinf_officer_body_zomb":
player_model setModel( "char_jap_impinf_officer_body_zomb" );
player_model.headModel = "char_jap_impinf_officer_head";
player_model attach( player_model.headModel, "", true );
player_model.hatModel = "char_jap_impinf_officer_hat_zomb";
player_model attach( player_model.hatModel );
break;

case "char_ger_ansel_body_zomb":
player_model setModel( "char_ger_ansel_body_zomb" );
player_model.headModel = "char_ger_ansel_head_zomb";
player_model attach( player_model.headModel, "", true );
player_model.hatModel = "char_ger_waffen_officercap1_zomb";
player_model attach( player_model.hatModel );
break;

default:
player_model setModel( "char_usa_marine_polonsky_zomb" );
break;
}
player_model attach( getWeaponModel( "zombie_colt" ), "tag_weapon_right" );
player_model UseAnimTree( #animtree );
player_model SetAnim( %pb_laststand_idle );
player_model.not_a_player = true;
player_model.owner = self;
player_model thread maps\_laststand::revive_trigger_spawn();
player_model.waypointYel = newHudElem();
player_model.waypointYel.x = origin[0];
player_model.waypointYel.y = origin[1];
player_model.waypointYel.z = origin[2] + 30;
player_model.waypointYel.sort = 20;
player_model.waypointYel.alpha = 1;
player_model.waypointYel setWaypoint( true, "waypoint_revive" );
player_model.waypointYel.color = ( 1, 1, 0 );
player_model.waypointYel fadeovertime( 45 / 1.25 );
player_model.waypointYel.color = ( 1, 0, 0 );
player_model.waypointWhi = newHudElem();
player_model.waypointWhi.x = origin[0];
player_model.waypointWhi.y = origin[1];
player_model.waypointWhi.z = origin[2] + 30;
player_model.waypointWhi.sort = 21;
player_model.waypointWhi.alpha = 0;
player_model.waypointWhi setWaypoint( true, "waypoint_revive" );
player_model.waypointWhi.color = ( 1, 1, 1 );
player_model.waypointWhi thread hide_show_think( player_model );
return player_model;
}

hide_show_think( body )
{
self endon( "waypoint_destroy" );
while( 1 )
{
if( isDefined( body.revivetrigger ) && isDefined( body.revivetrigger.beingRevived ) && body.revivetrigger.beingRevived )
{
self.alpha = 1;
}
else
{
self.alpha = 0;
}
wait 0.05;
}
}

respawn_whoswho( origin, angles )
{
spawn_points = getEntArray( "whoswho_spawn_point", "targetname" );
valid_points = get_valid_points( spawn_points );
if( valid_points.size == 0 )
{
spawn_point = getstructarray( "initial_spawn_points", "targetname" )[0];
}
else
{
spawn_point = get_array_of_closest( origin, valid_points )[0];
}
self setorigin( spawn_point.origin );
self setplayerangles( spawn_point.angles );
self GiveWeapon( "zombie_colt" );
self SetWeaponAmmoClip( "zombie_colt", 8 );
self SetWeaponAmmoStock( "zombie_colt", 32 );
self SwitchToWeapon( "zombie_colt" );
self GiveWeapon( "stielhandgranate" );
self SetWeaponAmmoClip( "stielhandgranate", 2 );
self SwitchToOffhand( "stielhandgranate" );
self VisionSetNaked( "r_poisonFX_debug_enable", 1 );
self setClientDvar( "r_poisonFX_debug_enable", 1 );
self setClientDvar( "cg_fovScale", 1.2 );
self.maxhealth = 100;
self.health = 100;
self playsound( "whoswho_spawn" );
}

get_valid_points( spawn_points )
{
points = [];
for( i = 0; i < spawn_points.size; i++ )
{
if( !check_point_in_playable_area( spawn_points[i].origin ) )
{
continue;
}
if( !check_point_in_active_zone( spawn_points[i].origin ) )
{
continue;
}
if( !bullettracepassed( spawn_points[i].origin + ( 20, 20, 0 ), spawn_points[i].origin - ( 20, 20, 0 ), true, undefined ) )
{
continue;
}
if( !bullettracepassed( spawn_points[i].origin + ( -20, -20, 0 ), spawn_points[i].origin - ( -20, -20, 0 ), true, undefined ) )
{
continue;
}
if( !bullettracepassed( spawn_points[i].origin + ( -20, 20, 0 ), spawn_points[i].origin - ( 20, -20, 0 ), true, undefined ) )
{
continue;
}
if( !bullettracepassed( spawn_points[i].origin + ( 20, -20, 0 ), spawn_points[i].origin - ( -20, 20, 0 ), true, undefined ) )
{
continue;
}
points[ points.size ] = spawn_points[i];
}
return points;
}

whoswho_bleedout_delay( body, stock, origin, angles )
{
body endon( "whoswho_player_revived" );
self endon( "disconnect" );
time = 45;
while( time > 0 )
{
time -= 1;
wait( 1 );
}
while( body.revivetrigger.BeingRevived == 1 )
{
wait( 0.1 );
}
body notify( "delete_trigger", false );
if( stock[ "perks" ][ "specialty_quickrevive" ] && get_players().size == 1 )
{
stock[ "perks" ][ "specialty_quickrevive" ] = false;
self thread whoswho_end( true, stock, origin, angles );
}
else
{
self thread whoswho_end( false, stock, origin, angles );
}
}

whoswho_end( save_stock, stock, origin, angles )
{
self VisionSetNaked( "zombie_factory", 1 );
self.inwhoswho = undefined;
self setClientDvar( "r_poisonFX_debug_enable", 0 );
self setClientDvar( "cg_fovScale", 1 );
self StopSounds();
if( save_stock )
{
if( self maps\_laststand::player_is_in_laststand() )
{
self thread maps\_laststand::revive_success( self, true );
wait 0.1;
}
self EnableInvulnerability();
self setorigin( origin );
self setplayerangles( angles );
self thread whoswho_give_stock( stock );
wait 1;
self DisableInvulnerability();
}
}

whoswho_give_stock( stock )
{
death_score = stock[ "score" ];
self.weaponInventory = stock[ "weapList" ];
self.lastActiveWeapon = stock[ "lastGun" ];
self.weaponAmmo = stock[ "ammo" ];
SavePerks = stock[ "perks" ];
if( self.score < death_score )
{
self maps\_zombiemode_score::add_to_player_score( int( death_score - self.score ) );
}
self maps\_laststand::laststand_giveback_player_weapons();
perks = GetArrayKeys( SavePerks );
for( p = 0; p < perks.size; p++ )
{
if( SavePerks[perks[p]] )
{
self give_perk( perks[p] );
}
}
}

give_perk( perk )
{
if( self hasPerk( perk ) )
{
return;
}
switch( perk )
{
case "specialty_armorvest":
self setPerk( "specialty_armorvest" );
self maps\_zombiemode_perks::perk_hud_create( "specialty_armorvest" );
self thread maps\_zombiemode_perks::perk_think( "specialty_armorvest" );
self.maxhealth = 285;
self.health = 285;
break;

case "specialty_fastreload":
self setPerk( "specialty_fastreload" );
self maps\_zombiemode_perks::perk_hud_create( "specialty_fastreload" );
self thread maps\_zombiemode_perks::perk_think( "specialty_fastreload" );
break;

case "specialty_rof":
self setPerk( "specialty_rof" );
self maps\_zombiemode_perks::perk_hud_create( "specialty_rof" );
self thread maps\_zombiemode_perks::perk_think( "specialty_rof" );
break;

case "specialty_quickrevive":
self setPerk( "specialty_quickrevive" );
self maps\_zombiemode_perks::perk_hud_create( "specialty_quickrevive" );
self thread maps\_zombiemode_perks::perk_think( "specialty_quickrevive" );
break;

default:
break;
}
}



Now for some customization.
Find the function "respawn_whoswho()"
in it, find this code:

Code Snippet
Plaintext
	self GiveWeapon( "zombie_colt" );
self SetWeaponAmmoClip( "zombie_colt", 8 );
self SetWeaponAmmoStock( "zombie_colt", 32 );
self SwitchToWeapon( "zombie_colt" );
self GiveWeapon( "stielhandgranate" );
self SetWeaponAmmoClip( "stielhandgranate", 2 );
self SwitchToOffhand( "stielhandgranate" );


This is the part that gives you
the weapons and grenades that you get
when you respawn in who's who. You
may want to change which gun or
grenade you want to give back on
repspawn and how much ammo you get.
Now find this function "whoswho_end()"
In this find this line

Code Snippet
Plaintext
	self VisionSetNaked( "zombie_factory", 1 );


This is the vision that resets after
you exit whos who mode. It is set to
the default der riese vision, but if
you have custom vision, you may want
to change that here. Now find this
function "whoswho_take_player_weapons()"
In it find this code

Code Snippet
Plaintext
	perks = [];
perks[0] = "specialty_armorvest";
perks[1] = "specialty_fastreload";
perks[2] = "specialty_rof";
perks[3] = "specialty_quickrevive";
perks[4] = "specialty_detectexplosive";
perks[5] = "specialty_longersprint";
perks[6] = "specialty_bulletaccuracy";
perks[7] = "specialty_extraammo";
perks[8] = "specialty_reconnaissance";
perks[9] = "specialty_boost";
perks[10] = "specialty_ordinance";


These are the perks that you want
Who's Who to be able to save. You need
to make sure you include all the
perks you want to be saved, and
exclude the ones you want to be lost.
As you can see Who's Who ( specialty_shades )
is not included because you are not able
to save whos who. Now find this
function at the bottom "give_perk()".
Find this

Code Snippet
Plaintext
	switch( perk )
{
case "specialty_armorvest":
self setPerk( "specialty_armorvest" );
self maps\_zombiemode_perks::perk_hud_create( "specialty_armorvest" );
self thread maps\_zombiemode_perks::perk_think( "specialty_armorvest" );
self.maxhealth = 285;
self.health = 285;
break;

case "specialty_fastreload":
self setPerk( "specialty_fastreload" );
self maps\_zombiemode_perks::perk_hud_create( "specialty_fastreload" );
self thread maps\_zombiemode_perks::perk_think( "specialty_fastreload" );
break;

case "specialty_rof":
self setPerk( "specialty_rof" );
self maps\_zombiemode_perks::perk_hud_create( "specialty_rof" );
self thread maps\_zombiemode_perks::perk_think( "specialty_rof" );
break;

case "specialty_quickrevive":
self setPerk( "specialty_quickrevive" );
self maps\_zombiemode_perks::perk_hud_create( "specialty_quickrevive" );
self thread maps\_zombiemode_perks::perk_think( "specialty_quickrevive" );
break;

default:
break;
}


This is how who's who gives back
your perks. Make sure that all the
perks you listed in "whoswho_take_player_weapons()"
have their own case in this list,
and that they properly giveback
the perk. Finally, find this
function "spawn_whoswho_body()".
In it find this

Code Snippet
Plaintext
	switch( self.model )
{
case "char_usa_marine_polonsky_zomb":
player_model setModel( "char_usa_marine_polonsky_zomb" );
break;

case "char_rus_guard_chernova_zomb":
player_model setModel( "char_rus_guard_chernova_zomb" );
break;

case "char_jap_impinf_officer_body_zomb":
player_model setModel( "char_jap_impinf_officer_body_zomb" );
player_model.headModel = "char_jap_impinf_officer_head";
player_model attach( player_model.headModel, "", true );
player_model.hatModel = "char_jap_impinf_officer_hat_zomb";
player_model attach( player_model.hatModel );
break;

case "char_ger_ansel_body_zomb":
player_model setModel( "char_ger_ansel_body_zomb" );
player_model.headModel = "char_ger_ansel_head_zomb";
player_model attach( player_model.headModel, "", true );
player_model.hatModel = "char_ger_waffen_officercap1_zomb";
player_model attach( player_model.hatModel );
break;

default:
player_model setModel( "char_usa_marine_polonsky_zomb" );
break;
}


This is how the clone that spawns
for you to revive in who's who mode
is the same model as you being the
original player. This already supports
the default der riese characters, but
if you have custom ones, you need to
make sure and include them or else
your clone won't look like you in who's
who mode. If you need any help with
this, just PM me, and i will help you.
Now for editing other scripts.
Go into "_zombiemode.gsc".
In "main()", call "maps\_zombiemode_perks_whoswho::init();"
under this
Code Snippet
Plaintext
	maps\_zombiemode_blockers_new::init();
maps\_zombiemode_spawner::init();
maps\_zombiemode_powerups::init();
maps\_zombiemode_radio::init();
maps\_zombiemode_perks::init();
maps\_zombiemode_tesla::init();
maps\_zombiemode_bowie::bowie_init();
maps\_zombiemode_cymbal_monkey::init();
maps\_zombiemode_betty::init();
maps\_zombiemode_timer::init();
maps\_zombiemode_auto_turret::init();
maps\_zombiemode_perks_limit::init();
maps\_zombiemode_auto_turret::init();


Find this function
   player_damage_override()

Under this
Code Snippet
Plaintext
	players = get_players();
count = 0;
for( i = 0; i < players.size; i++ )
{
if( players[i] == self || players[i].is_zombie || players[i] maps\_laststand::player_is_in_laststand() || players[i].sessionstate == "spectator" )
{
count++;
}
}


Add this
Code Snippet
Plaintext
	if( self hasPerk( "specialty_shades" ) && !isDefined( self.inwhoswho ) )
{
self thread maps\_zombiemode_perks_whoswho::PlayerWhosWho();
return;
}


Save & Close.
Now go into "_zombiemode_perks.gsc"
find the function "perk_think()"
replace this

Code Snippet
Plaintext
self waittill_any( "fake_death", "death", "player_downed" );


With

Code Snippet
Plaintext
self waittill_any( "fake_death", "death", "player_downed", "whoswho_death" );


Also if you have other perk scripts
that have the perk_think() function
make sure you repeat the same process
in those scripts too. Save & Close.
Now go into "_laststand.gsc".
Find the "laststand_clean_up_on_disconnect()" function.
Replace the whole function with this:

Code Snippet
Plaintext
laststand_clean_up_on_disconnect( playerBeingRevived, reviverGun )
{
reviveTrigger = playerBeingRevived.revivetrigger;

if( isDefined( playerBeingRevived.not_a_player ) )
{
player = playerBeingRevived.owner;
}
else
{
player = playerBeingRevived;
}
player waittill("disconnect");

if( isdefined( reviveTrigger ) )
{
reviveTrigger delete();
}

if( isdefined( self.reviveProgressBar ) )
{
self.reviveProgressBar destroyElem();
}

if( isdefined( self.reviveTextHud ) )
{
self.reviveTextHud destroy();
}

self revive_give_back_weapons( reviverGun );
}


Now find the "revive_trigger_think()" function.
replace this

Code Snippet
Plaintext
			if ( revive_success )
{
self thread revive_success( reviver );
return;
}


With this:

Code Snippet
Plaintext
			if ( revive_success )
{
self thread revive_success( reviver, false );
return;
}


Now find the "revive_do_revive()" function.
Find this

Code Snippet
Plaintext
	playerBeingRevived.revive_hud setText( &"GAME_PLAYER_IS_REVIVING_YOU", self );
playerBeingRevived revive_hud_show_n_fade( 3.0 );


and replace it with this

Code Snippet
Plaintext
	if( isDefined( playerBeingRevived.not_a_player ) )
{
playerBeingRevived.owner.revive_hud setText( &"GAME_PLAYER_IS_REVIVING_YOU", self );
playerBeingRevived.owner revive_hud_show_n_fade( 3.0 );
}
else
{
playerBeingRevived.revive_hud setText( &"GAME_PLAYER_IS_REVIVING_YOU", self );
playerBeingRevived revive_hud_show_n_fade( 3.0 );
}


Find this

Code Snippet
Plaintext
playerBeingRevived startrevive( self );


and replace it with this

Code Snippet
Plaintext
	if( !isDefined( playerBeingRevived.not_a_player ) )
{
playerBeingRevived startrevive( self );
}


find this

Code Snippet
Plaintext
	if ( !revived )
{
playerBeingRevived stoprevive( self );
}


and replace it with this

Code Snippet
Plaintext
	if ( !revived )
{
if( !isDefined( playerBeingRevived.not_a_player ) )
{
playerBeingRevived stoprevive( self );
}
}


Now find this "revive_success()" function.
Replace it with this:

Code Snippet
Plaintext
revive_success( reviver, whoswho_revive )
{
if( isDefined( self.not_a_player ) )
{
self notify( "delete_trigger", true );
return;
}
if( !whoswho_revive )
{
self notify ( "player_revived", reviver );
}
else
{
self notify ( "player_revived", undefined );
}
self reviveplayer();

if( !whoswho_revive )
{
//CODER_MOD: TOMMYK 06/26/2008 - For coop scoreboards
reviver.revives++;
//stat tracking
reviver.stats["revives"] = reviver.revives;

// CODER MOD: TOMMY K - 07/30/08
reviver thread maps\_arcademode::arcadeMode_player_revive();

//CODER_MOD: Jay (6/17/2008): callback to revive challenge
if( isdefined( level.missionCallbacks ) )
{
maps\_challenges_coop::doMissionCallback( "playerRevived", reviver );
}
}

setClientSysState("lsm", "0", self); // Notify client last stand ended.

self.revivetrigger delete();
self.revivetrigger = undefined;

if( !whoswho_revive )
{
self laststand_giveback_player_weapons();
}

self.ignoreme = false;

if( !whoswho_revive )
{
self thread say_revived_vo();
}

}


Now you are done scripting!

Your Done!

Make sure you follow each step carefully.
The only thing that is missing is sounds.
I dont have them yet, but they will come
in a later update. Watch for updates.
The title will show if i have made an update
on the specific date and everything. If you need help
just comment or PM. I only had one hour to write
this topic so problems may occur. Make sure you call
everything in your mod builder and add everything
as i said into mod.csv. This has been tested, but you
may get errors because i quickly scripted the perk
machine logic so that you wouldnt have to add it to
your _zombiemode_perks.gsc like i did. I may have made some
small syntax errors there so just let me know.
Thanks everyone, please credit me, and peace!

Here are some images:
Spoiler: click to open...








Here are some videos ( made by gamer9294 and Alessof )

Update 4-19-2015

Who's who repsawn now checks for playable area,
active zones ( so you dont repsawn behind doors,
and make sure all of your zones in your map have
a "script_noteworthy" of "player_zone" for the script
to be able to define all the zones and check them ),
and if you placed them inside the floor or wall, they
will be avoided ( so you dont get stuck ). I also have
updated some of the tutorial, so it is easier to use.

Update 4-21-2015

If you are in who's who mode and you rebuy who's
who, you automatically leave who's who mode and
loose everything. If you somehow end up spectating
your clone dissapears and you again loose everything.
I have also fixed the bug where it only saved one perk.

Update 5-2-2015

Edited the tutorial to where it says what to change in
_laststand.gsc instead of making you replace it all for
those who have custom stuff in their _laststand.gsc already.
Also added places in the script that support sound if
you chose to add it, and a new section in the tut called
"sound" to give you info on what to call the sounds
and important stuff like that.
Last Edit: May 21, 2015, 09:36:11 pm by alaurenc9
broken avatar :(
×
broken avatar :(
Location: usMissouri
Date Registered: 6 August 2013
Last active: 6 months ago
Posts
513
Respect
Forum Rank
Zombie Enslaver
Primary Group
Member
My Contact & Social Links
More
Signature
Projects:
Unnamed Project: 5%
Mutliple Downloadable Items for Mappers: (Released after map releases)
×
GerardS0406's Groups
GerardS0406's Contact & Social LinksGerardS0406Gerard0406GerardS0406MrGerard0406
For all the stuff you do for the community, you should definitely be rewarded for you work like this ;) Thx for the share
broken avatar :(
×
broken avatar :(
Face to Face
Location: chSomwhere
Date Registered: 6 October 2013
Last active: 12 months ago
Posts
949
Respect
Forum Rank
The Decider
Primary Group
Member
My Contact & Social Links
More
Signature
Maya <3

Let's Play some osu!
×
MrDunlop4's Groups
MrDunlop4's Contact & Social LinksNelielexy0Nelielexy0CSMrDunlop4NelieleyNelielexy0Nelielexy0
You tested in Solo and Coop ??
broken avatar :(
×
broken avatar :(
Purple Square Worshipper
Location: us
Date Registered: 30 January 2014
Last active: 1 year ago
Posts
679
Respect
Forum Rank
Zombie Enslaver
Primary Group
Famous User
My Groups
More
My Contact & Social Links
More
Personal Quote
Purple Square Worshiper
Signature

donate to purplemanwomen www.paypal.me/bwc66930
×
Bwc66930's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Famous User
Famous User
Bwc66930's Contact & Social Linksbwc66930bwc66930bwc66930bwc66931dkwithawbwc66930
Very good, don't know if it's stolen  :troll: lol jk

Will be using this, thanks for it
broken avatar :(
×
broken avatar :(
Location: usUnited States
Date Registered: 7 March 2014
Last active: 3 hours ago
Posts
1,191
Respect
Forum Rank
Zombie Colossus
Primary Group
UGX Site Moderator
My Groups
More
My Contact & Social Links
More
×
MZslayer11's Groups
UGX Site Moderator Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms.
MZslayer11's Contact & Social LinksMZslayer11Service_Code_30#2655
Nice, clean and easy to understand tutorial. Great work, thanks for sharing  ;)
broken avatar :(
×
broken avatar :(
The King of Zombies
Location: usLouisiana
Date Registered: 24 June 2013
Last active: 4 years ago
Posts
2,148
Respect
Forum Rank
King of the Zombies
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Signature
Donate to me if you enjoy my work. https://www.paypal.me/thezombiekilla6
×
Dust's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Dust's Contact & Social LinksMrZ0mbiesFanaticdust103194MrZ0mbiesFanatic
A couple problems I noticed testing it in my test map is. If you go down in whos who, and you restart the game or go down again and have it restart that way, you will still have the blurry vision until you buy the perk and go down then revive yourself. Also, after reviving myself I still had whos who on me, it did not take it from me.
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 30 December 2012
Last active: 9 months ago
Posts
577
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
×
alaurenc9's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
alaurenc9's Contact & Social LinksxSanchez78xSanchez78xSanchez78xSanchez78xSanchez78xSanchez78
oh i know why. Because when you die it notifies the player "whoswho_death". You need to add that to your _zombiemode_perks.gsc pek_think() function in the waittill_any function. Sorry i forgot to add that, but you need to put that there otherwise you don't lose perks. I will update this in the tutoiral later today. But for the blurry vision, that is a dvar that needs to be reset. I dont really know how to script that, but ill look into fixing that later.
broken avatar :(
×
broken avatar :(
Location: usUnion, Kentucky
Date Registered: 9 September 2013
Last active: 1 year ago
Posts
310
Respect
Forum Rank
Perk Hacker
Primary Group
Box Mappers Elite
My Groups
More
My Contact & Social Links
More
×
lilrifa's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Box Mappers Elite
Box Mappers Elite
lilrifa's Contact & Social Linksskypeuser724lilrifalilrifa
Nice work! I'll totally be using this!
broken avatar :(
×
broken avatar :(
Location: nlThe Netherlands
Date Registered: 23 November 2013
Last active: 2 years ago
Posts
331
Respect
Forum Rank
Perk Hacker
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
Zombie Slayer Elite
×
Gabrielle's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Gabrielle's Contact & Social LinksTutorialZoneNL
Somebody can make a video of it?
Good job mate, still hate WIW a lot  :lol:
broken avatar :(
×
broken avatar :(
Location: usThe Swamps of Florida
Date Registered: 12 December 2013
Last active: 6 months ago
Posts
84
Respect
Forum Rank
Rotting Walker
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
LMAO
×
MidgetBlaster's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
For some reason every time I die with whos who and revive myself it never saves any perks execpt for vulture aid
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 30 December 2012
Last active: 9 months ago
Posts
577
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
×
alaurenc9's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
alaurenc9's Contact & Social LinksxSanchez78xSanchez78xSanchez78xSanchez78xSanchez78xSanchez78
For some reason every time I die with whos who and revive myself it never saves any perks execpt for vulture aid

Fixed
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 1 January 2014
Last active: 3 years ago
Posts
397
Respect
Forum Rank
Perk Hacker
Primary Group
Member
My Contact & Social Links
More
Signature
×
vinnyz500's Groups
vinnyz500's Contact & Social Linkspsn_hackedlobbies4uXxMrPotatoxXvinnyz500
Fixed
It would be great if you made a short video so people know what their getting into  ;)
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 30 December 2012
Last active: 9 months ago
Posts
577
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
×
alaurenc9's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
alaurenc9's Contact & Social LinksxSanchez78xSanchez78xSanchez78xSanchez78xSanchez78xSanchez78
It would be great if you made a short video so people know what their getting into  ;)

Unfortunately i dont have a youtube channel. i wouldlike itifsomeone did that for me but i cant do it myself
broken avatar :(
×
broken avatar :(
Location: usThe Swamps of Florida
Date Registered: 12 December 2013
Last active: 6 months ago
Posts
84
Respect
Forum Rank
Rotting Walker
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
LMAO
×
MidgetBlaster's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Fixed

I still have a issue with my quick revive not working afterwards. Everything else is fixed though
broken avatar :(
×
broken avatar :(
Location: usUnited States
Date Registered: 7 March 2014
Last active: 3 hours ago
Posts
1,191
Respect
Forum Rank
Zombie Colossus
Primary Group
UGX Site Moderator
My Groups
More
My Contact & Social Links
More
×
MZslayer11's Groups
UGX Site Moderator Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms.
MZslayer11's Contact & Social LinksMZslayer11Service_Code_30#2655
Unfortunately i dont have a youtube channel. i wouldlike itifsomeone did that for me but i cant do it myself

I could upload it if you send it to me. I barely post anything so you gonna wanna link it in your topic so people actually see it lol. PM me if your interested.

 
Loading ...