Scripted item drop

From Valve Developer Community
Revision as of 15:15, 11 November 2022 by Nescius (talk | contribs) (-added class hierarchy, concise page)
Jump to navigation Jump to search
C++ Class hierarchy
CScriptItem
CItem
CBaseAnimating
CBaseEntity

Template:L4d2 point It is a prop similar to prop_physics_override, but with much of its functionality removed. It does not collide with players and has outputs for being touched and picked up, making it useful for simple collectible items.

Outputs

OnCacheInteraction  !FGD
Fires repeatedly while player is touching this
OnPlayerPickup  !FGD
Fired when a player successfully picks up the prop. The CanPickupObject function needs to exist and return true for the prop for it to fire.
OnPlayerTouch  !FGD
Fired when a player touches the prop.