Page 1 of 2
Scripting: q: func_beam
Posted: Sat Dec 25, 2004 5:12 pm
by Neocortex
Might be a noobish question for u guys, but this forum is for questions, right? What is func_beam for, what can i do with it? Thanks

Posted: Sat Dec 25, 2004 6:28 pm
by Elgan
go play a freeze tag server. The beam that comes from the players eyes is a func beam
Posted: Sun Dec 26, 2004 6:34 am
by lizardkid
it's a textured line that goes from one script_origin to another, striaght line. good for ropes and small wires... cool stuff like that.
Posted: Sun Dec 26, 2004 10:51 am
by Elgan
lizardkid wrote:it's a textured line that goes from one script_origin to another, striaght line. good for ropes and small wires... cool stuff like that.
not textured by default
Posted: Mon Dec 27, 2004 8:49 am
by lizardkid
well ok, a paper-thin brush from point A to point B.
Posted: Mon Dec 27, 2004 1:02 pm
by Neocortex
ok, and for what is it useful for? For only freezetag lazergun?
Posted: Mon Dec 27, 2004 2:59 pm
by At0miC
I guess that's the line where you shoot at, the bullets (there are no bullets in game) will hit the place (excually around that place because of the bullet spreads) where this beam will touch the first object (point B)?
Posted: Tue Dec 28, 2004 5:56 am
by lizardkid
it's good for coiled ropes, decorations (think tinsel and garland) nice for sashes to put on models....
but i babble, it's best for wires like in V2 those paper-thin wiress going from the boxes to the ceiling.
Posted: Tue Dec 28, 2004 12:46 pm
by At0miC
what boxes do you mean? the electric boxes on the walls?
Posted: Thu Dec 30, 2004 11:25 am
by HyperKiller
So this line is a script thing? No way of making it non straight?
Posted: Thu Dec 30, 2004 1:17 pm
by Green Beret
maybe add radius

Posted: Thu Dec 30, 2004 3:06 pm
by Bjarne BZR
Here is the code to spawn a red beam from the center of the map and 500 units straight up, and remove it after 2 seconds:
Code: Select all
local.start = ( 0 0 0 )
local.start = ( 0 0 500 )
local.beam = spawn func_beam origin local.start endpoint local.end maxoffset 0
local.beam doActivate
local.beam color (1 0 0)
local.beam commanddelay 2 remove
( thanx jv )
Posted: Thu Dec 30, 2004 3:29 pm
by Green Beret
is this AA,or SH
cause i dont have func_beam
but i also have original entdefs.pk3
Posted: Thu Dec 30, 2004 3:32 pm
by Bjarne BZR
Its pure AA scripting

Posted: Fri Dec 31, 2004 9:56 am
by Grassy
Um, it's also available in Spearhead. There is a very large section in the MOH_GameClasses.html on it.
FuncBeam (func_beam) -> ScriptSlave -> Mover -> Trigger -> Animate -> Entity -> SimpleEntity -> Listener -> Class
activate
Activate the beam
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 beam_color<0.00...1.00><0.00...1.00><0.00...1.00> )
Set the color of the beam
deactivate
Deactivate the beam
delay( Float delay )
Set the amount of delay on the beam updater
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 )
Set the amount of time the beam stays on when activated
maxoffset( Float max_offset )
Set the maximum offset the beam can travel above, below, forward or back of it's endpoints
minoffset( Float min_offset )
Set the minimun offset the beam can travel above, below, forward or back of it's endpoints
model( String modelName )
set the model to modelName.
numsegments( Integer numsegments )
Set the number of segments for the beam
numspherebeams( Integer num )
Set the number of beams that will be shot out in a sphere like formation
overlap( Float beam_overlap )
Set the amount of overlap the beams have when they are being strung together
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
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 <<-- this is interesting!!
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