Code: Select all
var() class PowerSuitType;
var inventory RedundantSuit;
function PreBeginPlay()
{
local inventory PowSuit;
RedundantSuit = Findinventorytype(PowerSuitType);
//ClientMessage("Do I have a:"@RedundantSuit@"?");
If (PowerSuitType != None && !bInventoryLoaded && RedundantSuit == None)
{
PowSuit=Spawn(PowerSuitType,Self,,self.location);
PowSuit.GiveTo(Self);
bInventoryLoaded = True;
}
Super.PreBeginPlay();
}
There must be something I'm missing here.
Edit: Holy crap, I've placed in dozens of prevention checks and it still duplicates like rabbits in heat after each level load. What the hell is this? Seriously, is there something specific to PreBeginPlay or something that makes it largely unsuitable?
Edit 2: Prettied up ordering.
Edit 3: This is relevant only to single player modes, mind.