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

Combining Perk Files

broken avatar :(
Created 11 years ago
by MJPWGaming
0 Members and 1 Guest are viewing this topic.
5,258 views
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 26 March 2014
Last active: 5 years ago
Posts
200
Respect
Forum Rank
Mr. Elemental
Primary Group
Donator ♥
My Groups
More
×
MJPWGaming's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
MJPWGaming's Contact & Social Links
I'm having a small issue with my scripts. I combined zombiemode_perks_black_ops into zombiemode_perks. I'm doing this to get my perk limit and buyable perk slots to work.

The error is when I go up to the BO1 perks it says "The power must be on" yet the power IS on.

I've tried it with two power switches in the map and also turning on the power, still the same result.
This topic contains a post which is marked as the Best Answer. Click here to view it.
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
May be something with the notify's/waittill's not being correct. Prob best to post the script in a code-box so someone can have a look..

You could have a look at this: The notify name in this function needs to be perk_name+"_power_on" for the trigger to activate.

Code Snippet
Plaintext
turn_revive_on()
{
machine = getentarray("vending_revive", "targetname");

if( get_players().size > 1 )
{
level waittill("revive_on");
}

for( i = 0; i < machine.size; i++ )
{
machine[i] setmodel("zombie_vending_revive_on");
machine[i] playsound("perks_power_on");
machine[i] vibrate((0,-100,0), 0.3, 0.4, 3);
machine[i] thread perk_fx( "revive_light" );
}

level notify( "specialty_quickrevive_power_on" );  // THIS NOTIFY needs to be the perks script_noteworthy+"_power_on"
}
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 26 March 2014
Last active: 5 years ago
Posts
200
Respect
Forum Rank
Mr. Elemental
Primary Group
Donator ♥
My Groups
More
×
MJPWGaming's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
MJPWGaming's Contact & Social Links
May be something with the notify's/waittill's not being correct. Prob best to post the script in a code-box so someone can have a look..

You could have a look at this: The notify name in this function needs to be perk_name+"_power_on" for the trigger to activate.

Here is my whole zombiemode perks script. Contains the original 4, BO1 perks, and my Multiplier Milkshake

Code Snippet
Plaintext
#include maps\_utility; 
#include common_scripts\utility;
#include maps\_zombiemode_utility;

init()
{
vending_triggers = GetEntArray( "zombie_vending", "targetname" );
vending_upgrade_trigger = GetEntArray("zombie_vending_upgrade", "targetname");

if ( vending_triggers.size < 1 && vending_upgrade_trigger.size < 1)
{
return;
}

if ( vending_upgrade_trigger.size >= 1 )
{
array_thread( vending_upgrade_trigger, ::vending_upgrade );;
}


// this map uses atleast 1 perk machine
PrecacheItem( "zombie_perk_bottle_doubletap" );
PrecacheItem( "zombie_perk_bottle_jugg" );
PrecacheItem( "zombie_perk_bottle_revive" );
PrecacheItem( "zombie_perk_bottle_sleight" );
PrecacheItem( "zombie_perk_bottle_dshot" );
PrecacheItem( "zombie_perk_bottle_mkick" );
PrecacheItem( "zombie_perk_bottle_mm" );
PrecacheItem( "zombie_perk_bottle_phd" );
PrecacheItem( "zombie_perk_bottle_staminup" );
PrecacheItem( "zombie_knuckle_crack" );

PrecacheShader( "specialty_juggernaut_zombies" );
PrecacheShader( "specialty_fastreload_zombies" );
PrecacheShader( "specialty_doubletap_zombies" );
PrecacheShader( "specialty_quickrevive_zombies" );
PrecacheShader( "vending_phd_shader" );       
PrecacheShader( "vending_staminup_shader" );
PrecacheShader( "vending_mule_kick_shader" );       
PrecacheShader( "vending_deadshot_shader" );
PrecacheShader( "vending_multimilk_shader" );

//PI ESM - sumpf vending machine
if (isDefined(level.script) && level.script == "nazi_zombie_sumpf")
{
PrecacheModel("zombie_vending_jugg_on_price");
PrecacheModel("zombie_vending_doubletap_price");
PrecacheModel("zombie_vending_revive_on_price");
PrecacheModel("zombie_vending_sleight_on_price");
}
else
{
PrecacheModel("zombie_vending_jugg_on");
PrecacheModel("zombie_vending_doubletap_on");
PrecacheModel("zombie_vending_revive_on");
PrecacheModel("zombie_vending_sleight_on");
precachemodel("zombie_vending_packapunch_on");
}

level._effect["sleight_light"] = loadfx("misc/fx_zombie_cola_on");
level._effect["doubletap_light"] = loadfx("misc/fx_zombie_cola_dtap_on");
level._effect["jugger_light"] = loadfx("misc/fx_zombie_cola_jugg_on");
level._effect["revive_light"] = loadfx("misc/fx_zombie_cola_revive_on");
level._effect["packapunch_fx"] = loadfx("maps/zombie/fx_zombie_packapunch");

if( !isDefined( level.packapunch_timeout ) )
{
level.packapunch_timeout = 15;
}

PrecacheString( &"ZOMBIE_PERK_JUGGERNAUT" );
PrecacheString( &"ZOMBIE_PERK_QUICKREVIVE" );
PrecacheString( &"ZOMBIE_PERK_FASTRELOAD" );
PrecacheString( &"ZOMBIE_PERK_DOUBLETAP" );
PrecacheString( &"ZOMBIE_PERK_PACKAPUNCH" );

set_zombie_var( "zombie_perk_cost", 2000 );
set_zombie_var( "zombie_perk_juggernaut_health", 160 );

// this map uses atleast 1 perk machine
array_thread( vending_triggers, ::vending_trigger_think );
array_thread( vending_triggers, :: electric_perks_dialog);


level thread turn_jugger_on();
level thread turn_doubletap_on();
level thread turn_sleight_on();
level thread turn_revive_on();
level thread turn_PackAPunch_on();
level thread turn_phd_flopper_on();
level thread turn_mule_kick_on();
level thread turn_staminup_on();
level thread turn_deadshot_on();
level thread turn_multimilk_on();


level thread machine_watcher();
level.speed_jingle = 0;
level.revive_jingle = 0;
level.doubletap_jingle = 0;
level.jugger_jingle = 0;
level.packa_jingle = 0;

}

third_person_weapon_upgrade( current_weapon, origin, angles, packa_rollers, perk_machine )
{
forward = anglesToForward( angles );
interact_pos = origin + (forward*-25);

worldgun = spawn( "script_model", interact_pos );
worldgun.angles  = self.angles;
worldgun setModel( GetWeaponModel( current_weapon ) );
PlayFx( level._effect["packapunch_fx"], origin+(0,1,-34), forward );

worldgun rotateto( angles+(0,90,0), 0.35, 0, 0 );
wait( 0.5 );
worldgun moveto( origin, 0.5, 0, 0 );
packa_rollers playsound( "packa_weap_upgrade" );
if( isDefined( perk_machine.wait_flag ) )
{
perk_machine.wait_flag rotateto( perk_machine.wait_flag.angles+(179, 0, 0), 0.25, 0, 0 );
}
wait( 0.35 );
worldgun delete();
wait( 3 );
packa_rollers playsound( "packa_weap_ready" );
worldgun = spawn( "script_model", origin );
worldgun.angles  = angles+(0,90,0);
worldgun setModel( GetWeaponModel( current_weapon+"_upgraded" ) );
worldgun moveto( interact_pos, 0.5, 0, 0 );
if( isDefined( perk_machine.wait_flag ) )
{
perk_machine.wait_flag rotateto( perk_machine.wait_flag.angles-(179, 0, 0), 0.25, 0, 0 );
}
wait( 0.5 );
worldgun moveto( origin, level.packapunch_timeout, 0, 0);
return worldgun;
}
handleDisable()
{
while(1)
{
if(!level.paping)
{
if(level.disable_pap)
{
if(!self.disabled)
self disable_trigger();
}
else
{
if(self.disabled)
self enable_trigger();
}
}
wait 0.1;
}
}
vending_upgrade()
{
perk_machine = GetEnt( self.target, "targetname" );
if( isDefined( perk_machine.target ) )
{
perk_machine.wait_flag = GetEnt( perk_machine.target, "targetname" );
}

self UseTriggerRequireLookAt();
self SetHintString( &"ZOMBIE_FLAMES_UNAVAILABLE" );
self SetCursorHint( "HINT_NOICON" );
level waittill("Pack_A_Punch_on");

self thread maps\_zombiemode_weapons::decide_hide_show_hint();

packa_rollers = spawn("script_origin", self.origin);
packa_timer = spawn("script_origin", self.origin);
packa_rollers playloopsound("packa_rollers_loop");

self SetHintString( &"ZOMBIE_PERK_PACKAPUNCH" );
cost = level.zombie_vars["zombie_perk_cost"];
self thread handleDisable();
for( ;; )
{
level.paping = false;
self waittill( "trigger", player );
if(level.disable_pap)
continue;
level.paping = true;
index = maps\_zombiemode_weapons::get_player_index(player);
cost = 5000;
plr = "plr_" + index + "_";

if( !player maps\_zombiemode_weapons::can_buy_weapon() )
{
wait( 0.1 );
continue;
}

if (player maps\_laststand::player_is_in_laststand() )
{
wait( 0.1 );
continue;
}

if( player isThrowingGrenade() )
{
wait( 0.1 );
continue;
}

if( player isSwitchingWeapons() )
{
wait(0.1);
continue;
}

current_weapon = player getCurrentWeapon();

if( !IsDefined( level.zombie_include_weapons[current_weapon] ) || !IsDefined( level.zombie_include_weapons[current_weapon + "_upgraded"] ) )
{
continue;
}

if ( player.score < cost )
{
//player iprintln( "Not enough points to buy Perk: " + perk );
self playsound("deny");
player thread play_no_money_perk_dialog();
continue;
}
player maps\_zombiemode_score::minus_to_player_score( cost );
self achievement_notify("perk_used");
sound = "bottle_dispense3d";
playsoundatposition(sound, self.origin);
rand = randomintrange(1,100);

if( rand <= 8 )
{
player thread play_packa_wait_dialog(plr);
}

self thread play_vendor_stings("mx_packa_sting");

origin = self.origin;
angles = self.angles;

if( isDefined(perk_machine))
{
origin = perk_machine.origin+(0,0,35);
angles = perk_machine.angles+(0,90,0);
}

self disable_trigger();

player thread do_knuckle_crack();

// Remember what weapon we have.  This is needed to check unique weapon counts.
self.current_weapon = current_weapon;

weaponmodel = player third_person_weapon_upgrade( current_weapon, origin, angles, packa_rollers, perk_machine );

self enable_trigger();
self SetHintString( &"ZOMBIE_GET_UPGRADED" );
self setvisibletoplayer( player );

self thread wait_for_player_to_take( player, current_weapon, packa_timer );
self thread wait_for_timeout( packa_timer );

self waittill_either( "pap_timeout", "pap_taken" );

self.current_weapon = "";
weaponmodel delete();
self SetHintString( &"ZOMBIE_PERK_PACKAPUNCH" );
self setvisibletoall();
self disable_trigger();
wait 0.5;
self enable_trigger();
}
}

wait_for_player_to_take( player, weapon, packa_timer )
{
index = maps\_zombiemode_weapons::get_player_index(player);
plr = "plr_" + index + "_";

self endon( "pap_timeout" );
while( true )
{
packa_timer playloopsound( "ticktock_loop" );
self waittill( "trigger", trigger_player );
packa_timer stoploopsound(.05);
if( trigger_player == player )
{
if( !player maps\_laststand::player_is_in_laststand() )
{
self notify( "pap_taken" );
primaries = player GetWeaponsListPrimaries();
if( isDefined( primaries ) && primaries.size >= 2 )
{
player maps\_zombiemode_weapons::weapon_give( weapon+"_upgraded" );
}
else
{
player GiveWeapon( weapon+"_upgraded" );
player GiveMaxAmmo( weapon+"_upgraded" );
}

player SwitchToWeapon( weapon+"_upgraded" );
player achievement_notify( "DLC3_ZOMBIE_PAP_ONCE" );
player achievement_notify( "DLC3_ZOMBIE_TWO_UPGRADED" );
player thread play_packa_get_dialog(plr);
return;
}
}
wait( 0.05 );
}
}

wait_for_timeout( packa_timer )
{
self endon( "pap_taken" );

wait( level.packapunch_timeout );

self notify( "pap_timeout" );
packa_timer stoploopsound(.05);
packa_timer playsound( "packa_deny" );
}

do_knuckle_crack()
{
gun = self upgrade_knuckle_crack_begin();

self.is_drinking = 1;
self waittill_any( "fake_death", "death", "player_downed", "weapon_change_complete" );

self upgrade_knuckle_crack_end( gun );
self.is_drinking = undefined;
}

upgrade_knuckle_crack_begin()
{
self DisableOffhandWeapons();
self DisableWeaponCycling();

self AllowLean( false );
self AllowAds( false );
self AllowSprint( false );
self AllowProne( false );
self AllowMelee( false );

if ( self GetStance() == "prone" )
{
self SetStance( "crouch" );
}

primaries = self GetWeaponsListPrimaries();

gun = self GetCurrentWeapon();
weapon = "zombie_knuckle_crack";

if ( gun != "none" && gun != "mine_bouncing_betty" )
{
self TakeWeapon( gun );
}
else
{
return;
}

if( primaries.size <= 1 )
{
self GiveWeapon( "zombie_colt" );
}

self GiveWeapon( weapon );
self SwitchToWeapon( weapon );

return gun;
}

upgrade_knuckle_crack_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 != "syrette" );

