Someone know , how can i do a laser ?
i have no idea how to create the texture and the shader.
I would like to achieve a laser check, like you can see in some sci fi movie .
thx for any help
Moderator: Moderators
Code: Select all
/*QUAKED func_beam (0 0.25 .5) (-8 -8 -8) (8 8 8) START_ON PERSIST WAVE NOISE
This creates a beam effect from the origin to the target's origin. If no
target is specified, uses angles and projects beam out from there.
Values:
=======
"activate" Activate the beam
"alpha" Alpha of the beam (Default is 1.0)
"angle" ( Float newAngle ) set the angles of the entity using just one value. Sets the yaw of the entity or an up and down direction if newAngle is [0-359] or -1 or -2
"angles" ( Vector newAngles<0.00...360.00><0.00...360.00><0.00...360.00> ) set the angles of the entity to newAngles.
"color" Vector specifiying the red,green, and blue components. (Default is "1 1 1")
"damage" Amount of damage the beam inflicts if beam hits someone (Default is 0)
"deactivate" Deactivate the beam
"delay" ( Float delay ) Set the amount of delay on the beam updater (i.e. slows the effect of the beam down)
"doActivate" ( Entity activatingEntity ) General trigger event for all entities
"endalpha" ( Float alpha ) Set the endpoint alpha value of the beam
"endpoint" ( Vector beam_end_point ) Set the end point of the beam. The beam will be draw from the origin to the end point.
"findendpoint" Find the endpoint of a beam
"life" ( Float beam_life ) Sets the life of the beam for use with the persist spawnflag. This is how long a beam will be displayed.
"maxoffset" ( Float max_offset ) Set the maximum offset the beam can travel above, below, forward or back of it's endpoints (Default is 5)
"minoffset" ( Float min_offset ) Set the minimun offset the beam can travel above, below, forward or back of it's endpoints (Default is 0)
"model" Specifies the model to use as the beam
"numsegments" ( Integer numsegments ) Set the number of segments for the beam (Default is 4)
"numspherebeams" ( Integer num ) Set the number of beams that will be shot out in a sphere like formation
"overlap" ( Float beam_overlap ) Specifies the amount of overlap each beam link should have. Use this to fill in the cracks when using electric on beams. (Default is 0)
"persist" ( Boolean bool ) Set the persist property of the beam
"radius" ( Float radius ) Set the starting radius of the beams if this is a beamsphere
"scale" Set the width of the beam
"shader" ( String beam_shader ) Set the shader that the beam will use
"shoot" Make the beam cause damage to entities that get in the way
"shootradius" ( Float radius ) Set the radius of the damage area between beam endpoints
"target" ( String beam_target ) Set the target of the beam. The beam will be drawn from the origin to the origin of the target entity
"tileshader" ( String beam_shader ) Set the shader that the beam will use. This shader will be tiled.
"toggledelay" ( [ String [random] ], [ Float time ] ) Causes a beam toggling effect. Sets the time between toggling. If random is specified, The time will be between 0 and time
"updateendpoint" Update the endpoint of a beam
"updateorigin" Update the origin of a beam
START_ON - Starts the beam on
PERSIST - Keeps the last few beams around and fades them out over the life of the beam
WAVE - Make the beam follow a sin wave pattern
NOISE - Use a more computationally expensive random effect, but the results are smoother
If the model field is not set, then a renderer generated beam will be created
using the color, minoffset, maxoffset, scale, and subdivisions fields
If the targetname is set, it will use the target specified as the endpoint of the beam
*****************************************************************************/