Pickup is the base class of actors that when touched by an appropriate pawn, will create and place an Inventory actor in that pawn's inventory chain. Each pickup class has an associated inventory class (its InventoryType). Pickups are placed by level designers. Pickups can only interact with pawns when in their default Pickup state. Pickups verify that they can give inventory to a pawn by calling the GameInfo's PickupQuery() function. After a pickup spawns an inventory item for a pawn, it then queries the GameInfo by calling the GameInfo's ShouldRespawn() function about whether it should remain active, enter its Sleep state and later become active again, or destroy itself.
When navigation paths are built, each pickup has an InventorySpot (a subclass of NavigationPoint) placed on it and associated with it (the Pickup's MyMarker == the InventorySpot, and the InventorySpot's markedItem == the pickup).
- bool bAmbientGlow
- True if the pickup glows, False if the pickup doesn't glow.
- bool bDropped
- True if the item was dropped from a player on death, False if the item has not been dropped.
- bool bInstantRespawn
- True if the item respawns instantly after pickup, False if item doesn't not instantly respawn.
- bool bOnlyReplicateHidden
- bool bPredictRespawns
- True if the high skill bots are able to predict the respawn of this pickup, False if bots are unable to predict the respawn of this pickup.
- class<Inventory> InventoryType
- The Inventory class that this Pickup holds so that the appropriate item is added to the Pawn's Inventory chain.
- float MaxDesireability
- The maximum desireablity of the item that this item will have in terms of pickup order.
- InventorySpot MyMarker
- This is the SmallNavigationPoint? that is used to assist an AIController.
- xPickUpBase PickUpBase
- The xPickUpBase is the base the spawned this pickup.
- NavigationPoint PickupCache
- Used for dropped weapons and their location in the level.
- string PickupForce
- The string name representing a force associated to a particular force-feedback setting for joysticks and similiar force-feedback devices.
- localized string PickupMessage
- Human readable description describing the item that was picked up.
- sound PickupSound
- The sound played upon pick up of the item.
- float RespawnEffectTime
- This is the time when the respwn effect goes off before the Pickup is available to be aquired.
- float RespawnTime
- This is the time that the Pickup leaves the Sleeping State and returns to the Pickup State.
- native AddToNavigation ()
- If the item is dropped then the item is added to the Navigation Network
- AnnouncePickup (Pawn Receiver)
- Calls Pawn's HandlePickup and then calls PlaySound.
- float BotDesireability (pawn Bot)
- This determines the AI for desireability of the item. It looks at whether the bot has it in their inventory and whether or not they have charges for the ite,.
- Destroyed ()
- Destroys the InventorySpot and the Inventory contained in the Pickup.
- float DetourWeight (Pawn Other, float PathWeight)
- Value of this path to take a quick detour (usually 0, used when on route to distant objective, but want to grab inventory for example).
- string GetLocalString (optional int Switch, optional PlayerReplicationInfo RelatedPRI_1, optional PlayerReplicationInfo RelatedPRI_2)
- Returns the Default PickupMessage. But I believe this method allows for notification to multiple players in the event of a flag or other item Pickups.
- float GetRespawnTime ()
- Returns the variable RespawnTime, the time after which the Pickup may be respawned.
- InitDroppedPickupFor (Inventory Inv)
- Sets the state and physics to falling, ensures the pickup is replicated and known, gives it a lifespan (16), and then makes sure that it handles being dropped on movers appropriately.
- Landed (Vector HitNormal)
- When then item has landed it goes to the Begin function in the Pickup State.
- bool ReadyToPickup (float MaxWait)
- Always returns False.
- RemoveFromNavigation ()
- Removes the item from the Navigation Network.
- Reset ()
- Calls Destroy if the item exists, goes to PickupState.
- RespawnEffect ()
- No Code.
- SetRespawn ()
- If the GameInfo for the Level allows this item to respawn, then go to StartSleeping otherwise Destroy.
- inventory SpawnCopy (pawn Other)
- Determines whether to give the Pawn the Inventory or spawn a copy and give that copy to the pawn. Returns the Inventory or the copy of the inventory.
- StaticPrecache (LevelInfo L)
- No Code. Used in subclasses for caching the Pickup textures.
This is the initial state of the Pickup. This is when the object is available for pick up by Actors.
In this state it queries the Level for touching Actors. When an Actor does Touch the Pickup it determines validity through ValidTouch. Then it attempts to SetRespawn if it is a respawnable Pickup. If it is then the Pickup goes to the Sleep State.
If the the Timer happens to be reached, the item goes to the FadeOut state. This is for items that have a LifeSpan (usually dropped Pickups).
- Pickup BeginState ()
- If the item is dropped it is AddToNavigation and the TimerRate is set to 8 and non-reoccuring.
- Pickup CheckTouching ()
- For all Pawn's touching the Pickup, it calls the Touch method.
- Pickup EndState ()
- If the item was dropped and it has been picked up, call RemoveFromNavigation.
- Pickup bool ReadyToPickup (float MaxWait)
- Always returns True.
- Pickup Touch (actor Other)
- First it calls ValidTouch to determine validity of the touch. Then it copies the Actor, AnnouncePickup, SetRespawn, and then the copy calls PickupFunction on the Actor.
- Pickup Timer ()
- If the item is dropped then go to the FadeOut State.
- Pickup Transmogrify (class<Pickup> NewClass)
- Changes the nature of the Pickup, used in with the WildCardBase? which varies the Pickup.
- Pickup bool ValidTouch (actor Other)
- Determines if the touch is valid between the Actor and the Pickup. First it checks to see if the actor is valid, can hold inventory, and is alive. Then it makes sure the touch is not taking place through a wall. Finally it asks the GameInfo whether the Pawn is allowed to pick the item up.
Pickups that reach this state are respawnable pickups. In this state the Pickup does not respond to Touch and is usually hidden.
Pickups that are dropped never sleep they are destroyed.
The Pickup sleeps for GetRespawnTime minus the RespawnEffectTime, then it draws the RespawnEffect and then sleeps the remaining time. Then if the PickUpBase is still there it turns itself back on and returns to the Pickup State.
- Sleeping BeginState ()
- bHidden is set to true. The Item is hidden.
- Sleeping EndState ()
- Make the item visible.
- Sleeping bool ReadyToPickup (float MaxWait)
- Returns True if bPredictRespawns is true and Latent from Actor is less then the MaxWait.
- Sleeping StartSleeping ()
- No Code.
- StartSleeping ()
- If the item is dropped then it is destroyed, otherwise go to the sleeping state.
It is allowed to fall for 8 seconds before it goes to the FadeOut state. When the Pickup lands the Landed event is called and it moves to the Begin function of the Pickup State.
- FallingPickup BeginState ()
- Sets the TimerRate to 8 and non-reoccuring.
- FallingPickup CheckTouching ()
- Overriden to do nothing. So the item must be on the ground before it can be picked up.
- FallingPickup Timer ()
- Go to the FadeOut State.
This state is when a FallingPickup has not landed or a Pickup has not not been touched and the Timer has expired. This is usually non respawnable Pickups (like dropped Pickups).
- FadeOut BeginState ()
- Sets the rate of yaw rotation, physics to rotation, and the LifeSpan 1.0 (time before destruction).
- FadeOut EndState ()
- Set the LifeSpawn to 0.0 (killing the object), DrawScale to default, and the Physics to None.
- FadeOut Tick (float DeltaTime)
- Calls native function SetDrawScale.
+-Ammo +-UTAmmoPickup +-AssaultAmmoPickup? +-BioAmmoPickup? +-FlakAmmoPickup? +-LinkAmmoPickup? +-MinigunAmmoPickup +-RocketAmmoPickup? +-ShockAmmoPickup? +-SniperAmmoPickup? +-ArmorPickup +-KeyPickup? +-TournamePickup? +-ArenalinePickup? +-ShieldPickup? +-ShieldPack +-SuperShieldPack? +-TournamentHealth +-HealthPack +-MiniHealthPack +-SuperHealthPack? +-UDamagePack +-WeaponPickup? +-UTWeaponPickup? +-AssaultRiflePickup? +-BioRiflePickup? +-FlakCannonPickup? +-LinkGunPickup? +-MinigunPickup +-PainterPickup? +-RedeemerPickup? +-RocketLauncherPickup? +-ShieldGunPickup? +-ShockRiflePickup? +-SniperRiflePickup? +-SuperShockRiflePickup?
G-LiTe:: Well, the old page was moved to Pickup (UT) already and that page seems unusable for UT2k3 because it mostly links to ut1 pages and doesn't contain any properties or the likes... So I thought I'd just create this one.
Also, in UT1, is the class called TournamentPickUp or TournamentPickup? The page for it is called the latter one while the classname in UT2k3 is with a capital U. I wouldn't know if there's gonna be a page for this anyways, but I'd suggest we rename the UT one when the time comes.
And finally, the PickupCache probably needs a better description and I wouldn't know if the description for bDropped is correct, just a guess.
Burtlo:: I rewrote most of this page with UT2003 in mind. Some of my descriptions are probably not accurate as I am just learning this state thing. I thought also that I would go into details with how the states work here. Perhaps my information is redundant. Formatting is not so great in the state section. Could use some help. Love you guys .