self EnableOffhandWeapons();
self EnableWeaponCycling();

self AllowLean( true );
self AllowAds( true );
self AllowSprint( true );
self AllowProne( true );
self AllowMelee( true );
weapon = "zombie_knuckle_crack";

// TODO: race condition?
if ( self maps\_laststand::player_is_in_laststand() )
{
self TakeWeapon(weapon);
return;
}

self TakeWeapon(weapon);
primaries = self GetWeaponsListPrimaries();
if( isDefined( primaries ) && primaries.size > 0 )
{
self SwitchToWeapon( primaries[0] );
}
else
{
self SwitchToWeapon( "zombie_colt" );
}
}

// PI_CHANGE_BEGIN
// JMA - in order to have multiple Pack-A-Punch machines in a map we're going to have
// to run a thread on each on.
// NOTE:  In the .map, you'll have to make sure that each Pack-A-Punch machine has a unique targetname
turn_PackAPunch_on()
{
level waittill("Pack_A_Punch_on");

vending_upgrade_trigger = GetEntArray("zombie_vending_upgrade", "targetname");
for(i=0; i<vending_upgrade_trigger.size; i++ )
{
perk = getent(vending_upgrade_trigger[i].target, "targetname");
if(isDefined(perk))
{
perk thread activate_PackAPunch();
}
}
}

