GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Zig-Zag Movement?

FrazzleFrazzle Posts: 223Member
edited November -1 in Working with GS (Mac)
Can anyone tell me how to create zig zag movement?

Comments

  • synthesissynthesis Posts: 1,693Member
    Use rules....
    Place a rule switch inside...
    When self.position.X > 300 (or whatever your right screen tolerance is)
    self.moveRight = FALSE
    self.moveLeft = TRUE

    When self.position.X < 20 (or whatever)
    self.moveLeft = FALSE
    self.moveRight = TRUE

    Then....

    When self.moveLeft = TRUE
    [ move left rules ]

    When self.moveRight = TRUE
    [ move right rules ]

    Just 1 of many ways to do it.
This discussion has been closed.