+ Reply to Thread
Results 1 to 4 of 4

Thread: Expression Chip Help

  1. #1
    Wire Amateur brandeno01's Avatar
    Join Date
    Jun 2007
    Posts
    40

    Default

    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

  2. #2
    Super Moderator Erkle's Avatar
    Join Date
    Feb 2007
    Location
    New Zealand
    Posts
    402

    Default

    What is supposed to do and what does it do?
    If in doubt, stick your finger in it.

  3. #3
    Expressionism 2.0 Syranide's Avatar
    Join Date
    Mar 2007
    Location
    Sweden
    Posts
    4,573

    Default

    Precisely...

    Code:
    If Ax == 0 -> X += 0;
    If Mx == 0 -> X -= 0;
    If Ay == 0 -> Y += 0;
    If My == 0 -> Y -= 0;
    What is the point of that?

    Code:
    Tx2 = X * -1
    Same as Tx2 = -X

    Code:
    If Yaw < 45 & Yaw > -45 -> Direction = 1;
    If Yaw < 135 & Yaw > 45 -> Direction = 2;
    If Yaw < -135 & Yaw > -180 -> Part1 = 1;
    Contradictions, can never happen, use or (|).

    Also you&#39;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.

  4. #4
    Wire Amateur brandeno01's Avatar
    Join Date
    Jun 2007
    Posts
    40

    Default

    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?

+ Reply to Thread

Similar Threads

  1. Expression Chip 2 and Cpu Chip aint working
    By bradmcco in forum Installation and Malfunctions Support
    Replies: 1
    Last Post: 01-19-2009, 07:53 AM
  2. Expression Chip 2 help.
    By Teh1337bix in forum Installation and Malfunctions Support
    Replies: 4
    Last Post: 12-03-2008, 10:02 PM
  3. Expression Chip
    By Pantz Master in forum Installation and Malfunctions Support
    Replies: 3
    Last Post: 09-10-2008, 05:31 PM
  4. [Help] Expression Chip
    By Vorsai in forum Installation and Malfunctions Support
    Replies: 18
    Last Post: 08-27-2007, 01:49 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
proceed-collector
proceed-collector
proceed-collector
proceed-collector
linguistic-parrots
linguistic-parrots
linguistic-parrots
linguistic-parrots