activate_PackAPunch()
{
self setmodel("zombie_vending_packapunch_on");
self playsound("perks_power_on");
self vibrate((0,-100,0), 0.3, 0.4, 3);
/*
self.flag = spawn( "script_model", machine GetTagOrigin( "tag_flag" ) );
self.angles = machine GetTagAngles( "tag_flag" );
self.flag setModel( "zombie_sign_please_wait" );
self.flag linkto( machine );
self.flag.origin = (0, 40, 40);
self.flag.angles = (0, 0, 0);
*/
timer = 0;
duration = 0.05;

level notify( "Carpenter_On" );
}
// PI_CHANGE_END

turn_sleight_on()
{
machine = getentarray("vending_sleight", "targetname");
level waittill("sleight_on");

for( i = 0; i < machine.size; i++ )
{
machine[i] setmodel("zombie_vending_sleight_on");
machine[i] vibrate((0,-100,0), 0.3, 0.4, 3);
machine[i] playsound("perks_power_on");
machine[i] thread perk_fx( "sleight_light" );
}

level notify( "specialty_fastreload_power_on" );
}

turn_revive_on()
{
machine = getentarray("vending_revive", "targetname");

players = get_players();

if(players.size > 1)
level waittill("revive_on");

for( i = 0; i < machine.size; i++ )
{
machine[i] setmodel("zombie_vending_revive_on");
machine[i] playsound("perks_power_on");
machine[i] vibrate((0,-100,0), 0.3, 0.4, 3);
machine[i] thread perk_fx( "revive_light" );
}

level notify( "specialty_quickrevive_power_on" );
}

turn_jugger_on()
{
machine = getentarray("vending_jugg", "targetname");
//temp until I can get the wire to jugger.
level waittill("juggernog_on");

for( i = 0; i < machine.size; i++ )
{
machine[i] setmodel("zombie_vending_jugg_on");
machine[i] vibrate((0,-100,0), 0.3, 0.4, 3);
machine[i] playsound("perks_power_on");
machine[i] thread perk_fx( "jugger_light" );

}
level notify( "specialty_armorvest_power_on" );

}

turn_doubletap_on()
{
machine = getentarray("vending_doubletap", "targetname");
level waittill("doubletap_on");

for( i = 0; i < machine.size; i++ )
{
machine[i] setmodel("zombie_vending_doubletap_on");
machine[i] vibrate((0,-100,0), 0.3, 0.4, 3);
machine[i] playsound("perks_power_on");
machine[i] thread perk_fx( "doubletap_light" );
}
level notify( "specialty_rof_power_on" );
}

turn_phd_flopper_on()
{
machine = getentarray("vending_flopper", "targetname");
level waittill("master_switch_activated");

for( i = 0; i < machine.size; i++ )
{
machine[i] vibrate((0,-100,0), 0.3, 0.4, 3);
machine[i] playsound("perks_power_on");
machine[i] thread perk_fx("jugger_light");
}
level notify( "specialty_detectexplosive_on" );
}

turn_deadshot_on()
{


machine = getentarray("vending_deadshot", "targetname");
level waittill("master_switch_activated");

for( i = 0; i < machine.size; i++ )
{
machine[i] vibrate((0,-100,0), 0.3, 0.4, 3);
machine[i] playsound("perks_power_on");
machine[i] thread perk_fx( "doubletap_light" );
}
level notify( "specialty_bulletaccuracy_on" );
}

turn_staminup_on()
{

machine = getentarray("vending_spaminup", "targetname");
level waittill("master_switch_activated");

for( i = 0; i < machine.size; i++ )
{
machine[i] vibrate((0,-100,0), 0.3, 0.4, 3);
machine[i] playsound("perks_power_on");
machine[i] thread perk_fx( "doubletap_light" );
}
level notify( "specialty_longersprint_on" );
}

turn_mule_kick_on()
{
machine = getentarray("vending_mulekick", "targetname");
level waittill("master_switch_activated");

for( i = 0; i < machine.size; i++ )
{
machine[i] vibrate((0,-100,0), 0.3, 0.4, 3);
machine[i] playsound("perks_power_on");
machine[i] thread perk_fx( "sleight_light" );
}
level notify( "specialty_extraammo_on" );
}

turn_multimilk_on()
{
machine = getentarray("vending_multimilk", "targetname");
level waittill("master_switch_activated");

for( i = 0; i < machine.size; i++ )
{
machine[i] vibrate((0,-100,0), 0.3, 0.4, 3);
machine[i] playsound("perks_power_on");
machine[i] thread perk_fx("jugger_light");
}
level notify( "specialty_leadfoot_on" );
}

perk_fx( fx )
{
wait(3);
//playfxontag( level._effect[ fx ], self, "tag_origin" );

    self.fx_playing = spawn("script_model",self.origin + (0,0,20));
    self.fx_playing setmodel("tag_origin");
    self.fx_playing.angles = (0, self.angles[1] + 90, 0 );
    playfxontag( level._effect[ fx ], self.fx_playing, "tag_origin" );
}




