func_conveyor
Last edited 3 months ago2024-08-04 10:39:11 UTC
- Wiki
- View Page
-
This entity does two things:
- Creates a moving conveyor belt that pushes things on top of it. Can be disabled with "No push" (1) flag.
- Makes any
scroll
textures applied to it "scroll" at the specified speed (not exactly but close to it). Can be used to create flowing water streams, for example.
Attributes
- Render FX (renderfx) - Gives objects special render effects. Think of it as modifying whatever the Render Mode puts out. The options are as follows:
- 0 = Normal
- 1 = Slow Pulse
- 2 = Fast Pulse
- 3 = Slow Wide Pulse
- 4 = Fast Wide Pulse
- 5 = Slow Fade Away
- 6 = Fast Fade Away
- 7 = Slow Become Solid
- 8 = Fast Become Solid
- 9 = Slow Strobe
- 10 = Fast Strobe
- 11 = Faster Strobe
- 12 = Slow Flicker
- 13 = Fast Flicker
- 14 = Constant Glow
- 15 = Distort
- 16 = Hologram (Distort and Fade)
- Render Mode (rendermode) - Controls the type of rendering that is used for an object. Options are:
- 0 = Normal
- 1 = Color
- 2 = Texture
- 3 = Glow
- 4 = Solid
- 5 = Additive
- Name (targetname) - Property used to identify entities.
- FX Amount (renderamt)
- FX Color (rendercolor)
- Pitch Roll Yaw (angles) - Set the direction of push here.
- ZHLT Lightflags (zhlt_lightflags)
- Light Origin Target (light_origin)
- Conveyor Speed (speed) - The speed of push, and the scroll speed of the
scroll*
textures. Defaults to 100 if 0 or not set.
- Minimum light level (_minlight)
Flags
- No push (1) - Check this to essentially make this entity cosmetic and non-functional (i.e. you only want the scrolling textures, not the push)
- Not solid (2)
Notes
- For this entity to actually look like it's moving, you need to use a texture whose name starts with
scroll
e.g. 'scrollwater1
'.
- The direction of scroll of the
scroll*
texture is fixed in that it only scrolls towards the texture's right, entirely independent from the direction of push. In J.A.C.K., you can toggle texture animation, which will show you the direction the texture will move in the editor. Otherwise, apply the face with '{arrow_r
' texture from decals.wad
(or other suitable textures) for guidance, then replace with the intended scroll*
texture of your choice.
- The direction of push is determined by the angles' Yaw value. To match the two, the top face of the brush, with the
scroll*
texture and aligned to World, should be rotated to match the Yaw value.
- With "Not Solid" flag enabled, there will be no push.
- You can create your own push with a
trigger_push
entity, which gives you greater control.
- When trying to push scientists (maybe some other monsters and entities too), they will "fly around like Mario Kart". To fix this, cover the whole
func_conveyor
with a trigger_push
and set the speed of the trigger_push
to 1.
- Triggering a
func_conveyor
will negate the speed thus pushing in the opposite direction. And thanks to the power of maths, negating a negative value will make it positive thus pushing in the right direction.
- The scroll speed of each "
scroll*
" texture is tied to its scale: an X scale of 2.0 means double the scroll speed measured in Hammer units. The engine also encodes the scroll speed of the scrolling textures in less precision than normal, with only 4 fractional bits (i.e. in increments of 1/16th of a unit, or 0.0625) and maxing out to just under 4096.
- To match push and scroll speeds, the scroll textures should be carefully aligned to world and has X scale of 1, and the speed should be in multiples of the aforementioned fraction. Otherwise they will desync over some distance.
- In fact, the engine uses FX Color (rendercolor) to encode the scroll speed. This means you can set the scroll speed of
scroll*
textures in any brush entity by encoding the desired speed to the property, and even change it using env_render
. But this is all visual, as the push speeds of neither func_conveyor
nor trigger_push
could be changed.
- To encode scroll speed to FX Color, use this formula:
- R -
0
if positive, 1
if negative
- G -
floor( abs(speed) / 16 )
- B -
floor( abs(speed) * 16 ) % 256
(modulo or remainder)
- There is no way to disable the push effect after spawn directly other than killing the entity with killtarget. There is no way to change the push speed either.
- One trick to stop the conveyor push is to have a
func_door
come in between the top faces of a func_conveyor
and entities; 1u separation should suffice.
- Duplicate the
func_conveyor
in place,
- Turn the duplicate into a
func_door
and give it a name,
- Apply NULL texture to all faces,
- Set its compass direction to Up,
- Set its lip to the height of the bounding box minus 1.
- To disable push, simultaneously trigger this door and use
env_render
's FX Color trick above to stop the visual scrolling of the conveyor. To revert the scroll effect, trigger the conveyor twice.
5 Comments
You must log in to post a comment.
You can login or register a new account.
Then a func_button which target is the name of the conveyor switches the steering for both the conveyor and its texture.
Anyhow the YouTube Hammer Quickies 6 is great, for a mortal that is.
- With func_convenyor can simulate (not accurate) a "high gravity" (>800), it only works when you jump on top of brush
ifyaw = down
then:-265<
convenyor speed
<-180if
yaw = up
then:180<
convenyor speed
< 265-265/265 is almost normal "gravity"
if approaches to -180/180 it's like "disable"
+jump
.With some triggers and multimanager can toggle on/off
+jump
of players, useful for gamesmode like deathrun or kz maps.I have tested it on cs 1.6, i guess on hl it will work too
- Also can be used as:
push for bhops, like axn mode.map example:
scroll*
textures for the entities are encoded in a hacky way by hijacking FX Color (rendercolor) and you can control the speed ofscroll*
textures in any brush entity, and even change them with env_render (I tested, it works! 😁)An algorithm you can use is:
0
if positive,1
if negativeabs(speed) // 16
(floor division)floor( abs(speed) * 16 ) % 256
(modulo or remainder)