prop_dynamic
< Zh
Jump to navigation
Jump to search
![]() |
---|
CDynamicProp |
![]() |
prop_dynamic
是一个模型实体,可在所有的 起源 游戏中使用。 用于放置可播放骨骼动画 的模型实体 。



dynamic_prop
。 生成时类名会自动转为prop_dynamic
典型应用
- 按钮机关:将本实体与func_button笔刷绑定后,对模型按use键可触发按钮。通过
SetAnimation
输入实现交互动画
- 杠杆控制:绑定到func_rot_button或momentary_rot_button后,笔刷会自动驱动模型旋转(无需单独设置动画)
- 可破坏物件:通过
Break
输入或受伤害后触发碎裂效果注意:模型内预设的生命值 会覆盖Hammer中的设置
键值(Keyvalues)
参见: Generic Keyvalues, Inputs and Outputs available to all entities
- Name (targetname) <target_source>
- 其他实体引用该实体的目标名称。
- Default Animation (DefaultAnim) <字符串 >
- 空闲状态播放的动画
{{KV|Randomly Animate|intn=RandomAnimation|bool|在最小/最大随机间隔间随机播放动画{{note|仅选择标记为ACT_IDLE
的[[$sequence|动画序列}}}}
- Min Random Anim Time (MinAnimTime) <浮点型 >
- 随机动画最短间隔(秒)
- Max Random Anim Time (MaxAnimTime) <浮点型 >
- 随机动画最长间隔(秒)
- Collisions (solid) <integer choices >
- 物理交互方式:
- 0 - 无碰撞
- 2 - 使用包围盒
- 6 - 启用物理引擎(默认)
- Update children (updatechildren) <布尔值 > (存在于自
以来)
- 实时更新附着点子项的碰撞检测
- Disable Bone Followers (DisableBoneFollowers) <布尔值 > (存在于自
以来)
- 禁用phys_bone_follower生成以节省资源
提示:无此选项时可改用prop_dynamic_override设置无碰撞
- Hold Animation (HoldAnimation) <布尔值 > (存在于自
以来)
- 动画播放完后定格在最后一帧
- Animate Every Frame (AnimateEveryFrame) <布尔值 > (存在于自
以来)
- 强制每帧更新动画
- Ignore NPC Collisions (IgnoreNPCCollisions) <choices> (仅存在于
之中)
- 禁用与生物实体的碰撞检测
- 0: 否
- 1: 是
BaseFadeProp:
- Start Fade Dist (fademindist) <浮点型 >
- Distance at which the entity starts to fade.
- End Fade Dist (fademaxdist) <浮点型 >
- Max fade distance at which the entity is visible.
- If start fade is <0, the entity will disappear instantly when end fade is hit.
- If end fade is <0, the entity won't disappear at all. (This is the default behavior.)
- The values will scale appropriately if the entity is in a 3D Skybox.
- Fade Scale (fadescale) <浮点型 >
- If you specify so in worldspawn, or if the engine is running below DirectX 8 (DX7 in
), props will fade out even if the fade distances above aren't specified. This value gives you some control over when this happens: numbers smaller than 1 cause the prop to fade out at further distances, while those greater than 1 cause it to fade out at closer distances. Using 0 turns off the forced fade altogether. See also the QC command $noforcedfade.
- 渲染模式 (rendermode) <byte choices >
- 在此实体上设置非标准渲染模式。
Render Modes Expand
- Render FX (renderfx) <byte choices >
- 各种有点遗留的阿尔法效果。请参见渲染效果
- Render Amount / Transparency (0–255) (renderamt) <整数 0-255 >
- 需配合非Normal渲染模式
- Render Color (R G B) (rendercolor) <color255 >
- RGB颜色值
Glow:
- Glow Range (glowrange) <整数 > (仅存在于
之中)
- Range at which the glow becomes visible. 0 means always visible.
- Glow Range Min (glowrangemin) <整数 > (仅存在于
之中)
- Range at which the glow stops being visible. 0 means always visible.
- Glow Color Override (R G B) (glowcolor) <color255 > (仅存在于
之中)
- Change the render color of the glow.
BreakableProp:
- Explosion Damage (ExplodeDamage) <浮点型 >
- If non-zero, when this entity breaks it will create an explosion that causes the specified amount of damage. See also Explosion Radius.
- Explosion Radius (ExplodeRadius) <浮点型 >
- If non-zero, when this entity breaks it will create an explosion with a radius of the specified amount. See also Explosion Damage.
- Sound to make when punted (puntsound) <sound > (存在于自
以来)
- Sound to make when punted by gravity gun.
- Break Model Message (BreakModelMessage) <字符串 > (仅存在于
之中)
- "If set, will use this break model message instead of the normal break behavior."
Breakable (common):
- Performance Mode (PerformanceMode) <choices>
- Used to limit the amount of gibs produced when this entity breaks, for performance reasons.
Choices Expand
- Min Damage to Hurt (minhealthdmg) <整数 >
- If a single hit to the object doesn't do at least this much damage, the prop won't take any of the damage it attempted to give.
- Pressure Delay (PressureDelay) <浮点型 >
- Seconds to delay breaking from pressure. Allows creaking/groaning sounds to play.
- Health (health) <整数 >
- How close to breaking the object is.
- Maximum Health (max_health) <整数 >
- Health cannot exceed this amount.
- Physics Impact Damage Scale (physdamagescale) <浮点型 >
- Multiplier for damage amount when this entity is hit by a physics object. With a value of 0 the entity will take no damage from physics.
Who can break this? Expand
- World Model (model) <model >
- The model this entity should appear as. 128-character limit.
- Skin (skin) <整数 >
- Some models have multiple skins. This value selects from the index, starting with 0. May be overridden by game code.
提示:Hammer's model browser automatically updates this value if you use it to view different skins.
- Model Scale (modelscale) <浮点型 > (存在于自
以来) (也存在于
之中)
- A multiplier for the size of the model.
提示:In
Hammer++ with a prop selected in 3D view, hold Ctrl and scroll the mouse wheel to change the modelscale in increments of 0.5. Holding ⇧ Shift will scale it in smaller increments of 0.05.
- Bodygroup (body / SetBodyGroup) <整数 >
- Some models have multiple submodels. This value selects from the index, starting with 0. May be overridden by animations and/or game code.
注意:If both body and SetBodyGroup are present (even if set to 0), body will be prioritized.
- Lighting Origin (lightingorigin) <target_destination>
- Select an entity (not info_lighting!) from which to sample lighting and cubemaps instead of the entity's $illumposition.
阴影:
- Disable Shadows (disableshadows) <布尔值 >
- 防止该实体生成廉价的渲染到纹理的阴影,或如果实体是 prop_static 的光照贴图阴影。不影响影子映射。
- 禁用接收阴影 (disablereceiveshadows) <布尔值 >
- 防止该实体接收动态阴影。
- Shadow Cast Distance (shadowcastdist) <整数 > 不存在于FGD!
- 设置实体投射动态阴影的距离。0 表示从 shadow_control 实体开始的默认距离。
- Disable Shadow Depth (disableshadowdepth) <布尔值 > (存在于自
以来)
- 用于禁用此实体的阴影深度(用于投影纹理)的渲染。
- Disable flashlight (disableflashlight) <布尔值 > (存在于自
以来)
- 用于禁用此实体的投影纹理照明和阴影。
- Projected Texture Cache (shadowdepthnocache) <integer choices > (存在于自
以来)
- 用于提示投影纹理系统缓存此实体的阴影体积是否足够,或改为强制每帧渲染。
选项 Expand
- Render in Fast Reflections (drawinfastreflection) <布尔值 > (存在于自
以来)
- If enabled, this entity will render in fast water reflections (i.e. when a water material specifies
$reflectonlymarkedentities
) and in the world impostor pass.
GMODSandbox:
- Allow Physics Gun (gmod_allowphysgun) <布尔值 > (仅存在于
之中)
- If set, players cannot use Physics Gun on this entity.
- Sandbox Tool Whitelist (gmod_allowtools) <字符串 > (仅存在于
之中)
- If set, only given tools can be used on this entity. You need to supply the tool class names, the names of the
.lua
files of those tools. This also includes the context menu properties!
实体属性(Flags)
DynamicProp:
- Use Hitboxes for Renderbox : [64]
- [Elaborate?]
- Start with collision disabled : [256]
BreakableProp:
- Break on Touch : [16]
- Break on Pressure : [32]
- Will break after being stood on for
PressureDelay
seconds.注意:Some models will break instantly if this is or isn't set. (e.g.
militiawindow02_breakable.mdl
,window_industrial.mdl
)
输入
- SetAnimation <字符串 >
- 立即强制播放指定动画
- SetDefaultAnimation <字符串 >
- 修改空闲状态动画
- SetPlaybackRate <浮点型 >
- 调整动画帧率
- TurnOff
- 通过EF_NODRAW隐藏模型
- TurnOn
- 取消隐藏状态
- DisableCollision
- 设为非固体状态
- EnableCollision
- 恢复碰撞检测
- SetAnimationNoReset <字符串 > (存在于自
以来)
- 仅当未播放该动画时触发
Glow:
BreakableProp:
- Break
- Breaks the breakable.
- SetHealth <整数 >
- Sets a new value for the breakable's health. If the breakable's health reaches zero it will break.
- AddHealth <整数 >
- Adds health to the breakable.
- RemoveHealth <整数 >
- Removes health from the breakable.
- physdamagescale <浮点型 >
- Sets Physics Impact Damage Scale. 0 means this feature is disabled for backwards compatibility.
- EnablePhyscannonPickup
- Makes the breakable able to picked up by the gravity gun.
- DisablePhyscannonPickup
- Makes the breakable not able to picked up by the gravity gun.
- EnablePuntSound (存在于自
以来)
- Allow this prop from playing its Punt Sound sound when punted by the gravity gun.
- DisablePuntSound (存在于自
以来)
- Prevent this prop from playing its Punt Sound sound when punted by the gravity gun.
输出
- OnAnimationBegun
- !activator = none
!caller = this entity
动画起始时触发
- OnAnimationDone
- !activator = none
!caller = this entity
动画完成时触发
BreakableProp:
- OnBreak
- !activator = entity that breaks the object
!caller = this entity
Fired when this object breaks.
- OnHealthChanged <浮点型 >
- !activator = entity that caused the health change
!caller = this entity
Fired whenever the health of the breakable has increased or decreased. This output automatically puts the new health amount as a decimal percent (e.g. 45% = 0.45) into the parameter box for inputs, if the mapper does not override the parameter with something else. - OnTakeDamage
- !activator = entity that caused the damage
!caller = this entity
Fired when damage is taken. - OnPhysCannonAnimatePreStarted
- !activator = none
!caller = this entity
Fired when prop starts itsACT_PHYSCANNON_ANIMATE_PRE
activity. Caused by the object being picked up by the gravity gun.
- OnPhysCannonAnimatePullStarted
- !activator = none
!caller = this entity
Fired when prop has started itsACT_PHYSCANNON_ANIMATE
activity.ACT_PHYSCANNON_ANIMATE_PRE
plays once, thenACT_PHYSCANNON_ANIMATE
starts looping.
- OnPhysCannonDetach
- !activator = none
!caller = this entity
Fired when prop has started itsACT_PHYSCANNON_DETACH
activity (caused by the gravity gun ripping it from a wall).
- OnPhysCannonAnimatePostStarted
- !activator = none
!caller = this entity
Fired when prop has started itsACT_PHYSCANNON_ANIMATE_POST
activity (caused by the player letting the prop go from the gravity gun).
- OnPhysCannonPullAnimFinished
- !activator = none
!caller = this entity
Fired when prop has finished all gravity gun-related animations.