electric_perks_dialog()
{

self endon ("warning_dialog");
level endon("switch_flipped");
timer =0;
while(1)
{
wait(0.5);
players = get_players();
for(i = 0; i < players.size; i++)
{
dist = distancesquared(players[i].origin, self.origin );
if(dist > 70*70)
{
timer = 0;
continue;
}
if(dist < 70*70 && timer < 3)
{
wait(0.5);
timer ++;
}
if(dist < 70*70 && timer == 3)
{

players[i] thread do_player_vo("vox_start", 5);
wait(3);
self notify ("warning_dialog");
iprintlnbold("warning_given");
}
}
}
}
vending_trigger_think()
{

//self thread turn_cola_off();

perk = self.script_noteworthy;

self SetHintString( &"ZOMBIE_FLAMES_UNAVAILABLE" );

self SetCursorHint( "HINT_NOICON" );
self UseTriggerRequireLookAt();

notify_name = perk + "_power_on";
flag_wait("electricity_on");
level waittill( notify_name );

perk_hum = spawn("script_origin", self.origin);
perk_hum playloopsound("perks_machine_loop");

self thread check_player_has_perk(perk);

self vending_set_hintstring(perk);

for( ;; )
{
self waittill( "trigger", player );
index = maps\_zombiemode_weapons::get_player_index(player);

cost = level.zombie_vars["zombie_perk_cost"];
switch( perk )
{
case "specialty_armorvest":
cost = 2500;
break;

case "specialty_quickrevive":
players = get_players();
if(players.size == 1)
{
cost = 500;
self.reviveUsesLeft--;
}
else
cost = 1500;
break;

case "specialty_fastreload":
cost = 3000;
break;

case "specialty_rof":
cost = 2000;
break;

case "specialty_detectexplosive": //phd flopper
cost = 2000;
break;

case "specialty_longersprint": //staminup
cost = 2000;
break;

case "specialty_extraammo": //mule kick
cost = 4000;
break;

case "specialty_bulletaccuracy": //deadshot
cost = 1500;
break;

case "specialty_leadfoot": //Multiplier Milkshake
cost = 3000;
break;
}

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( perk ) )
{
cheat = false;

/#
if ( GetDVarInt( "zombie_cheat" ) >= 5 )
{
cheat = true;
}
#/

if ( cheat != true )
{
//player iprintln( "Already using Perk: " + perk );
self playsound("deny");
player thread play_no_money_perk_dialog();


continue;
}
}

if ( player.score < cost )
{
//player iprintln( "Not enough points to buy Perk: " + perk );
self playsound("deny");
player thread 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 );
///bottle_dispense
switch( perk )
{
case "specialty_armorvest":
sound = "mx_jugger_sting";
break;

case "specialty_quickrevive":
sound = "mx_revive_sting";
break;

case "specialty_fastreload":
sound = "mx_speed_sting";
break;

case "specialty_rof":
sound = "mx_doubletap_sting";
break;

default:
sound = "mx_jugger_sting";
break;
}

self thread play_vendor_stings(sound);

// self waittill("sound_done");


// do the drink animation
gun = player perk_give_bottle_begin( perk );
player.is_drinking = 1;
player waittill_any( "fake_death", "death", "player_downed", "weapon_change_complete" );

// restore player controls and movement
player perk_give_bottle_end( gun, perk );
player.is_drinking = undefined;
// TODO: race condition?
if ( player maps\_laststand::player_is_in_laststand() )
{
continue;
}

player SetPerk( perk );
player thread perk_vo(perk);
player setblur( 4, 0.1 );
wait(0.1);
player setblur(0, 0.1);
//earthquake (0.4, 0.2, self.origin, 100);
if(perk == "specialty_armorvest")
{
player.maxhealth = level.zombie_vars["zombie_perk_juggernaut_health"];
player.health = level.zombie_vars["zombie_perk_juggernaut_health"];
//player.health = 160;
}


player perk_hud_create( perk );

//stat tracking
player.stats["perks"]++;

//player iprintln( "Bought Perk: " + perk );
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, perk, self.origin );

player thread perk_think( perk );

}
}
play_no_money_perk_dialog()
{

index = maps\_zombiemode_weapons::get_player_index(self);

player_index = "plr_" + index + "_";
if(!IsDefined (self.vox_nomoney_perk))
{
num_variants = maps\_zombiemode_spawner::get_number_variants(player_index + "vox_nomoney_perk");
self.vox_nomoney_perk = [];
for(i=0;i<num_variants;i++)
{
self.vox_nomoney_perk[self.vox_nomoney_perk.size] = "vox_nomoney_perk_" + i;
}
self.vox_nomoney_perk_available = self.vox_nomoney_perk;
}
sound_to_play = random(self.vox_nomoney_perk_available);

self.vox_nomoney_perk_available = array_remove(self.vox_nomoney_perk_available,sound_to_play);

if (self.vox_nomoney_perk_available.size < 1 )
{
self.vox_nomoney_perk_available = self.vox_nomoney_perk;
}

self maps\_zombiemode_spawner::do_player_playdialog(player_index, sound_to_play, 0.25);




}
check_player_has_perk(perk)
{
/#
if ( GetDVarInt( "zombie_cheat" ) >= 5 )
{
return;
}
#/

dist = 128 * 128;
while(true)
{
players = get_players();
for( i = 0; i < players.size; i++ )
{
if(DistanceSquared( players[i].origin, self.origin ) < dist)
{
if(!players[i] hasperk(perk) && !(players[i] in_revive_trigger()) && (players[i].perk_hud.size < level.perk_limit) && self.reviveUsesLeft > 0)
{
//PI CHANGE: this change makes it so that if there are multiple players within the trigger for the perk machine, the hint string is still
//                   visible to all of them, rather than the last player this check is done for
if (IsDefined(level.script) && level.script == "nazi_zombie_theater")
self setinvisibletoplayer(players[i], false);
else
self setvisibletoplayer(players[i]);
//END PI CHANGE
//iprintlnbold("turn it off to player");

}
else
{
self SetInvisibleToPlayer(players[i]);
//iprintlnbold(players[i].health);
}
}


}

wait(0.1);

}

}


vending_set_hintstring( perk )
{
switch( perk )
{

case "specialty_armorvest":
self SetHintString( &"ZOMBIE_PERK_JUGGERNAUT" );
break;

case "specialty_quickrevive":
flag_wait( "all_players_connected" );
players = get_players();
if(players.size == 1)
{
self SetHintString( "Press & hold &&1 to buy Revive [Cost: 500]" );
self.reviveUsesLeft = 3;
}
else
self SetHintString( &"ZOMBIE_PERK_QUICKREVIVE" );
break;

case "specialty_fastreload":
self SetHintString( &"ZOMBIE_PERK_FASTRELOAD" );
break;

case "specialty_rof":
self SetHintString( &"ZOMBIE_PERK_DOUBLETAP" );
break;

case "specialty_detectexplosive":
self SetHintString( "Press & hold &&1 to buy PHD-Flopper [Cost: 2000]" );
break;

case "specialty_longersprint":
self SetHintString( "Press & hold &&1 to buy Stamin-up [Cost: 2000]" );
break;

case "specialty_extraammo":
self SetHintString( "Press & hold &&1 to buy Mule Kick [Cost: 4000]" );
break;

case "specialty_bulletaccuracy":
self SetHintString( "Press & hold &&1 to buy DeadShot Daquiri [Cost: 1500]" );
break;

case "specialty_leadfoot":
self SetHintString( "Press & hold &&1 to buy Multiplier Milkshake [Cost: 3000]" );
break;

default:
self SetHintString( perk + " Cost: " + level.zombie_vars["zombie_perk_cost"] );
break;

}
}


