This article's documentation is for anything that uses the Source engine. Click here for more information.

Prop physics respawnable: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(cleanup)
No edit summary
 
(24 intermediate revisions by 12 users not shown)
Line 1: Line 1:
{{hl2dm point|prop_physics_respawnable}}
{{Ent not in fgd}}
{{CD|CPhysicsPropRespawnable|file1=props.cpp}}
{{this is a|model entity|name=prop_physics_respawnable}} This entity is the same as [[prop_physics]], except it respawns a set time after breaking/exploding.


==Entity description==
{{bug|hidetested=1|1=Breaking this entity using a {{ent|trigger_hurt}} will [https://youtube.com/watch?v=aguKEsHkM0Q crash the game] for all clients! {{jb3|in|addtext-front=''Fixed''{{nbsp}}}}
This entity is the same as [[prop_physics]], but it respawns after set time.
{{workaround|Prevent trigger_hurt being able to hurt physical props via its flags or use a {{ent|point_template}} to spawn a regular {{ent|prop_physics}} each time it breaks.}} }}
{{bug|hidetested=1|Doesn't respawn in {{l4d2|4}}}}


== Keyvalues ==
== Keyvalues ==
{{KV BasePropPhysics}}
{{KV|Respawn time|intn=RespawnTime|int|Amount in seconds this prop will respawn after it breaks.}}
{{KV RenderFields}}
{{KV|Respawn time|int|Ammount in seconds this prop will respawn after it breaks.


== Flags ==
{{OtherKIO|prop_physics}}
{{Fl BasePropPhysics}}


== Inputs ==
== FGD Code ==
{{IO|Ignite|Ignite, burst into flames.}}
<pre>
{{IO|IgniteLifetime|<code>Ignite</code> with the given lifetime. {{todo|Before the flames extinguish, or before health reaches zero?}}|param=float}}
@PointClass base(prop_physics) studioprop() sphere(fademindist) sphere(fademaxdist) = prop_physics_respawnable :
{{IO|IgniteNumHitboxFires|<code>Ignite</code> with the given number of hitbox fires.|param=integer}}
"This class is the same as prop_physics, except it respawns after it breaks"
{{IO|IgniteHitboxFireScale|<code>Ignite</code> with the given hitbox fire scale.|param=float}}
[
{{I BasePropPhysics}}
RespawnTime(float) : "Respawn Time" : 60 : "Ammount in seconds this prop will respawn after it breaks."
{{I RenderFields}}
]</pre>


== Outputs ==
== See also ==
{{O BasePropPhysics}}
* {{ent|prop_data}}
 
* [[Prop Types Overview]]
==See also==
** {{ent|prop_physics}}
[[prop_physics]] - Normal prop_physics entity.
** {{ent|prop_physics_multiplayer}}
** {{ent|prop_physics_override}}
** {{ent|prop_sphere}}
** {{ent|prop_dynamic}}
** {{ent|prop_static}}
** {{ent|prop_ragdoll}}
* {{ent|func_proprrespawnzone}}


[[Category:Physics]]
[[Category:Physics]]
[[Category:Prop entities|physics respawnable]]

Latest revision as of 19:27, 30 May 2025

Icon-NotInFGD.png
This entity is not in the Counter-Strike: SourceDay of Defeat: SourceTeam Fortress 2Left 4 DeadLeft 4 Dead 2Alien SwarmCounter-Strike: Global Offensive FGD by default.
See below for instructions on making it available.
C++ Class hierarchy
CPhysicsPropRespawnable
CPhysicsProp
CBreakableProp
CBaseProp
CBaseAnimating
CBaseEntity
C++ props.cpp

prop_physics_respawnable is a model entity available in all Source Source games. This entity is the same as prop_physics, except it respawns a set time after breaking/exploding.

Icon-Bug.pngBug:Breaking this entity using a trigger_hurt will crash the game for all clients! (Fixed in Jabroni Brawl: Episode 3)
PlacementTip.pngWorkaround:Prevent trigger_hurt being able to hurt physical props via its flags or use a point_template to spawn a regular prop_physics each time it breaks.
Icon-Bug.pngBug:Doesn't respawn in Left 4 Dead 2 Left 4 Dead 2

Keyvalues

Respawn time (RespawnTime) <integer>
Amount in seconds this prop will respawn after it breaks.
Note.pngNote:Other Keyvalues / Inputs / Outputs are same as prop_physics.

FGD Code

@PointClass base(prop_physics) studioprop() sphere(fademindist) sphere(fademaxdist) = prop_physics_respawnable :
	"This class is the same as prop_physics, except it respawns after it breaks"
[
	RespawnTime(float) : "Respawn Time" : 60 : "Ammount in seconds this prop will respawn after it breaks."
]

See also