4throck
Enthusiast !
- Joined
- Jun 19, 2008
- Messages
- 3,502
- Reaction score
- 1,008
- Points
- 153
- Location
- Lisbon
- Website
- orbiterspaceport.blogspot.com
Hi all,
I'm improving my Agena MFD with some systems simulation.
LUA comes with orbiter and it's a relatively fast way to do this sort of thing.
It's going very well but I'm having difficulty in setting up beacon lights.
To get point lights I'm doing:
vagena = oapi.get_objhandle('GATV')
name = oapi.get_objname(vagena)
v2 = vessel.get_interface(name)
le = v2:add_pointlight({x=0.0,y=0.4391,z=4},{range=2,att0=1,att1=1,att2=1},{r=.8,g=1,b=1})
le:activate(true)
That's simple enough and works perfectly.
For beacons I've tried (based on several examples):
le_aq_strong = v2:AddBeacon ({{shape = BEACONSHAPE_COMPACT}, {pos={-0.4357,0.0677,-3.5832}}, {col={1,1,1}}, {size=0.7}, {falloff=0.6}, {period=13}, {duration=7}, {tofs=2}, {active=true}})
(Of course, I tried some variations of that). No luck, I get a CTD.
Any clues on how to setup beacons in LUA?
Orbiter SKD mentions that I should pass a variable, but it looks more like a dictionary with keys
I'm improving my Agena MFD with some systems simulation.
LUA comes with orbiter and it's a relatively fast way to do this sort of thing.
It's going very well but I'm having difficulty in setting up beacon lights.
To get point lights I'm doing:
vagena = oapi.get_objhandle('GATV')
name = oapi.get_objname(vagena)
v2 = vessel.get_interface(name)
le = v2:add_pointlight({x=0.0,y=0.4391,z=4},{range=2,att0=1,att1=1,att2=1},{r=.8,g=1,b=1})
le:activate(true)
That's simple enough and works perfectly.
For beacons I've tried (based on several examples):
le_aq_strong = v2:AddBeacon ({{shape = BEACONSHAPE_COMPACT}, {pos={-0.4357,0.0677,-3.5832}}, {col={1,1,1}}, {size=0.7}, {falloff=0.6}, {period=13}, {duration=7}, {tofs=2}, {active=true}})
(Of course, I tried some variations of that). No luck, I get a CTD.
Any clues on how to setup beacons in LUA?
Orbiter SKD mentions that I should pass a variable, but it looks more like a dictionary with keys