perk_think( perk )
{
/#
if ( GetDVarInt( "zombie_cheat" ) >= 5 )
{
if ( IsDefined( self.perk_hud[ perk ] ) )
{
return;
}
}
#/

self waittill_any( "fake_death", "death", "player_downed" );

self UnsetPerk( perk );
self UnsetPerk( "specialty_detectexplosive" );
self UnsetPerk( "specialty_longersprint" );
self UnsetPerk( "specialty_extraammo" );
self UnsetPerk( "specialty_bulletaccuracy" );
self UnsetPerk( "specialty_leadfoot" );
self.maxhealth = 100;
self perk_hud_destroy( perk );
//self iprintln( "Perk Lost: " + perk );
}


perk_hud_create( perk )
{
if ( !IsDefined( self.perk_hud ) )
{
self.perk_hud = [];
}

/#
if ( GetDVarInt( "zombie_cheat" ) >= 5 )
{
if ( IsDefined( self.perk_hud[ perk ] ) )
{
return;
}
}
#/


shader = "";

switch( perk )
{
case "specialty_armorvest":
shader = "specialty_juggernaut_zombies";
break;

case "specialty_quickrevive":
shader = "specialty_quickrevive_zombies";
break;

case "specialty_fastreload":
shader = "specialty_fastreload_zombies";
break;

case "specialty_rof":
shader = "specialty_doubletap_zombies";
break;

case "specialty_detectexplosive":
shader = "vending_phd_shader";
break;

case "specialty_longersprint":
shader = "vending_staminup_shader";
break;

case "specialty_extraammo":
shader = "vending_mule_kick_shader";
break;

case "specialty_bulletaccuracy":
shader = "vending_deadshot_shader";
break;

case "specialty_leadfoot":
shader = "vending_multimilk_shader";
break;

default:
shader = "";
break;
}

t_y = -30;
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( shader, 24, 24 );

self.perk_hud[ perk ] = hud;
}


perk_hud_destroy( perk )
{
self.perk_hud[ perk ] destroy_hud();
self.perk_hud[ perk ] = undefined;
}

perk_give_bottle_begin( perk )
{
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();
weapon = "";

switch( perk )
{
case "specialty_armorvest":
weapon = "zombie_perk_bottle_jugg";
break;

case "specialty_quickrevive":
weapon = "zombie_perk_bottle_revive";
break;

case "specialty_fastreload":
weapon = "zombie_perk_bottle_sleight";
break;

case "specialty_rof":
weapon = "zombie_perk_bottle_doubletap";
break;

case "specialty_detectexplosive":
weapon = "zombie_perk_bottle_phd";
break;

case "specialty_longersprint":
weapon = "zombie_perk_bottle_staminup";
break;

case "specialty_extraammo":
weapon = "zombie_perk_bottle_mkick";
break;

case "specialty_bulletaccuracy":
weapon = "zombie_perk_bottle_dshot";
break;

case "specialty_leadfoot":
weapon = "zombie_perk_bottle_mm";
break;
}

self GiveWeapon( weapon );
self SwitchToWeapon( weapon );

return gun;
}


perk_give_bottle_end( gun, perk )
{
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_dshot" );
assert( gun != "zombie_perk_bottle_mkick" );
assert( gun != "zombie_perk_bottle_mm" );
assert( gun != "zombie_perk_bottle_phd" );
assert( gun != "zombie_perk_bottle_staminup" );
assert( gun != "syrette" );

self EnableOffhandWeapons();
self EnableWeaponCycling();

self AllowLean( true );
self AllowAds( true );
self AllowSprint( true );
self AllowProne( true );
self AllowMelee( true );
weapon = "";
switch( perk )
{
case "specialty_armorvest":
weapon = "zombie_perk_bottle_jugg";
break;

case "specialty_quickrevive":
weapon = "zombie_perk_bottle_revive";
break;

case "specialty_fastreload":
weapon = "zombie_perk_bottle_sleight";
break;

case "specialty_rof":
weapon = "zombie_perk_bottle_doubletap";
break;

case "specialty_detectexplosive":
weapon = "zombie_perk_bottle_phd";
break;

case "specialty_longersprint":
weapon = "zombie_perk_bottle_staminup";
break;

case "specialty_extraammo":
weapon = "zombie_perk_bottle_mkick";
break;

case "specialty_bulletaccuracy":
weapon = "zombie_perk_bottle_dshot";
break;

case "specialty_leadfoot":
weapon = "zombie_perk_bottle_mm";
break;
}

// TODO: race condition?
if ( self maps\_laststand::player_is_in_laststand() )
{
self TakeWeapon(weapon);
return;
}

if ( gun != "none" && gun != "mine_bouncing_betty" )
{
self SwitchToWeapon( gun );
}
else
{
// try to switch to first primary weapon
primaryWeapons = self GetWeaponsListPrimaries();
if( IsDefined( primaryWeapons ) && primaryWeapons.size > 0 )
{
self SwitchToWeapon( primaryWeapons[0] );
}
}

self TakeWeapon(weapon);
}

perk_vo(type)
{
self endon("death");
self endon("disconnect");

index = maps\_zombiemode_weapons::get_player_index(self);
sound = undefined;

if(!isdefined (level.player_is_speaking))
{
level.player_is_speaking = 0;
}
player_index = "plr_" + index + "_";
//wait(randomfloatrange(1,2));

//TUEY We need to eventually store the dialog in an array so you can add multiple variants...but we only have 1 now anyway.
switch(type)
{
case "specialty_armorvest":
sound_to_play = "vox_perk_jugga_0";
break;
case "specialty_fastreload":
sound_to_play = "vox_perk_speed_0";
break;
case "specialty_quickrevive":
sound_to_play = "vox_perk_revive_0";
break;
case "specialty_rof":
sound_to_play = "vox_perk_doubletap_0";
break;
default:
sound_to_play = "vox_perk_jugga_0";
break;
}

wait(1.0);
self maps\_zombiemode_spawner::do_player_playdialog(player_index, sound_to_play, 0.25);
}
machine_watcher()
{
//PI ESM - support for two level switches for Factory
if (isDefined(level.DLC3.perksNeedPowerOn) && level.DLC3.perksNeedPowerOn)
{
level thread machine_watcher_factory("juggernog_on");
level thread machine_watcher_factory("sleight_on");
level thread machine_watcher_factory("doubletap_on");
level thread machine_watcher_factory("revive_on");
level thread machine_watcher_factory("Pack_A_Punch_on");
}
else
{
level waittill("master_switch_activated");
//array_thread(getentarray( "zombie_vending", "targetname" ), ::perks_a_cola_jingle);

}

}

