Not a member yet? Why not Sign up today
Create an account  

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Propulsion Script works on one vehicle but not another

Hi, I have the following LUA script in two vehicles.

prevPitch = 0
function Update(I)
 currPitch = I:GetConstructPitch()

 pitchAcc = currPitch - prevPitch

 if pitchAcc<0 then
  I:Log('Thrusters On')
  I:Log('Thrusters Off')
 prevPitch = currPitch

The point of this script is to make the upwards facing thrusters come on before the vehicle's pitch becomes positive. It works the way it's supposed to in the first vehicle, but on the second one, none of the propellers ever turn on, even though all upwards propellers on both vehicles are set to "thruster (reverse)".

Rocket Speed is the first vehicle; the Filthy Switt is the second.

Attached Files
.blueprint   Rocket Speed.blueprint (Size: 49.07 KB / Downloads: 25)
.blueprint   Filthy Switt.blueprint (Size: 447.19 KB / Downloads: 25)

Messages In This Thread
Propulsion Script works on one vehicle but not another - by SweetJerryPie - 2019-01-26, 03:24 AM

Forum Jump:

Users browsing this thread:
1 Guest(s)