Always snap to grid

Difference between revisions of "UE3:Inventory (UT3)"

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
(DroppedPickupMesh)
(The summary of the class was wrong. I have hopefully made it more accurate.)
 
Line 10: Line 10:
 
Inventory is the parent class of all actors that can be carried by other actors.
 
Inventory is the parent class of all actors that can be carried by other actors.
 
Inventory items are placed in the holding actor's inventory chain, a linked list
 
Inventory items are placed in the holding actor's inventory chain, a linked list
of inventory actors.  Each inventory class knows what pickup can spawn it (its
+
of inventory actors.  When tossed out (using the DropFrom() function), inventory items
PickupClass).  When tossed out (using the DropFrom() function), inventory items
+
spawn a DroppedPickup actor, of type DroppedPickupClass, to represent them.
spawn a DroppedPickup actor to hold them.
+
  
 
Copyright 1998-2007 Epic Games, Inc. All Rights Reserved.
 
Copyright 1998-2007 Epic Games, Inc. All Rights Reserved.

Latest revision as of 10:04, 22 April 2013

UT3 Object >> Actor >> Inventory
Package: 
Engine
Direct subclasses:
Weapon, UTInventory
This class in other games:
RTNP, U1, UT, UE2Runtime, UT2003, UT2004, U2, U2XMP, UDK

Inventory

Inventory is the parent class of all actors that can be carried by other actors. Inventory items are placed in the holding actor's inventory chain, a linked list of inventory actors. When tossed out (using the DropFrom() function), inventory items spawn a DroppedPickup actor, of type DroppedPickupClass, to represent them.

Copyright 1998-2007 Epic Games, Inc. All Rights Reserved.

Properties[edit]

Property group 'Inventory'[edit]

PickupForce[edit]

Type: string


PickupMessage[edit]

Type: string

Modifiers: databinding, localized

Human readable description when picked up.

Default value: "Snagged an item."

PickupSound[edit]

Type: SoundCue


RespawnTime[edit]

Type: float

Respawn after this time, 0 for instant.

Internal variables[edit]

bDelayedSpawn[edit]

Type: bool


bDropOnDeath[edit]

Type: bool

if true, this inventory item should be dropped if the owner dies

bPredictRespawns[edit]

Type: bool

high skill bots may predict respawns for this item

bReceiveOwnerEvents[edit]

Type: bool

If true, receive Owner events. OwnerEvent() is called.

bRenderOverlays[edit]

Type: bool

If true, this inventory item will be given access to HUD Canvas. RenderOverlays() is called.

DroppedPickupClass[edit]

Type: class<DroppedPickup>

When DropFrom() is called, it will spawn this type of actor.

Default value: Class'Engine.DroppedPickup'

DroppedPickupMesh[edit]

Type: PrimitiveComponent

When DropFrom is called, the spawned DroppedPickupClass will have this mesh imposed upon it.

DroppedPickupParticles[edit]

Type: ParticleSystemComponent


Inventory[edit]

Type: Inventory

Next Inventory in Linked List

InvManager[edit]

Type: InventoryManager


ItemName[edit]

Type: string

Modifiers: databinding, localized


MaxDesireability[edit]

Type: float

Maximum desireability this item will ever have.

Default value: 0.1

PickupFactoryMesh[edit]

Type: PrimitiveComponent


Default values[edit]

Property Value
bHidden True
bOnlyDirtyReplication True
bOnlyRelevantToOwner True
bReplicateMovement False
CollisionType COLLIDE_CustomDefault
Components[0] SpriteComponent'Sprite'
NetPriority 1.4
RemoteRole ROLE_SimulatedProxy

Subobjects[edit]

Sprite[edit]

Class: Engine.SpriteComponent

Property Value
AlwaysLoadOnClient False
AlwaysLoadOnServer False
HiddenGame True

Functions[edit]

Static functions[edit]

BotDesireability[edit]

static function float BotDesireability (Actor PickupHolder, Pawn P, Controller C)


DetourWeight[edit]

static function float DetourWeight (Pawn Other, float PathWeight)


GetLocalString[edit]

static function string GetLocalString (optional int Switch, optional PlayerReplicationInfo RelatedPRI_1, optional PlayerReplicationInfo RelatedPRI_2)

Overrides: Actor.GetLocalString


Events[edit]

Destroyed[edit]

event Destroyed ()

Overrides: Actor.Destroyed


Other instance functions[edit]

ActiveRenderOverlays[edit]

simulated function ActiveRenderOverlays (HUD H)

Access to HUD and Canvas. Event always called when the InventoryManager considers this Inventory Item currently "Active" (for example active weapon)

Parameters:

  • HUD - H

AnnouncePickup[edit]

function AnnouncePickup (Pawn Other)


ClientGivenTo[edit]

reliable client function ClientGivenTo (Pawn NewOwner, bool bDoNotActivate)

This Inventory Item has just been given to this Pawn (owning client only)

Parameters:

  • thisPawn - new Inventory owner
  • bDoNotActivate - If true, this item will not try to activate

DenyPickupQuery[edit]

function bool DenyPickupQuery (class<InventoryItemClass, Actor Pickup)

DenyPickupQuery Function which lets existing items in a pawn's inventory prevent the pawn from picking something up.

Parameters:

  • ItemClass - Class of Inventory our Owner is trying to pick up
  • Pickup - the Actor containing that item (this may be a PickupFactory or it may be a DroppedPickup)

Returns:

true to abort pickup or if item handles pickup

DropFrom[edit]

function DropFrom (Object.Vector StartLocation, Object.Vector StartVelocity)

Drop a representation of this item out in to the world. The world will see DroppedPickupItem, which will be associated with this inventory object

Parameters:

  • StartLocation - The World Location to drop this item from
  • StartVelocity - The initial velocity for the item when dropped

GetHumanReadableName[edit]

simulated function string GetHumanReadableName ()

Overrides: Actor.GetHumanReadableName


GivenTo[edit]

function GivenTo (Pawn thisPawn, optional bool bDoNotActivate)

This Inventory Item has just been given to this Pawn (server only)

Parameters:

  • thisPawn - new Inventory owner
  • bDoNotActivate - If true, this item will not try to activate

GiveTo[edit]

final function GiveTo (Pawn Other)


ItemRemovedFromInvManager[edit]

function ItemRemovedFromInvManager ()

Event called when Item is removed from Inventory Manager. Network: Authority

OwnerEvent[edit]

function OwnerEvent (name EventName)


RenderOverlays[edit]

simulated function RenderOverlays (HUD H)