|Monster Hunt Advanced Mutator
|Page 4 of 4|
|Author:||TheDane [ Tue Mar 03, 2009 8:16 am ]|
I believe this is what you are looking for?
from the TournamentWeapon class:
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) )
P = Pawn(Owner);
if ( AmmoType != None )
OldAmmo = AmmoType.AmmoAmount;
if ( AmmoType.AddAmmo(Weapon(Item).PickupAmmoCount) && (OldAmmo == 0)
&& (P.Weapon.class != item.class) && !P.bNeverSwitchOnPickup )
P.ReceiveLocalizedMessage( class'PickupMessagePlus', 0, None, None, Self.Class );
if (Level.Game.LocalLog != None)
if (Level.Game.WorldLog != None)
if ( Inventory == None )
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.
|Author:||gopostal [ Tue Mar 03, 2009 8:28 am ]|
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.
|Author:||Skillz [ Tue Mar 03, 2009 8:52 am ]|
I do not care about UTJ.
|Author:||gopostal [ Tue Mar 03, 2009 10:00 am ]|
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.
|Author:||Skillz [ Tue Mar 03, 2009 4:50 pm ]|
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.
|Page 4 of 4||All times are UTC - 5 hours|
|Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group