Can a zoneinfo destroy a player's inventory?

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

Moderator: Forum Guards

Can a zoneinfo destroy a player's inventory?

Postby RedDynasty » Sun May 13, 12 6:18 pm

Does anyone know if there is an actor that can delete the player's inventory?
I know that the map duskofhorrors had one but i dont know where to get one
Die mentioned a property in the zoneinfo class called bnoinventory, i tried this but it didnt delete my inventory
Image
Your not a gamer until you played this.
User avatar
RedDynasty
Wannabe
 
Posts: 130
Joined: Sun Apr 01, 12 8:12 pm
Location: Portugal

Postby RedDynasty » Mon May 14, 12 2:45 pm

anyone..?
Image
Your not a gamer until you played this.
User avatar
RedDynasty
Wannabe
 
Posts: 130
Joined: Sun Apr 01, 12 8:12 pm
Location: Portugal

Postby Dae » Mon May 14, 12 4:15 pm

How was it implemented in singleplayer training missions?
User avatar
Dae
Alpha
 
Posts: 12086
Joined: Sat Sep 06, 03 4:40 pm

Postby Poor » Mon May 14, 12 4:18 pm

You would need a custom ZoneInfo.
Poor
Poster
 
Posts: 190
Joined: Tue Jan 04, 11 7:42 pm

Postby RedDynasty » Mon May 14, 12 5:33 pm

I think the training mission is a flag not an actor and if its a flag u cant use it in mp( i need it for a mp map, but for testing i also need it for sp, which means i need a working actor that can delete inventory in both sp and mp)
Also poor, do you know how can i get one? or make one?
Last edited by RedDynasty on Mon May 14, 12 5:34 pm, edited 1 time in total.
Image
Your not a gamer until you played this.
User avatar
RedDynasty
Wannabe
 
Posts: 130
Joined: Sun Apr 01, 12 8:12 pm
Location: Portugal

Postby Poor » Mon May 14, 12 7:09 pm

I took the code from the training mission and put it in a zoneinfo class. I didn't test it.

Code: Select all
class NoInventoryZone extends ZoneInfo;

event ActorEntered(actor Other)
{
   Super.ActorEntered(Other);

   if(Other.IsA('DeusExPlayer'))
      RemovePlayerInventory(DeusExPlayer(Other));
}

function RemovePlayerInventory(DeusExPlayer Player)
{
   local Inventory item, nextItem, lastItem;

   if (Player.Inventory != None)
   {
      item = Player.Inventory;
      nextItem = item.Inventory;
      lastItem = item;

      do
      {
         if ((item != None) && item.bDisplayableInv || item.IsA('Ammo'))
         {
            // make sure everything is turned off
            if (item.IsA('DeusExWeapon'))
            {
               DeusExWeapon(item).ScopeOff();
               DeusExWeapon(item).LaserOff();
            }
            if (item.IsA('DeusExPickup'))
            {
               if (DeusExPickup(item).bActive)
                  DeusExPickup(item).Activate();
            }

            if (item.IsA('ChargedPickup'))
               Player.RemoveChargedDisplay(ChargedPickup(item));

            Player.DeleteInventory(item);
            item.Destroy();
            item = Player.Inventory;
         }
         else
            item = nextItem;

         if (item != None)
            nextItem = item.Inventory;
      }
      until ((item == None) || (item == lastItem));
   }
}
Poor
Poster
 
Posts: 190
Joined: Tue Jan 04, 11 7:42 pm

Postby RedDynasty » Mon May 14, 12 7:20 pm

nope its not working :S
maybe im using the zone wrong?
u just put it near the place u want for players to lose their inventory right?
Last edited by RedDynasty on Mon May 14, 12 7:20 pm, edited 1 time in total.
Image
Your not a gamer until you played this.
User avatar
RedDynasty
Wannabe
 
Posts: 130
Joined: Sun Apr 01, 12 8:12 pm
Location: Portugal

Postby Poor » Mon May 14, 12 8:39 pm

I checked it and it works. Though you can get around it by throwing weapons into the zone.

You have to zone off an area and place a NoInventoryZone in it. Make sure no other zoneinfo's are in the zone, which includes LevelInfo, WaterZone, WarpZoneInfo, and SkyZoneInfo.

If you want something with a radius instead of an entire zone then you need something else.
Poor
Poster
 
Posts: 190
Joined: Tue Jan 04, 11 7:42 pm

Postby RedDynasty » Mon May 14, 12 8:42 pm

So how do i zone off an area?
What i want is when a player goes through a small area with an NoInventoryZone in it, they lose all their inventory( similar like ur cagematch effect where only the players inside the cage get their inventory destroyed)
Also what do i need for the radius?
Image
Your not a gamer until you played this.
User avatar
RedDynasty
Wannabe
 
Posts: 130
Joined: Sun Apr 01, 12 8:12 pm
Location: Portugal

Postby RedDynasty » Tue May 15, 12 8:41 pm

Well i tried using the same method as adding a pain zone( used tacks tutorial) and it didnt work :S
I might be doing something wrong.
Image
Your not a gamer until you played this.
User avatar
RedDynasty
Wannabe
 
Posts: 130
Joined: Sun Apr 01, 12 8:12 pm
Location: Portugal

Postby Alex » Tue May 15, 12 10:17 pm

Poor wrote:I checked it and it works. Though you can get around it by throwing weapons into the zone.


That can be fixed by setting the bNoInventory variable, as mentioned in the start post. It sets a lifespan of 1.5 on all items in the zone.
Alex
Alpha
 
Posts: 8067
Joined: Wed Nov 12, 03 4:51 pm

Postby RedDynasty » Wed May 16, 12 1:02 pm

Everyone thanks for your help, i figured out the problem, i was using the zones wrong, it works perfectly.
Also, alex is right, u need to put bnoinventory to true, otherwise it will only destroy dropped weapons.
1 last question, will this work on mp?
Image
Your not a gamer until you played this.
User avatar
RedDynasty
Wannabe
 
Posts: 130
Joined: Sun Apr 01, 12 8:12 pm
Location: Portugal

Postby Dae » Wed May 16, 12 5:57 pm

RedDynasty wrote: 1 last question, will this work on mp?

Why don't you want to test it yourself?
User avatar
Dae
Alpha
 
Posts: 12086
Joined: Sat Sep 06, 03 4:40 pm


Return to Editing issues

Who is online

Users browsing this forum: No registered users and 16 guests
cron