Announcement

Collapse
No announcement yet.

A New Powerup

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    **** i kind of start thinkin that i'm too dumb for this I just can't turn the damage off, wether i turn damage=0 or bcanbedamaged false....

    Comment


      #17
      Originally posted by the Adster
      Code:
      Taken from your custom GameRules class:
      =======================================
      function int NetDamage(
      	int originalDamage,
      	int damage,
      	pawn injured,
      	pawn instigatedBy,
      	vector hitLocation,
      	out vector momentum,
      	class<DamageType> damageType
      )
      {
      	local int nextDamage;
      
      	nextDamage = damage;
      	if( NextGameRules != None )
      		nextDamage = NextGameRules.NetDamage(
      								originalDamage,
      								damage,
      								injured,
      								instigatedBy,
      								hitLocation,
      								momentum,
      								damageType
      								);
      
      	if( ( damageType.Name == 'DamTypeMinigunBullet' )
      		|| ( damageType.Name == 'DamTypeAssaultBullet' )
      		|| ( damageType.Name == 'DamTypeShockBeam' )
      		|| ( damageType.Name == 'DamTypeSniperShot' ) )
      	{
      		// Do your stuff here!!!
      	}
      	return nextDamage; <-- THIS ONE HERE!!!!!!
      }
      The NetDamage function returns a variable of type int (in the above code it's an int called nextDamage), so to alter how much damage is returned to the player simply change this value (in your case, set it to zero).

      Comment

      Working...
      X