LUA Script based vessel: Thruster not working

astrosammy

Dash!
Addon Developer
Donator
Joined
Apr 27, 2008
Messages
2,124
Reaction score
0
Points
36
Location
ICAO ID: EDFB
Ok, I've been trying to get this running for a hour, but somehow the Probe doesn't want me to get it working.

I've created a thruster and added it to the main group. As you can see, a fueltank is also created.
But when I try to ignite it, nothing is happening.

I checked the number of thrusters in the main group inside orbiter, and it was 1. Then I checked the thrust of this thruster, and it was correct.
Looking at the example "ScriptPB.cfg", it looks like everything is right.

Code:
function clbk_setclasscaps(cfg)
    ...
    
    Prop1 = vi:create_propellantresource(1258.7)
    
    engparam = {pos={x=0,y=0,z=0}, dir={x=0,y=1,z=0}, maxth0=8450, isp0=2658.51, ispr=1471.5}
    eng1 = vi:create_thruster(engparam) 
    maineng=vi:create_thrustergroup({eng1},THGROUP.MAIN)
    
    ...
end


---------- Post added at 22:04 ---------- Previous post was at 21:57 ----------

And 4 minutes later it works!

I added "engparam.hprop = Prop1"

But the orbiter script manual says that a thruster will take fuel from any resource if hprop is not set... strange...
 

martins

Orbiter Founder
Orbiter Founder
Joined
Mar 31, 2008
Messages
2,448
Reaction score
462
Points
83
Website
orbit.medphys.ucl.ac.uk
But the orbiter script manual says that a thruster will take fuel from any resource if hprop is not set... strange...

Where did you read that? Mine says
If no propellant resource handle is provided, the thruster is not connected to a propellant resource and cannot be activated until connected.
 
Top