Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tutorial Fix 2 Game Hidden Perks
#1
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. OMA
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, OMA

Reply

#2
lolwat
Code:
attackerIsNPC
NPC in MP ?
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Reply

#3
(11-05-2011, 20:56)Se7en Wrote: lolwat
Code:
attackerIsNPC
NPC in MP ?

I dont know, maybe is chopper gunner or similar.
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  What game have you bought in the last week? RaZ 12 8,116 12-05-2013, 16:29
Last Post: Nekochan
  [GAME]The Letter Game Bandarigoda123 65 30,450 08-08-2013, 21:05
Last Post: AZUMIKKEL
  [Release] AntiRage for Infected Game Mode yokai134 17 14,337 08-04-2013, 22:22
Last Post: yokai134
  ESTRANGED best indie game I've seen so far Arteq 0 2,584 08-03-2013, 14:03
Last Post: Arteq
  [HELP] bo2 - FD1 - dis-attach the console from the game masis 8 5,931 07-17-2013, 23:01
Last Post: surtek
Smile [Release] Map & Game Type Changer Plugin (Fixed) 30mba 31 22,064 07-10-2013, 16:27
Last Post: 26hz
  Selling steam account for a game! Strentin 3 4,131 06-18-2013, 07:49
Last Post: xfxtroll
  Help Using chat outside in game Bandarigoda123 1 3,054 06-09-2013, 12:46
Last Post: Nekochan
  Help Game Not Reading Mod? Killjoy 6 5,510 06-08-2013, 14:49
Last Post: Killjoy
Brick Lesson 3: Making game in C++ Nekochan 2 3,591 06-03-2013, 15:25
Last Post: Nekochan

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.