How do I make a PlayerStart come equipped with selected inventory and items?
Kind of like in the first level of DX, player started with pistol, prod and medkit.
Moderator: Forum Guards
function ResetPlayer(optional bool bTraining)
{
local inventory anItem;
local inventory nextItem;
ResetPlayerToDefaults();
// Reset Augmentations
if (AugmentationSystem != None)
{
AugmentationSystem.ResetAugmentations();
AugmentationSystem.Destroy();
AugmentationSystem = None;
}
// Give the player a pistol and a prod
if (!bTraining)
{
anItem = Spawn(class'WeaponPistol');
anItem.Frob(Self, None);
anItem.bInObjectBelt = True;
anItem = Spawn(class'WeaponProd');
anItem.Frob(Self, None);
anItem.bInObjectBelt = True;
anItem = Spawn(class'MedKit');
anItem.Frob(Self, None);
anItem.bInObjectBelt = True;
}
}
function FirstFrame()
{
local DeusExPlayer AP;
Super.FirstFrame();
If (LocalURL=="NAMEOfTHEMap")
{
AP=DeusExPlayer(GetPlayerPawn());
// AP.GiveNewInventory();
ResetPlayer();
}
}
function GiveNewInventory()
{
local inventory anItem;
local inventory nextItem;
ResetPlayerToDefaults();
// Give the player a pistol and a prod
anItem = Spawn(class'WeaponPistol');
anItem.Frob(Self, None);
anItem.bInObjectBelt = True;
anItem = Spawn(class'WeaponProd');
anItem.Frob(Self, None);
anItem.bInObjectBelt = True;
anItem = Spawn(class'MedKit');
anItem.Frob(Self, None);
anItem.bInObjectBelt = True;
}
Andrievskaya Veronika wrote:Check DeusExPlayer.uc, function ResetPlayer
Override it in your own playerclass. This will work for SinglePlayer, i don't know what about MP.