11-05-2011, 20:46
Hello
A tutorial for fixing and improving some hidden game perks. First: specialty_siege.
1- Go to _perkfunctions.gsc
1.1 There are 2 different and correct ways of doing this, Ill say both.
2- Find the thread trackSiegeDissable() and change it to:
2.1 Other option: change trackSiegeEnable() to this:
2nd perk: specialty_armorvest(aka juggernaut) Well change the damage feedback shader by adding a custom damagefeedback:
1- Go to _damagefeedback.gsc and add to init():
2- In updateDamageFeedback( typeHit ) add somewhere something like this:
3- Go into _damage.gsc and in Callback_PlayerDamage_internal( eInflictor, eAttacker, victim, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, psOffsetTime ), find:
4- Under that ^^^^^^ change the if(isdefined(damager blablablabla) { blablabla } to:
5- In _perks.gsc add in Init()
I have modified and made some other perks, I hope I am not lazy and release them soon,
A tutorial for fixing and improving some hidden game perks. First: specialty_siege.
1- Go to _perkfunctions.gsc
1.1 There are 2 different and correct ways of doing this, Ill say both.
2- Find the thread trackSiegeDissable() and change it to:
Code:
trackSiegeDissable()
{
self endon ( "death" );
self endon ( "disconnect" );
self endon ( "stop_trackSiege" );
for ( ;; )
{
self waittill ( "gambit_on" );
unsetSiege();
}
}
2.1 Other option: change trackSiegeEnable() to this:
Code:
trackSiegeEnable()
{
self endon ( "death" );
self endon ( "disconnect" );
self endon ( "stop_trackSiege" );
for ( ;; )
{
self waittill ( "gambit_on" );
self setStance( "crouch" );
self thread stanceStateListener();
self thread jumpStateListener();
self.moveSpeedScaler = 0;
self maps\mp\gametypes\_weapons::updateMoveSpeedScale( "primary" );
class = weaponClass( self getCurrentWeapon() );
if ( class == "pistol" || class == "smg" )
self setSpreadOverride( 1 );
else
self setSpreadOverride( 2 );
self player_recoilScaleOn( 0 );
self allowJump(false);
}
}
2nd perk: specialty_armorvest(aka juggernaut) Well change the damage feedback shader by adding a custom damagefeedback:
1- Go to _damagefeedback.gsc and add to init():
Code:
precacheShader("hint_health");
2- In updateDamageFeedback( typeHit ) add somewhere something like this:
Code:
if ( typeHit == "juggerNaut" )
{
self.hud_damagefeedback setShader("hint_health", 48, 48);
self.hud_damagefeedback.color = (252/255,117/255,174/255);
self playlocalsound("MP_hit_alert");
}
3- Go into _damage.gsc and in Callback_PlayerDamage_internal( eInflictor, eAttacker, victim, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, psOffsetTime ), find:
Code:
if ( attackerIsNPC && isDefined( eAttacker.gunner ) )
damager = eAttacker.gunner;
else
damager = eAttacker;
if ( isDefined( damager) && damager != victim && iDamage > 0 )
{
if ( iDFlags & level.iDFLAGS_STUN )
typeHit = "stun";
4- Under that ^^^^^^ change the if(isdefined(damager blablablabla) { blablabla } to:
Code:
if ( isDefined( damager) && damager != victim && iDamage > 0 )
{
if ( iDFlags & level.iDFLAGS_STUN )
typeHit = "stun";
else if (isExplosiveDamage( sMeansOfDeath ) && victim _hasPerk( "_specialty_blastshield" ))
typeHit = "hitBodyArmor";
else if( victim _hasPerk( "specialty_armorvest") )
typeHit = "juggerNaut";
else if ( victim _hasPerk( "specialty_combathigh") )
typeHit = "hitEndGame";
else
typeHit = "standard";
damager thread maps\mp\gametypes\_damagefeedback::updateDamageFeedback( typeHit );
}
5- In _perks.gsc add in Init()
Code:
level.scriptPerks["specialty_armorvest"] = true;
I have modified and made some other perks, I hope I am not lazy and release them soon,
Spoiler (Click to View)