env_sprite
entity places a sprite within the map. It can also be used to place models, although it can only use the first submodel and skin.
0 0 0
has no effect.env_sprites
are always visible.path/filename.spr
(starting from the root folder). (Example: sprites/tele1.spr
). Can be SPR, MDL, or BSP.env_sprites
are always on.env_sprite
will toggle the sprite between visible and invisible. The sprite will repeat its animation indefinitely. If enabled, the sprite will play through its animation once when triggered and then stay invisible until it is triggered again. (If the env_sprite
is triggered while this single animation is playing, it will become invisible immediately.)func_train
entity with a zhlt_usemodel
property having the value of the name of an env_sprite
entity that has the sprite set to the one you want to move. To turn the sprite train's visibility on or off, use the env_render
entity. Most importantly, the train's Not solid (8) flag must be checked.func_train
entity trick as above, with at least two path_corners
which forms a looped track, and a name. Then add the Angular Velocity (avelocity
) property with its third value being the rotation speed in degrees e.g. 0 0 30
rotates by 30°/s *. The func_train
needs to be moving for the angular velocity to work, so place the train's two path_corners
a tiny distance apart (e.g. 1u) if you don't want the fact that the sprite is moving back and forth too obvious. You also need to trigger the train to move, which it doesn't at spawn.angles
(Pitch Yaw Roll) may have an effect on the sprite's orientation in the level.
Type | Description | Used angles value |
---|---|---|
VP_PARALLEL |
Always faces the camera with roll applied. The majority of sprites are in this format. | Roll* |
VP_PARALLEL_ORIENTED |
Always faces the camera with roll applied. | Roll* |
VP_PARALLEL_UPRIGHT |
Faces the camera but the pitch is always 0. Useful for tree or fire sprites. | None |
FACING_UPRIGHT |
Faces the player's origin but the pitch is always 0. Seldom used. | None |
ORIENTED |
Fixed to the set Pitch Yaw Roll value.** Useful for overlays. | Pitch Yaw Roll* |
angles
is zero, the game code swaps it with the second (Yaw, i.e. the one set by Hammer/J.A.C.K. compass) value. For ORIENTED
sprites, use a non-zero Roll value e.g. 360
to prevent this.angles
. In other words, you only see it if you face about the same direction as the sprite's angles
.env_sprite
is also a popular choice to display static models e.g. props. The model renderer uses new attributes, or interprets them differently to sprites:
sequence
- Sets the animation sequenceframerate
- Sets the speed at which to play the animation (0.0-8.0)env_sprite
.
cycler_sprite
env_glow
You must log in to post a comment. You can login or register a new account.