Beam splitter single - dvdvideo1234/LaserSTool GitHub Wiki

Description

This scripted entity is designed to split a laser beam to N smaller and weaker beams. Every time a beam hits, its source will be added to the splitter sources for the output beam s to be selected. You can easily create crystal loops that will stay sustained until something blocks the beam path or a given refraction material absorbs some of the power when passing trough it in case the entity is in repeater mode having only one output beam.

splitter

Turning the entity ON / OFF

The entity will be turned on whenever at least one source is present and its power is greater than zero. This cannot be turned on using wiremod.

Choosing a dominant

The beam power is calculated using the formula p = 5 * w + d, where p is the power being considered, w is current beam width and d is the damage. The entity loops trough its sources for the source entity that produces the most powerful laser beam and uses it as dominant.

Calculating output beam

The output beam behavior and visuals ( texture, sounds, color, flags etc. ) will be taken from the entity laser beam that is considered as dominant producing the most powerful beam that hits the splitter. With, force, damage and the remaining length however are being divided to the output beams count.

Wire behavior

This entity has only outputs, which means that you can only read its internal state and used it to control something else.