Env laser: Difference between revisions
Jump to navigation
Jump to search
Tip:To move an entity very slightly so the center point doesn't intersect with the side of a wall anymore use the Ctrl+M shortcut, which opens up the transform window. Click on move, click on the desired direction (x, y or z), then fill in a value of either 0.01 or -0.01 to place the brush slightly off the grid by only a fraction. It is better to perform such subtle off-grid movements when you're done editing your map and are ready for the final compile. For the duration of your editing stick to the grid.
Note:This effect is not available in all games.
Drivingdisc2 (talk | contribs) |
|||
Line 4: | Line 4: | ||
==Entity description== | ==Entity description== | ||
It creates a laser beam between itself and a given target. It is somewhat similar to [[env_beam]] and not to be confused with [[env_portal_laser]]. | It creates a laser beam between itself and a given target. It is somewhat similar to [[env_beam]] and not to be confused with [[env_portal_laser]]. In case an env_laser entity doesn't damage you, first make sure that the "damage per second" value is not set to zero, and then make sure the centerpoint of the env laser in hammer is not inside a brush. Also make sure that the center of the env_laser is not on the edge of a brush. In all the above cases you will not receive any damage. | ||
To move | {{tip|To move an entity very slightly so the center point doesn't intersect with the side of a wall anymore use the Ctrl+M shortcut, which opens up the transform window. Click on move, click on the desired direction (x, y or z), then fill in a value of either 0.01 or -0.01 to place the brush slightly off the grid by only a fraction. It is better to perform such subtle off-grid movements when you're done editing your map and are ready for the final compile. For the duration of your editing stick to the grid.}} | ||
If your env_laser doesn't have a targetname the "start on" flag doesn't have to be set since it starts automatically. If the env_laser does have a targetname you do need the "start on" flag if you want it to | If your env_laser doesn't have a targetname the "start on" flag doesn't have to be set since it starts automatically. If the env_laser does have a targetname you do need the "start on" flag if you want it to work when the map spawns. | ||
{{code class|CEnvLaser|EnvLaser.cpp}} | {{code class|CEnvLaser|EnvLaser.cpp}} |
Revision as of 12:55, 18 June 2018
Entity description
It creates a laser beam between itself and a given target. It is somewhat similar to env_beam and not to be confused with env_portal_laser. In case an env_laser entity doesn't damage you, first make sure that the "damage per second" value is not set to zero, and then make sure the centerpoint of the env laser in hammer is not inside a brush. Also make sure that the center of the env_laser is not on the edge of a brush. In all the above cases you will not receive any damage.

If your env_laser doesn't have a targetname the "start on" flag doesn't have to be set since it starts automatically. If the env_laser does have a targetname you do need the "start on" flag if you want it to work when the map spawns.
Keyvalues
- Target of Laser ([todo internal name (i)]) <targetname>
- Name of entity, or entities, to strike at. The target is randomly chosen if there are multiple entities matching the given name.
- Amount of noise (0-255) ([todo internal name (i)]) <integer>
- The amount of noise in the beam. 0 is a perfectly straight beam.
- End Sprite ([todo internal name (i)]) <sprite>
- If specified, this sprite will be drawn at the end of the laser beam.
- Texture Scroll Rate (0-100) ([todo internal name (i)]) <integer>
- Rate at which the beam texture should scroll along the beam.
- Damage / second ([todo internal name (i)]) <string>
- How much damage this laser does. per second. to things it hits.
- Dissolve Type ([todo internal name (i)]) <choices>
- Dissolve effect type.

- -1 : None
- 0 : Energy
- 1 : Heavy electrical
- 2 : Light electrical
- Name (targetname) <string>[ Edit ]
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g.
parentname
ortarget
).
Also displayed in Hammer's 2D views and Entity Report.See also: Generic Keyvalues, Inputs and Outputs available to all entities
Parentname:
- Parent (parentname) <targetname>
- Specifies a movement parent. An entity will maintain its initial offset from its parent. An attachment point can be added to the end of the name, separated by a comma.
Flags
- 1 : Start On
- 16 : StartSparks
- 32 : EndSparks
- 64 : Decal End
Inputs
- TurnOn
- Turns the laser on.
- TurnOff
- Turns the laser off.
- Toggle
- Toggles the laser between on and off.
Parentname:
- SetParent <string >
- Move with this entity. See Entity Hierarchy (parenting).
- SetParentAttachment <string >
- Change this entity to attach to a specific attachment point on its parent. The entity will teleport so that the position of its root bone matches that of the attachment. Entities must be parented before being sent this input.
- SetParentAttachmentMaintainOffset <string >
- As above, but without teleporting. The entity retains its position relative to the attachment at the time of the input being received.
- ClearParent
- Removes this entity from the the movement hierarchy, leaving it free to move independently.