Tutorial 33: Beams


BEAM=[source_surface],[target],[destination_surface],[r1],[g1],[b1],[alpha],[r2],[g2],[b2],[time_in_msecs],[radius],[radius2],[texnum],[scroll-x],[scroll-y],[flags],[segments]

Oh boy.
Beams are drawn between 2 points. Usually squibs. There is a whole lot you can do with em. Ralph ‘ehhhhhhhhhhhhhhh’ ‘Badabagayo’ Barbagallo is responsible for this.

Newscript
On cubic 1 put a cmd
Newent=ob_squib;floor=0

On cubic 2 put a cmd
Newent=ob_squib;floor=0
Make sure the 3d nodes are apart from each other so that you can see the beam

On cubic 1 put a cmd at 2.0
Beam=effect_1,2,effect_1,0,1,0,1,1,.1,.1,5000,1,1,0,0,0,0,0

This will draw a simple green beam that slowly changes to red in 5 secs.

How this mess works.
Effect_1 - the surface on the squib on cubic track 1
2 - the target entity, in this case the squib on track 2
Effect_1 - the surface on the squib on cubic track 2 that we are targeting for the beam
0,1,0, - being The r,g,b value, which is green
1 - being full alpha
1,.1,.1 - being the r,g,b value which is red with hints of green and hints of blue. IF you don’t want the beam to change color over time, just use the same RGB values of the first
5000 - the duration of the beam
1 - the start thickness
1 - the end thickness
0 – no texture
0 – no texture scrolling on x axis
0 – no texture scrolling on y axis
0 – no flags
0 – no segments

NOTE: I wish beams could be smaller, but they can’t. You can however, use the flag to shrink them down over time.

Lets drop another cmd node at 2.1
Beam=effect_1,2,effect_1,1,1,1,1,0,0,1,3000,1,3,0,0,0,544,13
This will draw a second beam, an electrical beam that goes from white to blue in 3 secs.

Effect_1 - the surface on the squib on cubic track 1
2 - the target entity, in this case the squib on track 2
Effect_1 - the surface on the squib on cubic track 2 that we are targeting for the beam
1,1,1, - being The r,g,b value, which is white
1 - being full alpha
0,0,1 - being the r,g,b value which is blue
3000 - the duration of the beam
1 - the start thickness
3 - the end thickness – YOU MUST PUT A DIFFERENT number to do lightning beams, the bigger the number the bigger the lightning
0 – no texture
0 – no texture scrolling on x axis
0 – no texture scrolling on y axis
544 – The lightning flag, the alphaglow flag
13 – no segments, 13 is the maximum number of segments you can have when using lightning

play this. Now change the 544 to 545.
You just added the shrink flag. Looks cool.

Now try moving the nodes around in time.

You can enter flags with the hex method or decimal
Here are all the flags that can be used for beams.

0x00000001 = shrink
0x00000002 = fade
0x00000004 = colorfade
0x00000008 = particle
0x00000010 = scroll
0x00000020 = glow
0x00000040 = grow
0x00000100 = flutter
0x00000200 = lightning
0x00000400 = 2radius
0x00000800 = alphaleft
0x00001000 = alpharight
0x00002000 = infinite
0x00004000 = flipx
0x00008000 = flipy

load up your calculater and set it to scientific
0x00000220 = glow & lighning
go into hex mode and enter 220 then click on dec(imal) 544

You can also add textures to the beams.
Beam=effect_1,2,effect_1,1,1,1,1,0,0,1,3000,1,3,24,0,0,544,13
using texture 24.

You can also have the texture scroll.

Experiment, play, there are many tricks you can do with beams.

Take a look at scripts/mystech/m1fx_nuts-01 (-02,-03,-04). These were exercises in beam usage.