Non-Killing Zone?!

How do you make a part in your map where you cannot kill another person!?
class SafeZone extends ZoneInfo;
event ActorEntered( actor Other )
{
Super.ActorEntered(Other);
if(Other.isA('Pawn'))
{
Pawn(Other).ReducedDamageType = 'All';
}
}
event ActorLeaving( actor Other )
{
Super.ActorLeaving(Other);
if(Other.isA('Pawn'))
{
Pawn(Other).ReducedDamageType = '';
}
}
defaultproperties
{
}
~[A]Nobody~ wrote:i'd place the super call at the end of the function![]()
because if in the code of the super class is a return your code won't be executed
class SafeZone extends ZoneInfo;
event ActorEntered( actor DeusExPlayer )
{
local Pawn p;
local Inventory Inv;
Super.ActorEntered(DeusExPlayer);
if(DeusExPlayer.isA('Pawn'))
{
foreach AllActors(class'Inventory', Inv)
{
if (Inv.Owner == p && Inv.PickupViewMesh != None && Inv.PickupViewMesh != LodMesh'DeusExItems.TestBox'
&& !Inv.IsA('NanoKey') && !Inv.IsA('NanoKeyRing') && !Inv.IsA('WeaponNPCRanged') && !Inv.IsA('WeaponNPCMelee') && Inv.IsA('Weapon'))
{
Inv.Destroy();
}
}
Pawn(DeusExPlayer).ReducedDamageType = 'All';
Pawn(DeusExPlayer).HealthHead = 100;
Pawn(DeusExPlayer).HealthTorso = 100;
Pawn(DeusExPlayer).HealthLegLeft = 100;
Pawn(DeusExPlayer).HealthLegRight = 100;
Pawn(DeusExPlayer).HealthArmLeft = 100;
Pawn(DeusExPlayer).HealthArmRight = 100;
Pawn(DeusExPlayer).Health = 100;
}
}
event ActorLeaving( actor DeusExPlayer )
{
Super.ActorLeaving(DeusExPlayer);
if(DeusExPlayer.isA('Pawn'))
{
Pawn(DeusExPlayer).ReducedDamageType = '';
Pawn(DeusExPlayer).HealthHead = 60;
Pawn(DeusExPlayer).HealthTorso = 60;
Pawn(DeusExPlayer).HealthLegLeft = 60;
Pawn(DeusExPlayer).HealthLegRight = 60;
Pawn(DeusExPlayer).HealthArmLeft = 60;
Pawn(DeusExPlayer).HealthArmRight = 60;
Pawn(DeusExPlayer).Health = 60;
}
}
defaultproperties
{
}
kBo wrote:He's asking for nanokeys, not keypads.