View unanswered posts | View active topics It is currently Sat Apr 21, 2018 10:46 am



Reply to topic  [ 35 posts ]  Go to page Previous  1, 2, 3, 4
 Monster Hunt Advanced Mutator 
Author Message

Joined: Sat Nov 15, 2008 12:54 pm
Posts: 166
Post 
I believe this is what you are looking for?

from the TournamentWeapon class:

Code:
function bool HandlePickupQuery( inventory Item )
{
   local int OldAmmo;
   local Pawn P;

   if (Item.Class == Class)
   {
      if ( Weapon(item).bWeaponStay && (!Weapon(item).bHeldItem || Weapon(item).bTossedOut) )
         return true;
      P = Pawn(Owner);
      if ( AmmoType != None )
      {
         OldAmmo = AmmoType.AmmoAmount;
         if ( AmmoType.AddAmmo(Weapon(Item).PickupAmmoCount) && (OldAmmo == 0)
            && (P.Weapon.class != item.class) && !P.bNeverSwitchOnPickup )
               WeaponSet(P);
      }
      P.ReceiveLocalizedMessage( class'PickupMessagePlus', 0, None, None, Self.Class );
      Item.PlaySound(Item.PickupSound);
      if (Level.Game.LocalLog != None)
         Level.Game.LocalLog.LogPickup(Item, Pawn(Owner));
      if (Level.Game.WorldLog != None)
         Level.Game.WorldLog.LogPickup(Item, Pawn(Owner));
      Item.SetRespawn();   
      return true;
   }
   if ( Inventory == None )
      return false;

   return Inventory.HandlePickupQuery(Item);
}


that is what prevents you from picking up a weapon if you already have it. So that should be somewhat easy to implement into health and ammo pickups as both weapons, ammo and health share the same parent class >Inventory<. So basicly just add the needed functions that are changed along the line to the different classes and modify it to your needs.


Tue Mar 03, 2009 8:16 am
Profile WWW
BANNED

Joined: Mon Aug 11, 2008 10:44 am
Posts: 848
Location: Coos Bay Oregon
Post 
Jesus we played that map that long? Wow....

Doing some pickups will be easy, as the UTJ-type mods don't fool with them. SLV, scuba, the lights, that sort of thing. It's when you get to health and ammo that it gets weird.

I'm not sure if all understand the principle behind a pickup, but as far as the game engine is concerned it doesn't really see a "Health Vial" when you run over it. All it sees is +5 to health, up to the max health allowed (plus a small amount for vials but I digress). Same thing for ammo, all it does is up the ammo inventory + whatever amount is in the pickup. Denying the pickup seems easy on the surface. If the inventory is full, then disallow. The real life of it is UTJ actually has several limits which cause the conflicts. I'm not sure about BIGI or the others but I'd guess they behave in the same way. You have one OVERALL health limit, a KILL REGENERATED limit, a DEFAULT HEALTH REGENERATED limit, etc. The ammo isn't as bad but it the fact it constantly resupplies on the fly causes issues too. Without the funky mods it's a straightforward issue to limit.

I looked at the server listing for MH. It seems the majority run some sort of pickup mod of some sort. I think I'll code this both ways to cover everyone.

@ Dane: The problem I had with it was if you stood on say a health pickup with UTJ running and try to deny the pickup with a mod+full health, I got inconsistant GPF's probably from a CRC. The UTJ wanted to try to add, the mod wanted to deny and neither was truely super to the other.

oooooo...I might have just solved my problem chatting it out to you. :slap:

_________________
BANNED FOR LIFE


Tue Mar 03, 2009 8:28 am
Profile
Site Admin

Joined: Fri Aug 21, 2009 4:59 am
Posts: 2628
Post 
I do not care about UTJ.

_________________
Like this site? Consider a donation to help with server costs.


Tue Mar 03, 2009 8:52 am
Profile WWW
BANNED

Joined: Mon Aug 11, 2008 10:44 am
Posts: 848
Location: Coos Bay Oregon
Post 
Dude, it's just a discussion. Ideas back-and-forth...you know. There's no real reason to treat me like that. I've always been respectful of you and your forums. I've done a lot of stuff to better PMH and I've never asked for anything back. I don't argue your choices and I work inside the idea limits you put forth. Feel free to say whatever you like to whomever you like but I have earned respect.

_________________
BANNED FOR LIFE


Tue Mar 03, 2009 10:00 am
Profile
Site Admin

Joined: Fri Aug 21, 2009 4:59 am
Posts: 2628
Post 
Oh shit. My bad man. I'm sorry. I wasn't trying to be disrespectful at all. I was only joking, since I said UTJ doesn't matter over and over and everyone was ignoring it, it seems. :hs:

Sorry man.

_________________
Like this site? Consider a donation to help with server costs.


Tue Mar 03, 2009 4:50 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 35 posts ]  Go to page Previous  1, 2, 3, 4

Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.

phpBB SEO