Non-Killing Zone?!

The best and quickest support by a group of top-notch editing specialists, guaranteed!

Moderator: Forum Guards

Non-Killing Zone?!

Postby AgentSmyth » Sat Jul 30, 05 11:43 am

How do you make a part in your map where you cannot kill another person!?
<font color="red" size="1">Who Said Life Was Fair</font>
Image
User avatar
AgentSmyth
Regular
 
Posts: 396
Joined: Fri Oct 01, 04 6:05 pm
Location: On my Computer

Postby Dae » Sat Jul 30, 05 12:30 pm

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! :)
User avatar
Dae
Alpha
 
Posts: 12086
Joined: Sat Sep 06, 03 4:40 pm

Postby AgentSmyth » Sat Jul 30, 05 1:40 pm

thanx alot.... :lol:
<font color="red" size="1">Who Said Life Was Fair</font>
Image
User avatar
AgentSmyth
Regular
 
Posts: 396
Joined: Fri Oct 01, 04 6:05 pm
Location: On my Computer

Postby ~ô¿ô~Nobody~ » Sat Jul 30, 05 4:22 pm

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 is perfect...
------------------------------
Longc[A]t wrote:I still think Dae is a russian spambot.

~[A]Daedalus~ wrote:There will be a day when my patience goes away and you, along with all who rant with you, will get banned.

ô¿ô¥[GODZ]¥NOCHANC wrote:I can ban any one I want ANY time I want. You have no rights here.
User avatar
~ô¿ô~Nobody~
Alpha
 
Posts: 2520
Joined: Fri Dec 31, 04 3:20 pm
Location: Proclarush Taonas

Postby Dae » Sat Jul 30, 05 5:14 pm

~[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.
User avatar
Dae
Alpha
 
Posts: 12086
Joined: Sat Sep 06, 03 4:40 pm

Postby ~ô¿ô~Nobody~ » Sat Jul 30, 05 6:14 pm

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 :)
Nobody is perfect...
------------------------------
Longc[A]t wrote:I still think Dae is a russian spambot.

~[A]Daedalus~ wrote:There will be a day when my patience goes away and you, along with all who rant with you, will get banned.

ô¿ô¥[GODZ]¥NOCHANC wrote:I can ban any one I want ANY time I want. You have no rights here.
User avatar
~ô¿ô~Nobody~
Alpha
 
Posts: 2520
Joined: Fri Dec 31, 04 3:20 pm
Location: Proclarush Taonas

Postby Alex » Sat Jul 30, 05 6:37 pm

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
{
}
Alex
Alpha
 
Posts: 8067
Joined: Wed Nov 12, 03 4:51 pm

Postby AgentSmyth » Sun Jul 31, 05 9:40 am

tis k i now have another problem....can u get nano keys to work in multiplayer?
i must seem like such a n00b :oops:
<font color="red" size="1">Who Said Life Was Fair</font>
Image
User avatar
AgentSmyth
Regular
 
Posts: 396
Joined: Fri Oct 01, 04 6:05 pm
Location: On my Computer

Postby Alex » Sun Jul 31, 05 10:12 am

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
Alex
Alpha
 
Posts: 8067
Joined: Wed Nov 12, 03 4:51 pm

Postby AgentSmyth » Sun Jul 31, 05 10:32 am

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?!
<font color="red" size="1">Who Said Life Was Fair</font>
Image
User avatar
AgentSmyth
Regular
 
Posts: 396
Joined: Fri Oct 01, 04 6:05 pm
Location: On my Computer

Postby Bob » Sun Jul 31, 05 3:29 pm

We have made an MP keypad. Feel free to find it and use it. Courtesy of Nobody of course :wink:
Bob
Forum God
 
Posts: 8552
Joined: Sun Apr 25, 04 9:14 pm
Location: Scotland - Marco's House =P

Postby kBo » Sun Jul 31, 05 9:39 pm

He's asking for nanokeys, not keypads.
"Phreaking doesn't exist. It's an abstract concept that is blindly supported by the collective consciousness of a flakey subculture. You saw nothing."
User avatar
kBo
Master
 
Posts: 1698
Joined: Wed Dec 24, 03 2:52 pm
Location: North Carolina, USA

Postby Bob » Sun Jul 31, 05 11:27 pm

Oh, misread. Sorry
Bob
Forum God
 
Posts: 8552
Joined: Sun Apr 25, 04 9:14 pm
Location: Scotland - Marco's House =P

Postby AgentSmyth » Mon Aug 01, 05 10:28 am

tis k....i dont think it can be done...by me anyway....i finished my map using a keypad instead
<font color="red" size="1">Who Said Life Was Fair</font>
Image
User avatar
AgentSmyth
Regular
 
Posts: 396
Joined: Fri Oct 01, 04 6:05 pm
Location: On my Computer

Postby Alistair » Mon Aug 01, 05 10:30 am

kBo wrote:He's asking for nanokeys, not keypads.


No, he wants lockpicks >=D
User avatar
Alistair
Forum Hero
 
Posts: 2575
Joined: Sun Jan 30, 05 2:02 pm
Location: England, UK

Postby AlexDenton » Tue Aug 02, 05 1:01 am

Someone can code one, I'm sure.

All it takes is the binding of a conditional mover to the key.
Hey! Hey, Guys! Check My Girlfriend's Rack!
Image
User avatar
AlexDenton
Forum Legend
 
Posts: 5694
Joined: Fri Jun 18, 04 9:57 pm
Location: Passed out in a hotel bathroom.

Postby AgentSmyth » Tue Aug 02, 05 2:40 pm

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:
<font color="red" size="1">Who Said Life Was Fair</font>
Image
User avatar
AgentSmyth
Regular
 
Posts: 396
Joined: Fri Oct 01, 04 6:05 pm
Location: On my Computer


Return to Editing issues

Who is online

Users browsing this forum: No registered users and 9 guests