Ok i put here the Weapons an the class of Projectiles :
My goal is to the players don't get pushed , kill himself and cannaot make team-kill only with the follow weapons . the others wepons must be ignored. ( the function is on mh2 block all the weapons .)
i have no put the Warheadlauncher and MH2Wareadlancher because for this weapons that work like exptected.
UKBadBoy:
ProjectileClass=Class'UKBadBoy.NukeMissileE'
AltProjectileClass=Class'UKBadBoy.NukeMissileD'
MyDamageType=UltimaNuke
AltDamageType=MushroomNuke
NukeMissileA: (DamageType)=="NuclearExplosion")
NukeMissileE :MyDamageType=UltimaNuke
NukeMissileD=MyDamageType:=MushroomNuke
NWUltimaProtosVIII
ProjectileClass=Class'UltimaProjectile'
UltimaProtos :(DamageType)=="Nuclear05")
UltimaProjectile:(DamageType)=="NuclearUltima")
NWNuclearLauncherVIII
ProjectileClass=Class'NuclearMissile'
AltProjectileClass=Class'NuclearGuidedMissile'
NuclearLauncher :(DamageType)=="Nuclear")
NuclearMissile:(DamageType)=="Nuclear00")
NWUltimaProtosV3
ProjectileClass=Class'UltimaProjectile'
UltimaProtos : (DamageType)=="Nuclear05")
UltimaProjectile : (DamageType)=="Nuclear05")
NWNuclearLauncherV3
ProjectileClass=Class'NuclearMissile'
AltProjectileClass=Class'NuclearGuidedMissile'
NuclearLauncher : (DamageType)=="Nuclear")
NuclearMissile :(DamageType)=="Nuclear00")
Now i put here the function of my mutator :
For each weapons i have create 3 options : TeamDamage, SelfDamage, TeamPusch.
Code: Select all
function MutatorTakeDamage( out int ActualDamage, Pawn Victim, Pawn InstigatedBy, out Vector HitLocation, out Vector Momentum, name DamageType)
{
if ( Victim != none && InstigatedBy != none )
{
if ( ! bGameStarted )
// if ( Victim != none && InstigatedBy != none )
if ( Victim.IsA('ScriptedPawn') && ( InstigatedBy.IsA('Bot') || InstigatedBy.IsA('PlayerPawn') ) )
bGameStarted = true;
For UKBadBoy:
[b][color=#FF0000]if ( ! bPlayerUKBadboySelfDamage && (string (DamageType)=="NuclearExplosion") ) if ( Victim.IsA('PlayerPawn') ) if ( InstigatedBy == Victim ) ActualDamage = 0;[/color][/b]
if( ! bPlayerUKBadboy2SelfDamage && (string (DamageType)=="MushroomNuke") ) if ( Victim.IsA('PlayerPawn') ) if ( InstigatedBy == Victim ) ActualDamage = 0 ;
if( ! bPlayerUKBadboy3SelfDamage && (string (DamageType)=="UltimaNuke") ) if ( Victim.IsA('PlayerPawn') ) if ( InstigatedBy == Victim ) ActualDamage = 0 ;
if ( !bUKBadBoyTeamDamage && (string (DamageType)=="UltimaNuke") )
if ((Victim.IsA('Bot') || Victim.IsA('PlayerPawn') ) && ( InstigatedBy.IsA('Bot') || InstigatedBy.IsA('PlayerPawn') ) )
if ( InstigatedBy != Victim ) ActualDamage = 0 ;
[color=#FF0000] if ( !bUKBadBoyTeamDamage2 && (string (DamageType)=="NuclearExplosion") )
if ((Victim.IsA('Bot') || Victim.IsA('PlayerPawn') ) && ( InstigatedBy.IsA('Bot') || InstigatedBy.IsA('PlayerPawn') ) )
if ( InstigatedBy != Victim ) ActualDamage = 0 ;[/color]
if ( !bUKBadBoyTeamDamage3 && (string (DamageType)=="MushroomNuke") )
if ((Victim.IsA('Bot') || Victim.IsA('PlayerPawn') ) && ( InstigatedBy.IsA('Bot') || InstigatedBy.IsA('PlayerPawn') ) )
if ( InstigatedBy != Victim ) ActualDamage = 0 ;
if (! bUKBadBoyTeamPush && (string (DamageType)=="NuclearExplosion") )
if ((Victim.IsA('Bot') || Victim.IsA('PlayerPawn') ) && ( InstigatedBy.IsA('Bot') || InstigatedBy.IsA('PlayerPawn') ) )
if( InstigatedBy != Victim ) Momentum = Vect(0,0,0) ; Velocity = Vect(0,0,0); Victim.Velocity = (Victim.Velocity * 0);
if (! bUKBadBoyTeamPush2 && (string (DamageType)=="MushroomNuke") )
if ((Victim.IsA('Bot') || Victim.IsA('PlayerPawn') ) && ( InstigatedBy.IsA('Bot') || InstigatedBy.IsA('PlayerPawn') ) )
if( InstigatedBy != Victim ) Momentum = Vect(0,0,0) ; Velocity = Vect(0,0,0); Victim.Velocity = (Victim.Velocity * 0);
if (! bUKBadBoyTeamPush3 && (string (DamageType)=="UltimaNuke") )
if ((Victim.IsA('Bot') || Victim.IsA('PlayerPawn') ) && ( InstigatedBy.IsA('Bot') || InstigatedBy.IsA('PlayerPawn') ) )
if( InstigatedBy != Victim ) Momentum = Vect(0,0,0) ; Velocity = Vect(0,0,0); Victim.Velocity = (Victim.Velocity * 0);
For NWUltimaProtosv3 and VIII
if ( ! bPlayerUltimaProtov3SelfDamage && (string (DamageType)=="Nuclear05") ) if ( Victim.IsA('PlayerPawn') ) if ( InstigatedBy == Victim ) ActualDamage = 0 ;
if ( ! bPlayerUltimaProtovIIISelfDamage && (string (DamageType)=="NuclearUltima") ) if ( Victim.IsA('PlayerPawn') ) if ( InstigatedBy == Victim ) ActualDamage = 0 ;
if ( !bUltimaProtov3TeamDamage && (string (DamageType)=="Nuclear05") )
if ((Victim.IsA('Bot') || Victim.IsA('PlayerPawn') ) && ( InstigatedBy.IsA('Bot') || InstigatedBy.IsA('PlayerPawn') ) )
if ( InstigatedBy != Victim ) ActualDamage = 0 ;
if ( !bUltimaProtovIIITeamDamage && (string (DamageType)=="NuclearUltima") )
if ((Victim.IsA('Bot') || Victim.IsA('PlayerPawn') ) && ( InstigatedBy.IsA('Bot') || InstigatedBy.IsA('PlayerPawn') ) )
if ( InstigatedBy != Victim ) ActualDamage = 0 ;
if ( !bUltimaProtov3TeamPush && (string (DamageType)=="Nuclear05") )
if ((Victim.IsA('Bot') || Victim.IsA('PlayerPawn') ) && ( InstigatedBy.IsA('Bot') || InstigatedBy.IsA('PlayerPawn') ) )
if( InstigatedBy != Victim ) Momentum = Vect(0,0,0) ; Velocity = Vect(0,0,0); Victim.Velocity = (Victim.Velocity * 0);
if ( !bUltimaProtovIIITeamPush && (string (DamageType)=="NuclearUltima") )
if ((Victim.IsA('Bot') || Victim.IsA('PlayerPawn') ) && ( InstigatedBy.IsA('Bot') || InstigatedBy.IsA('PlayerPawn') ) )
if( InstigatedBy != Victim )Momentum = Vect(0,0,0) ; Velocity = Vect(0,0,0); Victim.Velocity = (Victim.Velocity * 0);
For NWNuclearLauncherVIII and v3
if ( ! bPlayerNWNuclearLauncherSelfDamage && (string (DamageType)=="Nuclear") ) if ( Victim.IsA('PlayerPawn') ) if ( InstigatedBy == Victim ) ActualDamage = 0 ;
if ( ! bPlayerNWNuclearLauncher2SelfDamage && (string (DamageType)=="Nuclear00") ) if ( Victim.IsA('PlayerPawn') ) if ( InstigatedBy == Victim ) ActualDamage = 0 ;
if ( !bNWNuclearLauncherTeamDamage && (string (DamageType)=="Nuclear") )
if ((Victim.IsA('Bot') || Victim.IsA('PlayerPawn') ) && ( InstigatedBy.IsA('Bot') || InstigatedBy.IsA('PlayerPawn') ) )
if ( InstigatedBy != Victim ) ActualDamage = 0 ;
if ( !bNWNuclearLauncher2TeamDamage && (string (DamageType)=="Nuclear00") )
if ((Victim.IsA('Bot') || Victim.IsA('PlayerPawn') ) && ( InstigatedBy.IsA('Bot') || InstigatedBy.IsA('PlayerPawn') ) )
if ( InstigatedBy != Victim ) ActualDamage = 0;
if (! bNWNuclearLauncherTeamPush && (string (DamageType)=="Nuclear") )
if ((Victim.IsA('Bot') || Victim.IsA('PlayerPawn') ) && ( InstigatedBy.IsA('Bot') || InstigatedBy.IsA('PlayerPawn') ) )
if( InstigatedBy != Victim ) Momentum = Vect(0,0,0) ; Velocity = Vect(0,0,0); Victim.Velocity = (Victim.Velocity * 0);
if (! bNWNuclearLauncher2TeamPush && (string (DamageType)=="Nuclear00") )
if ((Victim.IsA('Bot') || Victim.IsA('PlayerPawn') ) && ( InstigatedBy.IsA('Bot') || InstigatedBy.IsA('PlayerPawn') ) )
if( InstigatedBy != Victim ) Momentum = Vect(0,0,0) ; Velocity = Vect(0,0,0); Victim.Velocity = (Victim.Velocity * 0);