FunCBaseFlex: Difference between revisions
Jump to navigation
Jump to search
(-added class hierarchy) |
m (Classifying as model entity) |
||
(10 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
{{ent not in fgd}} | {{ent not in fgd}} | ||
{{CD|CBaseFlex|CBaseAnimatingOverlay | {{CD|CBaseFlex|file1=baseflex.cpp|CBaseAnimatingOverlay}} | ||
{{ | {{This is a|model entity|name=funCBaseFlex}} | ||
Debug entity related to flexes. Valve's remark in code: ''meaningless independant class!!'' | Debug entity related to flexes, or possibly made an entity defined by mistake. Valve's remark in code: ''meaningless independant class!!'' | ||
== Description == | |||
This entity has a useful property, that it serves as a generic model entity that supports [[pose parameter]]s and flexes properly. Other entities such as [[prop_dynamic]] do not support those and have visual glitches, or have side effects such as [[generic_actor]]. | |||
Since this entity was never intended to be used, it requires special setup to spawn correctly. Example in [[VScript]] for {{tf2|2}}: | |||
<source lang=js> | |||
function BaseFlexThink() | |||
{ | |||
self.StudioFrameAdvance() | |||
return -1 | |||
} | |||
local entity = Entities.CreateByClassname("funCBaseFlex") | |||
entity.SetModel("models/player/heavy.mdl") | |||
entity.SetAbsOrigin(Vector(417, -326, -191)) | |||
entity.SetAbsAngles(QAngle(0, 90, 0)) | |||
entity.SetPlaybackRate(1.0) | |||
entity.DispatchSpawn() | |||
entity.EmitSound("Heavy.Cheers05") | |||
AddThinkToEnt(entity, "BaseFlexThink") | |||
</source> | |||
== See Also == | |||
* [[CBaseFlex]] | |||
* [[Rendering and studio model related KIO]] |
Latest revision as of 04:31, 19 May 2025
![]() |
---|
CBaseFlex |
![]() |
funCBaseFlex
is a model entity available in all Source games.
Debug entity related to flexes, or possibly made an entity defined by mistake. Valve's remark in code: meaningless independant class!!
Description
This entity has a useful property, that it serves as a generic model entity that supports pose parameters and flexes properly. Other entities such as prop_dynamic do not support those and have visual glitches, or have side effects such as generic_actor.
Since this entity was never intended to be used, it requires special setup to spawn correctly. Example in VScript for Team Fortress 2:
function BaseFlexThink()
{
self.StudioFrameAdvance()
return -1
}
local entity = Entities.CreateByClassname("funCBaseFlex")
entity.SetModel("models/player/heavy.mdl")
entity.SetAbsOrigin(Vector(417, -326, -191))
entity.SetAbsAngles(QAngle(0, 90, 0))
entity.SetPlaybackRate(1.0)
entity.DispatchSpawn()
entity.EmitSound("Heavy.Cheers05")
AddThinkToEnt(entity, "BaseFlexThink")