Jump to content
Sign in to follow this  
arno

One-way lights

Recommended Posts

If you add a check to the source code, that checks where you are relative to the light you can draw it from only one side.I don't know how you have created the lights (which program?), I could give you an example in SCASM or BGLC if you need.Arno


Member Netherlands 2000 Scenery Team[a href=http://home.wanadoo.nl/arno.gerretsen]http://home.wanadoo.nl/arno.gerretsen/banner.jpg[/a]

Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Share this post


Link to post
Share on other sites

For SCASM you should use the VectorJump command. The command has the following parameters:

VectorJump( label x y z len )

The x y and z determine the direction of the vector (sum of them must be 1). With the len you can also give a length to the vector. If you for example want to check if you are on the positive x side you can use VectorJump( label 1 0 0 32767 ). If the condition is true the code following the command is executed, otherwise a jump to label is made. So if you put the label after the lights and the lights after the command you can get them working from one side.I hope this makes it (a bit) clear, if not don't hesitate to ask again :).Arno


Member Netherlands 2000 Scenery Team[a href=http://home.wanadoo.nl/arno.gerretsen]http://home.wanadoo.nl/arno.gerretsen/banner.jpg[/a]

Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Share this post


Link to post
Share on other sites
Guest

Hello,The only way to produce one side visible light or dot is like this:Light( p 6 -10.0 6.0 0.0 80 0.1 0.4 0xFF0000 0 0 ) ; Normal light (strobe)Change the second argument 6 to 11Light( p 11 -10.0 6.0 0.0 80 0.1 0.4 0xFF0000 0 0 ) ; directionalYou will be able to see this dot ONLY when you are really in front of it.Cheers,Rafael Sanchez

Share this post


Link to post
Share on other sites

Hi Rafael,Thanks for the code, I hadn't used this (relatively new) command before.It's true that this code should work better, as my code shows the light when you are at the side you want to check for, but it still shines in any direction. While this code shows it only in the correct direction.But when I check the SCASM docs, they say "currently not used by FS". Is this still information for Fs2000 and does Fs2002 support it?Arno


Member Netherlands 2000 Scenery Team[a href=http://home.wanadoo.nl/arno.gerretsen]http://home.wanadoo.nl/arno.gerretsen/banner.jpg[/a]

Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Share this post


Link to post
Share on other sites
Guest

Hi Arno,>It's true that this code should work better, as my code >shows the light when you are at the side you want to check >for, but it still shines in any direction. While this code >shows it only in the correct direction. I think it also works with an argument value =12 but I don't remember if there is a difference.>But when I check the SCASM docs, they say "currently not >used by FS". Is this still information for Fs2000 and does >Fs2002 support it? In the actual Scasm docs Manfred says :>>> 11 draw landing light cone only>>> 12 draw taxi light cone onlybut this is not true as you will see, as there is not cone at allCheers,Rafael[a href=http://www.fsnova.com/]http://www.fsnova.com/images/NsAnimation1.gif[/a]

Share this post


Link to post
Share on other sites
Guest

How about example in BGLC of directional nav_light ?Thanks Ted

Share this post


Link to post
Share on other sites
Guest

Arno, Can I ask you again to give an example of directional nav_light in BGLC? It would be very handy for approach lights. Ted

Share this post


Link to post
Share on other sites

Hi Ted,I don't have an example right away (never tried it yet), but I'll try to make one in a while.Arno


Member Netherlands 2000 Scenery Team[a href=http://home.wanadoo.nl/arno.gerretsen]http://home.wanadoo.nl/arno.gerretsen/banner.jpg[/a]

Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Share this post


Link to post
Share on other sites
Guest

How about me mailing to you nicely done gMax model of approach light, with which perhaps you could do your code magic. Thanks in advance. Ted

Share this post


Link to post
Share on other sites

Sounds like a good idea :), you can mail me at arno@nl-2000.com.Arno


Member Netherlands 2000 Scenery Team[a href=http://home.wanadoo.nl/arno.gerretsen]http://home.wanadoo.nl/arno.gerretsen/banner.jpg[/a]

Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...