//PI ESM - added for support for two switches in factory
machine_watcher_factory(vending_name)
{
level waittill(vending_name);
switch(vending_name)
{
case "juggernog_on":
temp_script_sound = "mx_jugger_jingle";
break;

case "sleight_on":
temp_script_sound = "mx_speed_jingle";
break;

case "doubletap_on":
temp_script_sound = "mx_doubletap_jingle";
break;

case "revive_on":
temp_script_sound = "mx_revive_jingle";
break;

case "Pack_A_Punch_on":
temp_script_sound = "mx_packa_jingle";
break;

default:
temp_script_sound = "mx_jugger_jingle";
break;
}


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

}

play_vendor_stings(sound)
{
if(!IsDefined (level.speed_jingle))
{
level.speed_jingle = 0;
}
if(!IsDefined (level.revive_jingle))
{
level.revive_jingle = 0;
}
if(!IsDefined (level.doubletap_jingle))
{
level.doubletap_jingle = 0;
}
if(!IsDefined (level.jugger_jingle))
{
level.jugger_jingle = 0;
}
if(!IsDefined (level.packa_jingle))
{
level.packa_jingle = 0;
}
if(!IsDefined (level.eggs))
{
level.eggs = 0;
}
if (level.eggs == 0)
{
if(sound == "mx_speed_sting" && level.speed_jingle == 0 )
{
// iprintlnbold("stinger speed:" + level.speed_jingle);
level.speed_jingle = 1;
temp_org_speed_s = spawn("script_origin", self.origin);
temp_org_speed_s playsound (sound, "sound_done");
temp_org_speed_s waittill("sound_done");
level.speed_jingle = 0;
temp_org_speed_s delete();
// iprintlnbold("stinger speed:" + level.speed_jingle);
}
else if(sound == "mx_revive_sting" && level.revive_jingle == 0)
{
level.revive_jingle = 1;
// iprintlnbold("stinger revive:" + level.revive_jingle);
temp_org_revive_s = spawn("script_origin", self.origin);
temp_org_revive_s playsound (sound, "sound_done");
temp_org_revive_s waittill("sound_done");
level.revive_jingle = 0;
temp_org_revive_s delete();
// iprintlnbold("stinger revive:" + level.revive_jingle);
}
else if(sound == "mx_doubletap_sting" && level.doubletap_jingle == 0)
{
level.doubletap_jingle = 1;
// iprintlnbold("stinger double:" + level.doubletap_jingle);
temp_org_dp_s = spawn("script_origin", self.origin);
temp_org_dp_s playsound (sound, "sound_done");
temp_org_dp_s waittill("sound_done");
level.doubletap_jingle = 0;
temp_org_dp_s delete();
// iprintlnbold("stinger double:" + level.doubletap_jingle);
}
else if(sound == "mx_jugger_sting" && level.jugger_jingle == 0)
{
level.jugger_jingle = 1;
// iprintlnbold("stinger juggernog" + level.jugger_jingle);
temp_org_jugs_s = spawn("script_origin", self.origin);
temp_org_jugs_s playsound (sound, "sound_done");
temp_org_jugs_s waittill("sound_done");
level.jugger_jingle = 0;
temp_org_jugs_s delete();
// iprintlnbold("stinger juggernog:"  + level.jugger_jingle);
}
else if(sound == "mx_packa_sting" && level.packa_jingle == 0)
{
level.packa_jingle = 1;
// iprintlnbold("stinger packapunch:" + level.packa_jingle);
temp_org_pack_s = spawn("script_origin", self.origin);
temp_org_pack_s playsound (sound, "sound_done");
temp_org_pack_s waittill("sound_done");
level.packa_jingle = 0;
temp_org_pack_s delete();
// iprintlnbold("stinger packapunch:"  + level.packa_jingle);
}
}
}

perks_a_cola_jingle()
{
self thread 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(60, 120));
wait(randomfloatrange(31,45));
if(randomint(100) < 15 && level.eggs == 0)
{
level notify ("jingle_playing");
//playfx (level._effect["electric_short_oneshot"], self.origin);
playsoundatposition ("electrical_surge", self.origin);

if(self.script_sound == "mx_speed_jingle" && level.speed_jingle == 0)
{
level.speed_jingle = 1;
temp_org_speed = spawn("script_origin", self.origin);
wait(0.05);
temp_org_speed playsound (self.script_sound, "sound_done");
temp_org_speed waittill("sound_done");
level.speed_jingle = 0;
temp_org_speed delete();
}
if(self.script_sound == "mx_revive_jingle" && level.revive_jingle == 0)
{
level.revive_jingle = 1;
temp_org_revive = spawn("script_origin", self.origin);
wait(0.05);
temp_org_revive playsound (self.script_sound, "sound_done");
temp_org_revive waittill("sound_done");
level.revive_jingle = 0;
temp_org_revive delete();
}
if(self.script_sound == "mx_doubletap_jingle" && level.doubletap_jingle == 0)
{
level.doubletap_jingle = 1;
temp_org_doubletap = spawn("script_origin", self.origin);
wait(0.05);
temp_org_doubletap playsound (self.script_sound, "sound_done");
temp_org_doubletap waittill("sound_done");
level.doubletap_jingle = 0;
temp_org_doubletap delete();
}
if(self.script_sound == "mx_jugger_jingle" && level.jugger_jingle == 0)
{
level.jugger_jingle = 1;
temp_org_jugger = spawn("script_origin", self.origin);
wait(0.05);
temp_org_jugger playsound (self.script_sound, "sound_done");
temp_org_jugger waittill("sound_done");
level.jugger_jingle = 0;
temp_org_jugger delete();
}
if(self.script_sound == "mx_packa_jingle" && level.packa_jingle == 0)
{
level.packa_jingle = 1;
temp_org_packa = spawn("script_origin", self.origin);
temp_org_packa playsound (self.script_sound, "sound_done");
temp_org_packa waittill("sound_done");
level.packa_jingle = 0;
temp_org_packa delete();
}

self thread play_random_broken_sounds();
}
}
}
play_random_broken_sounds()
{
level endon ("jingle_playing");
if (!isdefined (self.script_sound))
{
self.script_sound = "null";
}
if (self.script_sound == "mx_revive_jingle")
{
while(1)
{
wait(randomfloatrange(7, 18));
playsoundatposition ("broken_random_jingle", self.origin);
//playfx (level._effect["electric_short_oneshot"], self.origin);
playsoundatposition ("electrical_surge", self.origin);

}
}
else
{
while(1)
{
wait(randomfloatrange(7, 18));
// playfx (level._effect["electric_short_oneshot"], self.origin);
playsoundatposition ("electrical_surge", self.origin);
}
}
}

