- Joined
- Feb 4, 2008
- Messages
- 9,753
- Reaction score
- 1,024
- Points
- 203
I thought I would start this thread to document and provide a central thread for discussing problems with creating vessels using Lua.
Right now my main problem is with an attachment point. It consistently makes the scenario that uses this vessel CTD whenever it is attached to a parent.
Here's the script file as it is right:
Right now my main problem is with an attachment point. It consistently makes the scenario that uses this vessel CTD whenever it is attached to a parent.
Here's the script file as it is right:
Code:
--[[
: This LuaScript vessel is used in the interim to simulate the 6 floodlights in the payload bay
: The lights are named after their positions in the bay
ClassName = SSU_PLB_floodlights
Module = ScriptVessel
Script = SSU_PLB_floodlights.cfg
END_PARSE
--]]
-- Basic Lua script section
function clbk_setclasscaps(cfg)
vi:set_size(22.0)
vi:set_emptymass(0.0001)--Dry empty mass
vi:set_pmi({x=0.0001,y=0.0001,z=0.0001})
vi:set_crosssections({x=0.0001,y=0.0001,z=0.0001})
vi:add_mesh('Carina')
hattach1 = vi:create_attachment({true,{x=0.0,y=0.125,z=3.15},{x=0,y=0,z=1},{x=0,y=1,z=0},{'XS'})
le = v:add_spotlight({x=10,y=1,z=0},{x=0,y=0,z=1},{range=200,att0=1e-3,
att1=0,att2=2e-3,umbra=0.3,penumbra=0.5},{r=1,g=0.8,b=0.7})
end