Start off inventory

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

Moderator: Forum Guards

Start off inventory

Postby Spiderbot01 » Tue Jan 09, 07 6:33 pm

You know in DXSP, you start off with a pistol, electric prod and a medkit, how do you do this in UnrealEd?

Also, you know in the MJ12 Lab connected to UNATCO, you get your inventory yoinked off you, but if you go to the armory its there, how do you do that?
<center>------</center><center>
Image</center>
<center>Image</center><
User avatar
Spiderbot01
Alpha
 
Posts: 5363
Joined: Wed Nov 30, 05 8:24 pm
Location: LONDON!!!!

Postby Dae » Tue Jan 09, 07 7:07 pm

You know in DXSP, you start off with a pistol, electric prod and a medkit, how do you do this in UnrealEd?

As far as I remember, MissionScript is responsible for that. For multiplayer maps you will definitely need another solution.
User avatar
Dae
Alpha
 
Posts: 12086
Joined: Sat Sep 06, 03 4:40 pm

Re: Start off inventory

Postby MainMan » Tue Jan 09, 07 7:07 pm

Longc[A]t wrote:You know in DXSP, you start off with a pistol, electric prod and a medkit, how do you do this in UnrealEd?
It's in function GiveInitialInventory() in DeusExPlayer.uc - it checks whether it is a singleplayer game or it is a MPgame with bStartWithPistol as true, and if yes to either, then it gives you that stuff. No way of doing it through UEd - it's code.

Longc[A]t wrote:Also, you know in the MJ12 Lab connected to UNATCO, you get your inventory yoinked off you, but if you go to the armory its there, how do you do that?

Check the MissionScript for that level.
<center>ty m7
</center>
User avatar
MainMan
<i>Tru' Playa' Fer Defs</i>
 
Posts: 4655
Joined: Sun Jun 05, 05 7:38 am
Location: London, UK

Postby Spiderbot01 » Tue Jan 09, 07 8:56 pm

I'm not doing it for MP, I rarely map MP anymore :P
Thanks anyway :]
<center>------</center><center>
Image</center>
<center>Image</center><
User avatar
Spiderbot01
Alpha
 
Posts: 5363
Joined: Wed Nov 30, 05 8:24 pm
Location: LONDON!!!!

Postby Allan » Wed Jan 10, 07 6:10 am

Code: Select all
      // remove the player's inventory and put it in a room
         if (Player.Inventory != None)
         {
            item      = Player.Inventory;
            nextItem  = None;

            foreach AllActors(class'SpawnPoint', SP)
            {
               // Find the next item we can process.
               while((item != None) && (item.IsA('NanoKeyRing') || (!item.bDisplayableInv)))
                  item = item.Inventory;

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

                  item.DropFrom(SP.Location);

                  // restore any ammo amounts for a weapon to default
                  if (item.IsA('Weapon') && (Weapon(item).AmmoType != None))
                     Weapon(item).PickupAmmoCount = Weapon(item).Default.PickupAmmoCount;
               }
               
               if (nextItem == None)
                  break;   
               else
                  item = nextItem;
            }


That's the (slightly edited) part of the code you'll need. It gets your inventory, and then looks for SpawnPoints in the map, for which to put it in. Interesting method.
User avatar
Allan
Alpha
 
Posts: 4545
Joined: Wed Dec 21, 05 1:41 pm
Location: Northamptonshire, England.

Postby Spiderbot01 » Thu Jan 11, 07 10:42 am

Leik another question.

Imma making a map for DX:MIB, and Ive got lots of police officers. Now is there anyway of looking through like the meaningless 'barks', i.e the ones that come up in an outlined box when you right click on someone, so I can assign them to some of the officers, so they don't just breathe at you?
<center>------</center><center>
Image</center>
<center>Image</center><
User avatar
Spiderbot01
Alpha
 
Posts: 5363
Joined: Wed Nov 30, 05 8:24 pm
Location: LONDON!!!!


Return to Editing issues

Who is online

Users browsing this forum: No registered users and 42 guests