play_packa_wait_dialog(player_index)
{
waittime = 0.05;
if(!IsDefined (self.vox_perk_packa_wait))
{
num_variants = maps\_zombiemode_spawner::get_number_variants(player_index + "vox_perk_packa_wait");
self.vox_perk_packa_wait = [];
for(i=0;i<num_variants;i++)
{
self.vox_perk_packa_wait[self.vox_perk_packa_wait.size] = "vox_perk_packa_wait_" + i;
}
self.vox_perk_packa_wait_available = self.vox_perk_packa_wait;
}
if(!isdefined (level.player_is_speaking))
{
level.player_is_speaking = 0;
}
sound_to_play = random(self.vox_perk_packa_wait_available);
self maps\_zombiemode_spawner::do_player_playdialog(player_index, sound_to_play, waittime);
self.vox_perk_packa_wait_available = array_remove(self.vox_perk_packa_wait_available,sound_to_play);

if (self.vox_perk_packa_wait_available.size < 1 )
{
self.vox_perk_packa_wait_available = self.vox_perk_packa_wait;
}
}

play_packa_get_dialog(player_index)
{
waittime = 0.05;
if(!IsDefined (self.vox_perk_packa_get))
{
num_variants = maps\_zombiemode_spawner::get_number_variants(player_index + "vox_perk_packa_get");
self.vox_perk_packa_get = [];
for(i=0;i<num_variants;i++)
{
self.vox_perk_packa_get[self.vox_perk_packa_get.size] = "vox_perk_packa_get_" + i;
}
self.vox_perk_packa_get_available = self.vox_perk_packa_get;
}
if(!isdefined (level.player_is_speaking))
{
level.player_is_speaking = 0;
}
sound_to_play = random(self.vox_perk_packa_get_available);
self maps\_zombiemode_spawner::do_player_playdialog(player_index, sound_to_play, waittime);
self.vox_perk_packa_get_available = array_remove(self.vox_perk_packa_get_available,sound_to_play);

if (self.vox_perk_packa_get_available.size < 1 )
{
self.vox_perk_packa_get_available = self.vox_perk_packa_get;
}
}

bo_perks_thread()
{
players = getplayers();
for(i=0;i<players.size;i++)
{
players[i] thread staminup();
players[i] thread deadshot();
players[i] thread mulekick();
players[i] thread DiveToNuke();
}
}

staminup()
{
while(1)
{
if(self hasperk("specialty_longersprint"))
{
self setClientDvar( "player_sprintSpeedScale", 1.65 );
self setClientDvar( "player_sprintTime", 10 );
}
else
{
self setClientDvar( "player_sprintSpeedScale", 1.5 );
self setClientDvar( "player_sprintTime", 4 );
}
wait .5;
}
}

deadshot()
{
while(1)
{
if(self hasperk("specialty_bulletaccuracy"))
self setClientDvar( "perk_weapSpreadMultiplier", 0.4225 );
else
self setClientDvar( "perk_weapSpreadMultiplier", 0.65 );
wait .1;
}
}

mulekick()
{
while(1)
{
if(self hasperk("specialty_extraammo"))
self.inventorySize = 3;
else
self.inventorySize = 2;
wait .1;
}
}

DiveToNuke()
{
self.oldSurface = self.origin[2];
self.lastStance = self GetStance();
MinFall = 5;
for(;;)
{
if( self HasPerk( "specialty_detectexplosive" ) )
{
if( self GetStance() == "prone" && self IsOnGround() && ( self.lastStance == "stand" || self.lastStance == "crouch" ) )
{
self.newSurface = self.origin[2] + 0.007;
ActualFall = self.oldSurface - self.newSurface;
if( self.oldSurface > self.newSurface && MinFall < ActualFall )
{
self thread Nuke();
self.oldSurface = self.origin[2];
wait .2;
}
}
if( self IsOnGround() )
{
self.oldSurface = self.origin[2];
self.lastStance = self GetStance();
}
}
wait .05;
}
}

Nuke()
{
self EnableInvulnerability();
self PlaySound( "nuke_flash" );
PlayFX( LoadFX( "explosions/default_explosion"), self.origin );
RadiusDamage( self.origin, 300, 5000, 1000, self );
self DisableInvulnerability();
}
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
×
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
change this:

Code Snippet
Plaintext
level notify( "specialty_detectexplosive_on" );

Into:

Code Snippet
Plaintext
level notify( "specialty_detectexplosive_power_on" );

So add the '_power' in there. do the same for:

Code Snippet
Plaintext
	level notify( "specialty_bulletaccuracy_on" );
level notify( "specialty_longersprint_on" );
level notify( "specialty_extraammo_on" );
level notify( "specialty_leadfoot_on" );
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 6 years ago
Posts
6,875
Respect
Forum Rank
Immortal
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Signature
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 ;)
×
Harry Bo21's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Harry Bo21's Contact & Social LinksHarryBo000[email protected]HarryBo21
Code Snippet
Plaintext
PrecacheModel("zombie_vending_jugg_on");
PrecacheModel("zombie_vending_doubletap_on");
PrecacheModel("zombie_vending_revive_on");
PrecacheModel("zombie_vending_sleight_on");
precachemodel("zombie_vending_packapunch_on");

you also missed precaching the BO1 "on" machine models

Code Snippet
Plaintext
turn_staminup_on()
{

machine = getentarray("vending_spaminup", "targetname");
level waittill("master_switch_activated");

for( i = 0; i < machine.size; i++ )
{
machine[i] vibrate((0,-100,0), 0.3, 0.4, 3);
machine[i] playsound("perks_power_on");
machine[i] thread perk_fx( "doubletap_light" );
}
level notify( "specialty_longersprint_on" );
}

You put "spaminup" in here lol
Last Edit: July 14, 2015, 08:02:16 pm by Harry Bo21
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 26 March 2014
Last active: 5 years ago
Posts
200
Respect
Forum Rank
Mr. Elemental
Primary Group
Donator ♥
My Groups
More
×
MJPWGaming's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
MJPWGaming's Contact & Social Links
change this:

Code Snippet
Plaintext
level notify( "specialty_detectexplosive_on" );

Into:

Code Snippet
Plaintext
level notify( "specialty_detectexplosive_power_on" );

So add the '_power' in there. do the same for:

Code Snippet
Plaintext
	level notify( "specialty_bulletaccuracy_on" );
level notify( "specialty_longersprint_on" );
level notify( "specialty_extraammo_on" );
level notify( "specialty_leadfoot_on" );

