Scripting: q: func_beam

Post your scripting questions / solutions here

Moderator: Moderators

Neocortex
Lance Corporal
Posts: 14
Joined: Sat Dec 18, 2004 8:37 pm
Contact:

Scripting: q: func_beam

Post 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 :D
Elgan
Lieutenant General
Posts: 890
Joined: Tue Apr 13, 2004 10:43 pm
Location: uk
Contact:

Post by Elgan »

go play a freeze tag server. The beam that comes from the players eyes is a func beam
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post 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.
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
Elgan
Lieutenant General
Posts: 890
Joined: Tue Apr 13, 2004 10:43 pm
Location: uk
Contact:

Post 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
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

well ok, a paper-thin brush from point A to point B.
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
Neocortex
Lance Corporal
Posts: 14
Joined: Sat Dec 18, 2004 8:37 pm
Contact:

Post by Neocortex »

ok, and for what is it useful for? For only freezetag lazergun?
User avatar
At0miC
General
Posts: 1164
Joined: Fri Feb 27, 2004 11:29 pm
Location: The Netherlands

Post 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)?
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post 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.
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
User avatar
At0miC
General
Posts: 1164
Joined: Fri Feb 27, 2004 11:29 pm
Location: The Netherlands

Post by At0miC »

what boxes do you mean? the electric boxes on the walls?
User avatar
HyperKiller
Corporal
Posts: 38
Joined: Wed May 19, 2004 8:00 pm
Location: Slovenia
Contact:

Post by HyperKiller »

So this line is a script thing? No way of making it non straight?
You must know that you are special, just like everyone else.
Green Beret
Major General
Posts: 746
Joined: Mon Apr 19, 2004 12:21 pm
Contact:

Post by Green Beret »

maybe add radius :?:
Image
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Post 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 )
Admin .MAP Forums
Image
Head above heels.
Green Beret
Major General
Posts: 746
Joined: Mon Apr 19, 2004 12:21 pm
Contact:

Post by Green Beret »

is this AA,or SH

cause i dont have func_beam

but i also have original entdefs.pk3
Image
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Post by Bjarne BZR »

Its pure AA scripting :)
Admin .MAP Forums
Image
Head above heels.
Grassy
First Lieutenant
Posts: 221
Joined: Sun Aug 22, 2004 11:36 am

Post 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
Post Reply