- Messages
- 473
- Country
Hi!
I would like to create a relatively complex runway lighting. I'm doing it according this wiki article : http://www.fsdeveloper.com/wiki/index.php?title=Pilot_Activated_Lighting
I would like to "switch on" my lights by different triggers. First trigger is the daytime, than if a some freq-s are tuned (ILS, VOR on NAV1 or NAV2), maybe wind direction and velocity because I want to switch the lights according the active runway.
Normaly this all possible but my problem is we talk about approx. 2000 light sources (2 runways) and lot of them I should repeat due to the different triggers.
I have one idea in my mind. I create a local variable which I would write with the SETWRD command. I would set e.g.:
00 - no lights needed
31 - 31 runway direction
13 - 13 runway direction
I've tried to create a local variable but I can not make it work. COuld you please help? This is what I done so far:
----------START - vertex things ------------------
DRAW_TRI 7, 18, 13 ; poly=291 part=1
DRAW_TRI 0, 3, 9 ; poly=292 part=1
DRAW_TRI 9, 6, 0 ; poly=293 part=1
DRAW_TRI_END
BGL_RETURN
bplights_MasterScale_2 label BGLCODE
lightswitch label word
dw 0
dw 0
dw 0
LOCAL_BASE_32 lightswitch
IFIN1 nolights, 028ch, 2, 4 ; time of day is not daytime
SETWRD lightswitch, 1
nolights label BGLCODE
; Küszöb fények zöld része 31L ---------------------------------------------------------------------------------------------------------------------
SEPARATION_PLANE WrongWay, 24351, 0, -21926, -1953136
IFIN1 RWYlight1, 033bh, 1000, 2000
BGL_LIGHT LIGHT_NAV, -59.605, 0.100, -26.090, 20, 0.60, 0.40, 0ff004c0dh, 0.000000, 0.000000, 1.000000 ; source poly num = 3
BGL_LIGHT LIGHT_NAV, -59.605, 0.100, -20.290, 20, 0.60, 0.40, 0ff004c0dh, 0.000000, 0.000000, 1.000000 ; source poly num = 5
---------- END ------------------------------------------
Thank you!
I would like to create a relatively complex runway lighting. I'm doing it according this wiki article : http://www.fsdeveloper.com/wiki/index.php?title=Pilot_Activated_Lighting
I would like to "switch on" my lights by different triggers. First trigger is the daytime, than if a some freq-s are tuned (ILS, VOR on NAV1 or NAV2), maybe wind direction and velocity because I want to switch the lights according the active runway.
Normaly this all possible but my problem is we talk about approx. 2000 light sources (2 runways) and lot of them I should repeat due to the different triggers.
I have one idea in my mind. I create a local variable which I would write with the SETWRD command. I would set e.g.:
00 - no lights needed
31 - 31 runway direction
13 - 13 runway direction
I've tried to create a local variable but I can not make it work. COuld you please help? This is what I done so far:
----------START - vertex things ------------------
DRAW_TRI 7, 18, 13 ; poly=291 part=1
DRAW_TRI 0, 3, 9 ; poly=292 part=1
DRAW_TRI 9, 6, 0 ; poly=293 part=1
DRAW_TRI_END
BGL_RETURN
bplights_MasterScale_2 label BGLCODE
lightswitch label word
dw 0
dw 0
dw 0
LOCAL_BASE_32 lightswitch
IFIN1 nolights, 028ch, 2, 4 ; time of day is not daytime
SETWRD lightswitch, 1
nolights label BGLCODE
; Küszöb fények zöld része 31L ---------------------------------------------------------------------------------------------------------------------
SEPARATION_PLANE WrongWay, 24351, 0, -21926, -1953136
IFIN1 RWYlight1, 033bh, 1000, 2000
BGL_LIGHT LIGHT_NAV, -59.605, 0.100, -26.090, 20, 0.60, 0.40, 0ff004c0dh, 0.000000, 0.000000, 1.000000 ; source poly num = 3
BGL_LIGHT LIGHT_NAV, -59.605, 0.100, -20.290, 20, 0.60, 0.40, 0ff004c0dh, 0.000000, 0.000000, 1.000000 ; source poly num = 5
---------- END ------------------------------------------
Thank you!