toggle menu
Categories
Discussions
Dashboard
Sign In
·
Register
Sign In
·
Register
Categories
Discussions
Dashboard
Sign In
·
Register
×
Home
›
GameSalad 101
›
Working with GS (Mac)
Zig-Zag Movement?
Frazzle
Member
Posts:
223
July 2010
edited November -1
in
Working with GS (Mac)
Can anyone tell me how to create zig zag movement?
Comments
synthesis
Member
Posts:
1,693
July 2010
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.
Sign In
or
Register
to comment.
Comments
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.