prop_soda

From Valve Developer Community
Jump to navigation Jump to search
Icon-NotInFGD.png
This entity is not in the FGD by default.
See below for instructions on making it available.
C++ Class hierarchy
CProp_Soda
CBasePickup
CBaseAnimating
CBaseEntity
The three flavors of soft drinks in Black Mesa Black Mesa.

prop_soda is a model entity available in Black Mesa Black Mesa. It's a soda can from a vending machine that adds 1 point of health when picked up. Replaces deprecated item_sodacan entity. Used CBasePickup class in Steam versions of the game as a base class, the mod version uses CPhysicsProp as a base class.

Note.pngNote:Most objects that inherit class CBasePickup in Black Mesa have the following features:
  • They're VPhysics objects (disabled in multiplayer mode).
  • Respawn in multiplayer mode (item_weapon_ entities creating xen portal effects as well).
  • Model can be changed to your own via the parameter.
Icon-Important.pngImportant:No physics and collision in multiplayer, so it can't be used in the same way as in singleplayer. Reenabled in SourceCoop SourceCoop.
Icon-Bug.pngBug:Doesn't collide with other CBasePickup and weapon_ entities (not in Black Mesa (mod)).

Keyvalues

Respawn Time (respawntime) <float>
Time waited between respawns in multiplayer mode.
Model (model) <model path>
Model to use for this entity.

Outputs

OnPlayerDenied <void>
Fires if the player has not picked it up when touched.
OnPlayerPickup <void>
Fires if the player picked it up.

Inputs

AttachTo <void>
Attaches this entity to !activator, the entity becomes impossible to pick up. It becomes invisible in first person mode, but only in Steam versions of the game only.
Respawn <void>
Respawn this entity in multiplayer. Fired by this entity after the amount of time from Respawn Time property.
Disable <void>
Make this item invisible and disable the ability to be picked up by players.
Icon-Important.pngImportant:Does not disable physics and collision.
Enable <void>
Make this item visible and enable the ability to be picked up by players.
Fall <void>
Deattaches this entity if was attached with AttachTo input, the entity will retain its position before applying this input and will remain stationary until something will hit it.

Flags

Start Asleep : [1]
Motion Disabled : [2]
Hard Respawn : [4]
Respawn this entity even if it's already spawned. The timer will cycle throughout entire round. Picking up does not restart the timer.
Silent Pickup : [8]
Pick up this entity with no sound and HUD animation.

Dedicated Console Variables

Cvar/Command Parameters or default value Descriptor Effect
prop_soda_health 1 Float The amount of health to add.

See also