Page 1 of 1

Non-Killing Zone?!

PostPosted: Sat Jul 30, 05 11:43 am
by AgentSmyth
How do you make a part in your map where you cannot kill another person!?

PostPosted: Sat Jul 30, 05 12:30 pm
by Dae
Thats easy.

Both ways require zoning.

First way: add a standard ZoneInfo (Info > ZoneInfo) actor and change boolean variable bNeutralZone to true in its properties. To say truth, I haven't tested this way in Deus Ex, but it works fine in Unreal Tournament.

The second way is to make your own zone with the following code:
Code: Select all
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
{
}


Hope that helps! :)

PostPosted: Sat Jul 30, 05 1:40 pm
by AgentSmyth
thanx alot.... :lol:

PostPosted: Sat Jul 30, 05 4:22 pm
by ~ô¿ô~Nobody~
i'd place the super call at the end of the function :lol:
because if in the code of the super class is a return your code won't be executed :wink:

PostPosted: Sat Jul 30, 05 5:14 pm
by Dae
~[A]Nobody~ wrote:i'd place the super call at the end of the function :lol:
because if in the code of the super class is a return your code won't be executed :wink:

Nobody, the code works.
But, well, i either don't understand why super call is in the beginning of each event.

PostPosted: Sat Jul 30, 05 6:14 pm
by ~ô¿ô~Nobody~
yes in this example it does
and depending what it is you need to set to at the begin or somewhere else
i didn't say always place it at the end :)

PostPosted: Sat Jul 30, 05 6:37 pm
by Alex
I kinda made my own version, not working perfect, it also deletes weapons outside the zone :S
Some things are obvious like if DeusExPlayer = Pawn, but i don't care :P

Code: Select all
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
{
}

PostPosted: Sun Jul 31, 05 9:40 am
by AgentSmyth
tis k i now have another problem....can u get nano keys to work in multiplayer?
i must seem like such a n00b :oops:

PostPosted: Sun Jul 31, 05 10:12 am
by Alex
No, i don't think so, then you need to bind a lot of things to a mutator, perhaps you can make a super key that can open all movers but i don't think that you can use the nanokey system

PostPosted: Sun Jul 31, 05 10:32 am
by AgentSmyth
that really messes up things for my map! :evil:

Edit: Wait! you know the way the MP coding is different that the SP coding and so somethings cant work, would it be possible to remake the key, so the multiplayer codes would understand?!

PostPosted: Sun Jul 31, 05 3:29 pm
by Bob
We have made an MP keypad. Feel free to find it and use it. Courtesy of Nobody of course :wink:

PostPosted: Sun Jul 31, 05 9:39 pm
by kBo
He's asking for nanokeys, not keypads.

PostPosted: Sun Jul 31, 05 11:27 pm
by Bob
Oh, misread. Sorry

PostPosted: Mon Aug 01, 05 10:28 am
by AgentSmyth
tis k....i dont think it can be done...by me anyway....i finished my map using a keypad instead

PostPosted: Mon Aug 01, 05 10:30 am
by Alistair
kBo wrote:He's asking for nanokeys, not keypads.


No, he wants lockpicks >=D

PostPosted: Tue Aug 02, 05 1:01 am
by AlexDenton
Someone can code one, I'm sure.

All it takes is the binding of a conditional mover to the key.

PostPosted: Tue Aug 02, 05 2:40 pm
by AgentSmyth
well i wont be able to code it...the best i can do is create a custom txt file that can be used in a datacube/newspaper/book and it doesnt even work in multiplayer :cry: