beam from point A to Point B?
Moderator: Moderators
- HDL_CinC_Dragon
- Brigadier General
- Posts: 574
- Joined: Mon Dec 22, 2003 8:32 pm
beam from point A to Point B?
how do I make it so that I have a beam kinda thing span from point A to point B and to pivot on point A as point B moves
Key:
------ = beam horizontal
| = beam vertical
A = point A
B = point B
Postion 1 before movement:
A-------B
Position 2 after movement is complete:
A
|
|
|
B
or maybe so that the beam shrinks as point B moves closer to Point A
1:
A-------------B
2:
A---------B
3:
A------B
4:
A--B
know what I mean?
Key:
------ = beam horizontal
| = beam vertical
A = point A
B = point B
Postion 1 before movement:
A-------B
Position 2 after movement is complete:
A
|
|
|
B
or maybe so that the beam shrinks as point B moves closer to Point A
1:
A-------------B
2:
A---------B
3:
A------B
4:
A--B
know what I mean?
-
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:
Short answer:
In g_allclasses.html ( included in the Radiant install I believe ) you will find this about the func_beam entity:
In g_allclasses.html ( included in the Radiant install I believe ) you will find this about the func_beam entity:
Code: Select all
updateendpoint
Update the endpoint of a beam
updateorigin
Update the origin of a beamIf you are makeing a custom map all you need to do is have a func_beam target a script_origin and the end of the beam will always be at the script_origin BUT it will only work if you do it in radiant . I have found that for spawing func_beams that you have to make a while loop
while(1)
{
$mybeam endpoint ( xx xx xx )
waitframe
}
or
while(1)
{
$mybeam endpoint $my_script_origin.origin
waitframe
}
I made a clock in radiant a func_beam in the middle and also a script_origin I made a second script_origin on the outside of the clock and had the func_beam target it and I used bind to bind the outside script_origin to the inside one . I then rotated the middle script_origin so that the outside one went around in a circle . Because the fund_beam was targeting the outside script_origin the beam rotated around following the outside script_origin . I had a beam clock . I of course did this for each of the hands of the clock .
while(1)
{
$mybeam endpoint ( xx xx xx )
waitframe
}
or
while(1)
{
$mybeam endpoint $my_script_origin.origin
waitframe
}
I made a clock in radiant a func_beam in the middle and also a script_origin I made a second script_origin on the outside of the clock and had the func_beam target it and I used bind to bind the outside script_origin to the inside one . I then rotated the middle script_origin so that the outside one went around in a circle . Because the fund_beam was targeting the outside script_origin the beam rotated around following the outside script_origin . I had a beam clock . I of course did this for each of the hands of the clock .
-
Master-Of-Fungus-Foo-D
- Muffin Man
- Posts: 1544
- Joined: Tue Jan 27, 2004 12:33 am
- Location: cali, United States
- HDL_CinC_Dragon
- Brigadier General
- Posts: 574
- Joined: Mon Dec 22, 2003 8:32 pm
-
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:
Here is the exelent files posted by tltrude: Here it is: http://pages.sbcglobal.net/tltrude/Temp/code.zip
Expand them into main ( so the cpp files end up in main/code ) and start up Radiant... you will have a lot of new toys ( like beam under the func folder
)
Expand them into main ( so the cpp files end up in main/code ) and start up Radiant... you will have a lot of new toys ( like beam under the func folder
- HDL_CinC_Dragon
- Brigadier General
- Posts: 574
- Joined: Mon Dec 22, 2003 8:32 pm
-
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:
- HDL_CinC_Dragon
- Brigadier General
- Posts: 574
- Joined: Mon Dec 22, 2003 8:32 pm
- HDL_CinC_Dragon
- Brigadier General
- Posts: 574
- Joined: Mon Dec 22, 2003 8:32 pm
-
Master-Of-Fungus-Foo-D
- Muffin Man
- Posts: 1544
- Joined: Tue Jan 27, 2004 12:33 am
- Location: cali, United States