Just tried it and still had the same outcome :(

Code Snippet
Plaintext
PrecacheModel("zombie_vending_jugg_on");
PrecacheModel("zombie_vending_doubletap_on");
PrecacheModel("zombie_vending_revive_on");
PrecacheModel("zombie_vending_sleight_on");
precachemodel("zombie_vending_packapunch_on");

you also missed precaching the BO1 "on" machine models

Code Snippet
Plaintext
turn_staminup_on()
{

machine = getentarray("vending_spaminup", "targetname");
level waittill("master_switch_activated");

for( i = 0; i < machine.size; i++ )
{
machine[i] vibrate((0,-100,0), 0.3, 0.4, 3);
machine[i] playsound("perks_power_on");
machine[i] thread perk_fx( "doubletap_light" );
}
level notify( "specialty_longersprint_on" );
}

You put "spaminup" in here lol

I dont have the on models thats why its not added lol
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 6 years ago
Posts
6,875
Respect
Forum Rank
Immortal
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
×
Harry Bo21's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Harry Bo21's Contact & Social LinksHarryBo000[email protected]HarryBo21
Try changing these :

Code Snippet
Plaintext
level waittill("master_switch_activated");

into

Code Snippet
Plaintext
level waittill("juggernog_on");

( and yes, "jugg" for all of them, so activating jug, will automatically activate the others )
Last Edit: July 14, 2015, 08:35:26 pm by Harry Bo21
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 26 March 2014
Last active: 5 years ago
Posts
200
Respect
Forum Rank
Mr. Elemental
Primary Group
Donator ♥
My Groups
More
×
MJPWGaming's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
MJPWGaming's Contact & Social Links
Try changing these :

Code Snippet
Plaintext
level waittill("master_switch_activated");

into

Code Snippet
Plaintext
level waittill("juggernog_on");

( and yes, "jugg" for all of them, so activating jug, will automatically activate the others )

IT WORKS! But now when you go buy a BO1 perk it plays the purchasing audio bite of Juggernog "Reach for juggernog tonight!"
broken avatar :(
×
broken avatar :(
The King of Zombies
Location: usLouisiana
Date Registered: 24 June 2013
Last active: 6 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 Linksdust103194MrZ0mbiesFanaticMrZ0mbiesFanatic
Or do what Bluntstuffy said as well as where it has the
Code Snippet
Plaintext
level waittill("PERK_on");
change it to the same thing as the notify.

Dont ask me why, but I prefer to have all the perks have different names, so it looks better. I am weird okay!  :troll:
broken avatar :(
×
broken avatar :(
Location: fi
Date Registered: 25 June 2013
Last active: 2 years ago
Posts
3,997
Respect
Forum Rank
Eviscerator
Primary Group
UGX V.I.P.
My Groups
More
My Contact & Social Links
More
×
HitmanVere's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
Mapper Has released one or more maps to the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
IT WORKS! But now when you go buy a BO1 perk it plays the purchasing audio bite of Juggernog "Reach for juggernog tonight!"

Search in perk script sting, sting = audio that plays, when perk is bought. Might have not set them for BO1 perks and has juggernot set in else statement
Marked as best answer by MJPWGaming 11 years ago
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 6 years ago
Posts
6,875
Respect
Forum Rank
Immortal
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
×
Harry Bo21's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Harry Bo21's Contact & Social LinksHarryBo000[email protected]HarryBo21
you havent done any of the stuff for the jingles and stings ( You have to go through, line by line and add in the BO1 stuff anywhere you see it is missing - just copy at WaW part and change the values)

eg :

Code Snippet
Plaintext
level thread turn_jugger_on();
level thread turn_doubletap_on();
level thread turn_sleight_on();
level thread turn_revive_on();
level thread turn_PackAPunch_on();
level thread turn_phd_flopper_on();
level thread turn_mule_kick_on();
level thread turn_staminup_on();
level thread turn_deadshot_on();
level thread turn_multimilk_on();


level thread machine_watcher();
level.speed_jingle = 0;
level.revive_jingle = 0;
level.doubletap_jingle = 0;
level.jugger_jingle = 0;
level.packa_jingle = 0;

// as you see, no black ops 1 stuff, just the waw stuff, and this is not the only part in the script that needs this correcting)



the "default" is set to jugg, so will play that on any that you havent defined
( So all the BO1 perks )

if you just wanna disable it, comment it out from here ( the "default" on at the bottom  )

Code Snippet
Plaintext
switch(type)
{
case "specialty_armorvest":
sound_to_play = "vox_perk_jugga_0";
break;
case "specialty_fastreload":
sound_to_play = "vox_perk_speed_0";
break;
case "specialty_quickrevive":
sound_to_play = "vox_perk_revive_0";
break;
case "specialty_rof":
sound_to_play = "vox_perk_doubletap_0";
break;
default:
sound_to_play = "vox_perk_jugga_0"; // HERE
break;
}
Last Edit: July 14, 2015, 08:53:02 pm by Harry Bo21
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 26 March 2014
Last active: 5 years ago
Posts
200
Respect
Forum Rank
Mr. Elemental
Primary Group
Donator ♥
My Groups
More
×
MJPWGaming's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
MJPWGaming's Contact & Social Links
you havent done any of the stuff for the jingles and stings ( You have to go through, line by line and add in the BO1 stuff anywhere you see it is missing - just copy at WaW part and change the values)

eg :

Code Snippet
Plaintext
level thread turn_jugger_on();
level thread turn_doubletap_on();
level thread turn_sleight_on();
level thread turn_revive_on();
level thread turn_PackAPunch_on();
level thread turn_phd_flopper_on();
level thread turn_mule_kick_on();
level thread turn_staminup_on();
level thread turn_deadshot_on();
level thread turn_multimilk_on();


level thread machine_watcher();
level.speed_jingle = 0;
level.revive_jingle = 0;
level.doubletap_jingle = 0;
level.jugger_jingle = 0;
level.packa_jingle = 0;

// as you see, no black ops 1 stuff, just the waw stuff, and this is not the only part in the script that needs this correcting)



the "default" is set to jugg, so will play that on any that you havent defined
( So all the BO1 perks )

if you just wanna disable it, comment it out from here ( the "default" on at the bottom  )

Code Snippet
Plaintext
switch(type)
{
case "specialty_armorvest":
sound_to_play = "vox_perk_jugga_0";
break;
case "specialty_fastreload":
sound_to_play = "vox_perk_speed_0";
break;
case "specialty_quickrevive":
sound_to_play = "vox_perk_revive_0";
break;
case "specialty_rof":
sound_to_play = "vox_perk_doubletap_0";
break;
default:
sound_to_play = "vox_perk_jugga_0"; // HERE
break;
}

FIXED! THANK YOU! +1
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 6 years ago
Posts
6,875
Respect
Forum Rank
Immortal
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
×
Harry Bo21's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Harry Bo21's Contact & Social LinksHarryBo000[email protected]HarryBo21
your welcome

your problem stemmed from the "master_switch" call

thats either a switch from another map, or its the setting used if you dont have a power switch, and power is on from the start i think, so was never getting flagged ( I think )
Last Edit: July 14, 2015, 10:07:40 pm by Harry Bo21
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 26 March 2014
Last active: 5 years ago
Posts
200
Respect
Forum Rank
Mr. Elemental
Primary Group
Donator ♥
My Groups
More
×
MJPWGaming's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
MJPWGaming's Contact & Social Links
your welcome

your problem stemmed from the "master_switch" call

thats either a switch from another map, or its the setting used if you dont have a power switch, and power is on from the start i think, so was never getting flagged ( I think )

Wait up one second.
Mule Kick doesn't let you hold three guns anymore after all this :(

EDIT: I just forgot to add in the thread in mapname.gsc
Last Edit: July 15, 2015, 04:15:08 pm by MJPWGaming

 
Loading ...