Func conveyor bms: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(-added class hierarchy, cleanup)
 
(12 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{LanguageBar}}
{{LanguageBar}}
{{CD|???|base=CFuncConveyor}}
{{CD|CFuncConveyor}}
{{toc-right}}
{{toc-right}}
{{this is a|brush entity|game=Black Mesa|name=func_conveyor_bms}} It functions as a conveyor belt, with a moving surface. The surface material should have a <code>[[List Of Material Proxies#Entity integration|ConveyorScroll]]</code> Material Proxy, to synchronize the material movement and push effect. The main difference between [[func_conveyor_bms]] and [[func_conveyor]] is that it can interact with VPhysics objects and not only QPhysics objects. This entity also have some inputs that can control conveyor state.
{{this is a|brush entity|game=Black Mesa|name=func_conveyor_bms}} It functions as a conveyor belt, with a moving surface. The surface material should have a <code>[[List Of Material Proxies#Entity integration|ConveyorScroll]]</code> Material Proxy, to synchronize the material movement and push effect. The main difference between [[func_conveyor_bms]] and [[func_conveyor]] is that it can interact with VPhysics objects and not only QPhysics objects. This entity also have some inputs that can control conveyor state. Most inputs, outputs and properties are same as most other [[Brush_entity/Rendering_related_keyvalues_and_inputs|brush entities with rendering]].


==Keyvalues==
==Keyvalues==
{{Brush rendering note}}
{{KV Targetname}}
{{KV|Move Direction (Pitch Yaw Roll)|intn=direction|angle|The direction conveyor moves.}}
{{KV|Move Direction (Pitch Yaw Roll)|intn=direction|angle|The direction conveyor moves.}}
{{KV|Conveyor Speed|intn=speed|string|Linear speed of moving surface.}}
{{KV|Conveyor Speed|intn=speed|string|Linear speed of moving surface.}}
Line 15: Line 12:


==Inputs==
==Inputs==
{{IO|ReverseDirection|param=void|Reverse direction of conveyor.|nofgd=1}}
{{I|ReverseDirection|param=void|Reverse direction of the conveyor.|nofgd=1}}
{{IO|Activate|param=void|Activate the conveyor.|nofgd=1}}
{{I|Activate|param=void|Activate the conveyor.|nofgd=1}}
{{IO|Deactivate|param=void|Deactivate the conveyor.|nofgd=1}}
{{I|Deactivate|param=void|Deactivate the conveyor.|nofgd=1}}
{{IO|Toggle|param=void|Toggle the conveyor current state.|nofgd=1}}
{{I|Toggle|param=void|Toggle the conveyor current state.|nofgd=1}}


==Bugs/Limitations==
==Bugs/Limitations==
===Levitating objects===
===Levitating Objects===
It seems that conveyor don't really push objects, it seems that conveyor just creates pulling point between object and conveyor surface and than pull object along a given direction. This method creates unrealistic physics behavior of objects, like in this [https://www.youtube.com/watch?v=NCGoPlx-Swk&t=29s video], it was initially expected that the box during pushing will get the same angle of inclination as that of the conveyor, but instead this, the box becomes to be levitating.
It seems that conveyors don't actually push [[VPhysics]] objects. Instead, they appear to create a pulling point between the object and the conveyor surface, then pull the object in a given direction. This method results in unrealistic physics behavior. For example, in this [https://www.youtube.com/watch?v=NCGoPlx-Swk&t=29s video], it was initially expected that the box would tilt at the same angle as the conveyor during movement. However, instead, the box appears to levitate.
 
===Doesn't Work with Client-Side Ragdolls===
This is one of the many brush entities which is completely ignored by [[Client ragdoll|client-side ragdolls]]. This means that ragdoll created by NPC will fall through this entity. This issue is especially noticeable in '''Interloper''', where the corpses of [[npc_alien_grunt_melee|unarmored alien grunts]] fall through conveyor belts.


===Doesn't work with client side ragdolls===
The only way to fix this is to use {{ent|trigger_serverragdoll}}, it will force most NPCs to created server side ragdolls instead, such ragdolls do not ignore brush entities, and will also interact with conveyors properly. But this will also disable ragdoll breaking, because the trigger entity doesn't change ''m_bForceServerGibs'' to '''1''', this issue is fixed in [https://steamcommunity.com/sharedfiles/filedetails/?id=3163507264 [SM<nowiki>]</nowiki>Restored 2012 Ragdolls & Gibs] addon.
This is one of many brush entities that can't hold client side ragdolls, this means that NPC's ragdolls will fall through such entity. In this case this problem most relevant in <code>Interloper</code>, where the corpses of unarmored alien grunts fall through a conveyor belt. The only way to fix this is use [[trigger_serverragdoll]], however in this case ragdolls will not gib ([https://community.lambdageneration.com/black-mesa/post/efesc2f8cyf fix here]).


===NPCs with low speed may stuck===
===NPCs with Low Speed May Get Stuck===
If [[NPC]] is slow - may cause NPC to endless walk on conveyor. Avoid this by increasing the speed for NPC or decreasing the speed of conveyor.
If [[NPC]] is slow - may cause NPC to endless walk on conveyor. Avoid this by increasing the speed for NPC or decreasing the speed of conveyor.


===Doesn't work with weapons and items===
===Doesn't Work with Weapons and Items===
This entity does not work with entities that use <code>weapon_</code> prefix ({{ent|weapon_mp5}}, {{ent|weapon_gluon}}, etc). The same for most of entities that use <code>item_</code> prefix ({{ent|item_weapon_mp5}}, {{ent|item_weapon_gluon}}, etc).
This entity does not work with entities that use the ''weapon_'' prefix (e.g., {{ent|weapon_mp5}}, {{ent|weapon_gluon}}, etc.). The same applies to most entities that use the ''item_'' prefix (e.g., {{ent|item_weapon_mp5}}, {{ent|item_weapon_gluon}}, etc.).
===Tripmines doesn't explode===
Expected that tripmine placed on activated conveyor will explode, but this doesn't happen at all. There is no workarounds, because of triggers doesn't interact with tripmines while tripmines is not actived.
<br>
<gallery mode=packed heights=710px>
File:TripBug2.jpg| frame |An example in <code>dm_darn_mini_r2</code>.
</gallery>

Latest revision as of 05:16, 2 August 2025

English (en)Translate (Translate)
C++ Class hierarchy
CFuncConveyor
CFuncWall
CBaseEntity

func_conveyor_bms is a brush entity available in Black Mesa Black Mesa. It functions as a conveyor belt, with a moving surface. The surface material should have a ConveyorScroll Material Proxy, to synchronize the material movement and push effect. The main difference between func_conveyor_bms and func_conveyor is that it can interact with VPhysics objects and not only QPhysics objects. This entity also have some inputs that can control conveyor state. Most inputs, outputs and properties are same as most other brush entities with rendering.

Keyvalues

Move Direction (Pitch Yaw Roll) (direction) <angle>
The direction conveyor moves.
Conveyor Speed (speed) <string>
Linear speed of moving surface.

Flags

Push : [1]
Disable pushing if flag is unchecked.

Inputs

ReverseDirection <void> !FGD
Reverse direction of the conveyor.
Activate <void> !FGD
Activate the conveyor.
Deactivate <void> !FGD
Deactivate the conveyor.
Toggle <void> !FGD
Toggle the conveyor current state.

Bugs/Limitations

Levitating Objects

It seems that conveyors don't actually push VPhysics objects. Instead, they appear to create a pulling point between the object and the conveyor surface, then pull the object in a given direction. This method results in unrealistic physics behavior. For example, in this video, it was initially expected that the box would tilt at the same angle as the conveyor during movement. However, instead, the box appears to levitate.

Doesn't Work with Client-Side Ragdolls

This is one of the many brush entities which is completely ignored by client-side ragdolls. This means that ragdoll created by NPC will fall through this entity. This issue is especially noticeable in Interloper, where the corpses of unarmored alien grunts fall through conveyor belts.

The only way to fix this is to use trigger_serverragdoll, it will force most NPCs to created server side ragdolls instead, such ragdolls do not ignore brush entities, and will also interact with conveyors properly. But this will also disable ragdoll breaking, because the trigger entity doesn't change m_bForceServerGibs to 1, this issue is fixed in [SM]Restored 2012 Ragdolls & Gibs addon.

NPCs with Low Speed May Get Stuck

If NPC is slow - may cause NPC to endless walk on conveyor. Avoid this by increasing the speed for NPC or decreasing the speed of conveyor.

Doesn't Work with Weapons and Items

This entity does not work with entities that use the weapon_ prefix (e.g., weapon_mp5, weapon_gluon, etc.). The same applies to most entities that use the item_ prefix (e.g., item_weapon_mp5, item_weapon_gluon, etc.).