Automated Life boat Launcher | code in description

1 year ago

function onTick()
Start_Launch = input.getBool(1)
Is_Boat_Connected_to_Ramp = input.getBool(2)
Ramp_Ang_Pist_Pos = input.getNumber(1)
Dist_sen_1 = input.getNumber(2)
Dist_sen_2 = input.getNumber(3)

if Start_Launch==true and Ramp_Ang_Pist_Pos_0.4 then Discon_Ramp = true end

if Start_Launch==true and Is_Boat_Connected_to_Ramp==true then Ramp_Lift=1 end
if Start_Launch==true and Dist_sen_1==500 and Dist_sen_2==500 then Ramp_Lift=0 end
if Start_Launch==false then Ramp_Lift=0 end

if Start_Launch==true and Dist_sen_1==500 and Dist_sen_2==500 and Ramp_Ang_Pist_Pos_=0 then Discon_Stored = true Discon_Ramp = false end

output.setBool(1, Discon_Ramp)
output.setBool(2, Discon_Stored)
output.setNumber(1, Ramp_Lift)
end

Loading comments...