Moderator: Forum Guards
//=============================================================================
// SummerHUD.
//=============================================================================
class SummerHUD extends DeusExHUD;
// ----------------------------------------------------------------------
// InitWindow()
// ----------------------------------------------------------------------
event InitWindow()
{
root = DeusExRootWindow(GetRootWindow());
Super.InitWindow();
cross.Destroy();
cross = SummerCrosshair(NewChild(Class'SummerCrosshair'));
//Create the log window
msgLog.Destroy();
msgLog = HUDLogDisplay(NewChild(Class'SummerHUDLogDisplay', False));
bTickEnabled = True;
}
// ----------------------------------------------------------------------
// CreateInfoLinkWindow()
//
// Creates the InfoLink window used to display messages. If a
// InfoLink window already exists, then return None. If the Log window
// is visible, it hides it.
// ----------------------------------------------------------------------
function HUDInfoLinkDisplay CreateInfoLinkWindow()
{
if ( infolink != None )
return None;
infolink = SummerHUDInfoLinkDisplay(NewChild(Class'SummerHUDInfoLinkDisplay'));
// Hide Log window
if ( msgLog != None )
msgLog.Hide();
infolink.AskParentForReconfigure();
return infolink;
}
// ----------------------------------------------------------------------
// ----------------------------------------------------------------------
defaultproperties
{
}
~þsÿçhø~ wrote:My laptops screen is broke, how can i fix it?
James wrote:THROW DARK SOULS AT IT
SimonDenton wrote:Thanks for the contribution but I get:
//=============================================================================
// SummerHUD.
//=============================================================================
class SummerHUD extends DeusExHUD;
var DeusExRootWindow root;
// ----------------------------------------------------------------------
// InitWindow()
// ----------------------------------------------------------------------
event InitWindow()
{
root = DeusExRootWindow(GetRootWindow());
Super.InitWindow();
cross.Destroy();
cross = SummerCrosshair(NewChild(Class'SummerCrosshair'));
//Create the log window
msgLog.Destroy();
msgLog = HUDLogDisplay(NewChild(Class'SummerHUDLogDisplay', False));
bTickEnabled = True;
}
// ----------------------------------------------------------------------
// CreateInfoLinkWindow()
//
// Creates the InfoLink window used to display messages. If a
// InfoLink window already exists, then return None. If the Log window
// is visible, it hides it.
// ----------------------------------------------------------------------
function HUDInfoLinkDisplay CreateInfoLinkWindow()
{
if ( infolink != None )
return None;
infolink = SummerHUDInfoLinkDisplay(NewChild(Class'SummerHUDInfoLinkDisplay'));
// Hide Log window
if ( msgLog != None )
msgLog.Hide();
infolink.AskParentForReconfigure();
return infolink;
}
// ----------------------------------------------------------------------
// ----------------------------------------------------------------------
defaultproperties
{
}
SimonDenton wrote:(mind finding and giving me the textures for the IBM computer box and monitor? Thanks in advance)
// Energy the player has
var travel float Energy;
var travel float EnergyMax;
var travel float EnergyDrain; // amount of energy left to drain
var travel float EnergyDrainTotal; // total amount of energy to drain
var float MaxRegenPoint; // in multiplayer, the highest that auto regen will take you
var float RegenRate; // the number of points healed per second in mp
// ----------------------------------------------------------------------
// MaintainEnergy()
// ----------------------------------------------------------------------
function MaintainEnergy(float deltaTime)
{
local Float energyUse;
local Float energyRegen;
// make sure we can't continue to go negative if we take damage
// after we're already out of energy
if (Energy <= 0)
{
Energy = 0;
EnergyDrain = 0;
EnergyDrainTotal = 0;
}
energyUse = 0;
// Don't waste time doing this if the player is dead or paralyzed
if ((!IsInState('Dying')) && (!IsInState('Paralyzed')))
{
if (Energy > 0)
{
// Decrement energy used for augmentations
energyUse = AugmentationSystem.CalcEnergyUse(deltaTime);
Energy -= EnergyUse;
// Calculate the energy drain due to EMP attacks
if (EnergyDrain > 0)
{
energyUse = EnergyDrainTotal * deltaTime;
Energy -= EnergyUse;
EnergyDrain -= EnergyUse;
if (EnergyDrain <= 0)
{
EnergyDrain = 0;
EnergyDrainTotal = 0;
}
}
}
//Do check if energy is 0.
// If the player's energy drops to zero, deactivate
// all augmentations
if (Energy <0> 0)
ClientMessage(EnergyDepleted);
Energy = 0;
EnergyDrain = 0;
EnergyDrainTotal = 0;
AugmentationSystem.DeactivateAll();
}
// If all augs are off, then start regenerating ,
// up to 25%.
if ((energyUse == 0) && (Energy <= MaxRegenPoint))
{
energyRegen = RegenRate * deltaTime;
Energy += energyRegen;
}
}
}
Longc[A]t wrote:I still think Dae is a russian spambot.
~[A]Daedalus~ wrote:There will be a day when my patience goes away and you, along with all who rant with you, will get banned.
ô¿ô¥[GODZ]¥NOCHANC wrote:I can ban any one I want ANY time I want. You have no rights here.
//=============================================================================
// SmartCardChip.
//=============================================================================
class SmartCardChip extends NanoKey;
var localized String Flag; //What flag do we set when we pick this up?
// ----------------------------------------------------------------------
// HandlePickupQuery()
//
// Adds the NanoKey to the player's NanoKeyRing and then destroys
// this object
// ----------------------------------------------------------------------
function bool HandlePickupQuery( inventory Item )
{
local DeusExPlayer player;
if ( Item.Class == Class )
{
player = DeusExPlayer(Owner);
player.PickupNanoKey(NanoKey(item));
SetBool('Flag');
item.Destroy();
return True;
}
return Super.HandlePickupQuery(Item);
}
// ----------------------------------------------------------------------
// ----------------------------------------------------------------------
defaultproperties
{
ItemName="SC Chip"
PlayerViewOffset=(X=30.00,Y=0.00,Z=-12.00),
PlayerViewMesh=LodMesh'DeusExItems.NanoKey'
PickupViewMesh=LodMesh'DeusExItems.NanoKey'
ThirdPersonMesh=LodMesh'DeusExItems.NanoKey'
Icon=Texture'DeusExUI.Icons.BeltIconNanoKey'
Description="NO KEY DESCRIPTION - REPORT THIS AS A BUG!"
beltDescription="CHIP"
Mesh=LodMesh'DeusExItems.NanoKey'
CollisionRadius=2.05
CollisionHeight=3.11
Mass=1.00
Flag='K_RoomA'
}
SimonDenton wrote:I am trying to set a flag when this item is picked up and let the name of the flag we set be a default property we can manipulate in the editor.
[spoiler][/spoiler]
- Code: Select all
//=============================================================================
// SmartCardChip.
//=============================================================================
class SmartCardChip extends NanoKey;
var localized String Flag; //What flag do we set when we pick this up?
// ----------------------------------------------------------------------
// HandlePickupQuery()
//
// Adds the NanoKey to the player's NanoKeyRing and then destroys
// this object
// ----------------------------------------------------------------------
function bool HandlePickupQuery( inventory Item )
{
local DeusExPlayer player;
if ( Item.Class == Class )
{
player = DeusExPlayer(Owner);
player.PickupNanoKey(NanoKey(item));
SetBool('Flag');
item.Destroy();
return True;
}
return Super.HandlePickupQuery(Item);
}
// ----------------------------------------------------------------------
// ----------------------------------------------------------------------
defaultproperties
{
ItemName="SC Chip"
PlayerViewOffset=(X=30.00,Y=0.00,Z=-12.00),
PlayerViewMesh=LodMesh'DeusExItems.NanoKey'
PickupViewMesh=LodMesh'DeusExItems.NanoKey'
ThirdPersonMesh=LodMesh'DeusExItems.NanoKey'
Icon=Texture'DeusExUI.Icons.BeltIconNanoKey'
Description="NO KEY DESCRIPTION - REPORT THIS AS A BUG!"
beltDescription="CHIP"
Mesh=LodMesh'DeusExItems.NanoKey'
CollisionRadius=2.05
CollisionHeight=3.11
Mass=1.00
Flag='K_RoomA'
}
var(Info) localized String Flag;
SimonDenton wrote:Thanks for that I don't think SetBool is the correct command though. Guess I have been browsing too many mission scripts
Also would it be possible to find out how decoration items GetBool, or check for a flag? I know this can all be done with triggers but having this built into the classes might improve workflow and make it even neater.
EDIT: I guess an alternative would be having a conversation with the decoration item that only activates and does the trigger when the convo can be enabled...is that acceptable?
player.flagBase.SetBool(flagName, !flagValue,, flagExpiration);
Longc[A]t wrote:I still think Dae is a russian spambot.
~[A]Daedalus~ wrote:There will be a day when my patience goes away and you, along with all who rant with you, will get banned.
ô¿ô¥[GODZ]¥NOCHANC wrote:I can ban any one I want ANY time I want. You have no rights here.
Longc[A]t wrote:I still think Dae is a russian spambot.
~[A]Daedalus~ wrote:There will be a day when my patience goes away and you, along with all who rant with you, will get banned.
ô¿ô¥[GODZ]¥NOCHANC wrote:I can ban any one I want ANY time I want. You have no rights here.
Longc[A]t wrote:I still think Dae is a russian spambot.
~[A]Daedalus~ wrote:There will be a day when my patience goes away and you, along with all who rant with you, will get banned.
ô¿ô¥[GODZ]¥NOCHANC wrote:I can ban any one I want ANY time I want. You have no rights here.
// check to see if the player can lift a certain decoration taking
// into account his muscle augs
function bool CanBeLifted(Decoration deco)
{
local int augLevel, augMult;
local float maxLift;
maxLift = 50;
if (AugmentationSystem != None)
{
augLevel = AugmentationSystem.GetClassLevel(class'AugMuscle');
augMult = 1;
if (augLevel >= 0)
augMult = augLevel+2;
maxLift *= augMult;
}
if (!deco.bPushable || (deco.Mass > maxLift) || (deco.StandingCount > 0))
{
if (deco.bPushable)
ClientMessage(TooHeavyToLift);
else
ClientMessage(CannotLift);
return False;
}
return True;
}
//------------------
//Strength Attribute
//------------------
function bool CanBeLifted(Decoration deco)
{
local int skillLevel, skillMult;
local float maxLift;
maxLift = 50;
skillLevel = SkillSystem.GetSkillLevelValue(class'AttributeStrength');
skillMult = 1;
if (skillLevel >= 0)
skillMult = skillLevel+2;
maxLift *= skillMult;
if (!deco.bPushable || (deco.Mass > maxLift) || (deco.StandingCount > 0))
{
if (deco.bPushable)
ClientMessage(TooHeavyToLift);
else
ClientMessage(CannotLift);
return False;
}
return True;
}