What is supposed to do and what does it do?
I Need Help With this Expression It Looks Right To Me But I Gess It Does Not Work And Don't make Fun Of Me For How Simple It Is..
Code:N@IT I@Gpsx Gpsy Gpsz Yaw Ax Mx Ay My Az Mz O@Tx1 Tx2 Ty1 Ty2 X1 Y1 Z1 Direction If Ax == 1 & Direction == 1 -> Y2 -= 200; If Mx == 1 & Direction == 1 -> Y2 += 200; If Ay == 1 & Direction == 1 -> X2 -= 200; If My == 1 & Direction == 1 -> X2 += 200; X3 = Gpsx - X1 Y3 = Gpsy - Y1 X = sgn(X3) Y = sgn(Y3) Tx1 = X Tx2 = X * -1 Ty1 = Y Ty2 = Y * -1 If Az == 1 -> Z += 200; If Mz == 1 -> Z -= 200; If Yaw < 45 & Yaw > -45 -> Direction = 1; If Yaw < 135 & Yaw > 45 -> Direction = 2; If Yaw < -135 & Yaw > -180 -> Part1 = 1; If Yaw > 135 & Yaw < 180 -> Part2 = 1; If Part1 = 1 Or Part2 = 1 -> Direction = 3; If Yaw < -45 & Yaw > -135 -> Direction = 4; If Ax == 1 & Direction == 3 -> Y2 += 200; If Mx == 1 & Direction == 3 -> Y2 -= 200; If Ay == 1 & Direction == 3 -> X2 += 200; If My == 1 & Direction == 3 -> X2 -= 200; If Ax == 1 & Direction == 2 -> X2 -= 200; If Mx == 1 & Direction == 2 -> X2 += 200; If Ay == 1 & Direction == 2 -> Y2 -= 200; If My == 1 & Direction == 2 -> Y2 += 200; If Ax == 1 & Direction == 3 -> X2 += 200; If Mx == 1 & Direction == 3 -> X2 -= 200; If Ay == 1 & Direction == 3 -> Y2 += 200; If My == 1 & Direction == 3 -> Y2 -= 200; Z1 = sgn(Z2) Z2 = Gpsz - Z If Ax == 0 -> X += 0; If Mx == 0 -> X -= 0; If Ay == 0 -> Y += 0; If My == 0 -> Y -= 0; Y2 = Y3 X2 = X3
What is supposed to do and what does it do?
If in doubt, stick your finger in it.
Precisely...
What is the point of that?Code:If Ax == 0 -> X += 0; If Mx == 0 -> X -= 0; If Ay == 0 -> Y += 0; If My == 0 -> Y -= 0;
Same as Tx2 = -XCode:Tx2 = X * -1
Contradictions, can never happen, use or (|).Code:If Yaw < 45 & Yaw > -45 -> Direction = 1; If Yaw < 135 & Yaw > 45 -> Direction = 2; If Yaw < -135 & Yaw > -180 -> Part1 = 1;
Also you'll probably have massive problems because the script is getting run far too often, everytime any of the input changes your script is run... hence it might probably go alot faster than you want.
And there is no need to add "If" either, it does exactly nothing.
It is for a hot air ballon
and when you press the inputs it adds 200 or subtracts 200 from X and Or Y depending on your Direction
This Script worked before i added in the directions But Some how it broke..
Is There Any way you can help me fix it or make it simpler?
Bookmarks