Actor moving back and forth

mkfostermkfoster Member Posts: 27
edited November -1 in Working with GS (Mac)
I'm trying to have an actor move back and forth (left, right) automatically acting as a "barrier" I'd like to have it only move a short distance then once destination is reached move back to it's original position. Any Ideas? Thanks. :)

Comments

  • olster1olster1 Member Posts: 396
    From Tshirt booth:

    OK guys there is a very simple way to do this.

    Find the X location of BOTH spots you want it to pace back and forth from
    so say its X120 and x250

    Do this place it on the x120 spot
    and then do this

    change velocity 0 speed 100

    Rule
    If attribute self.position.x is greater then 250
    change velocity 270 speed -100

    Rule
    If attribute self.position.x is less then 100
    change velocity 0 speed 100

    This way you do not need any bumpers

    hope that helps.

    cheers
  • mkfostermkfoster Member Posts: 27
    What?! due, that rocks. Thanks olster1 :)
  • olster1olster1 Member Posts: 396
    It's tshirtbooth you should be thanking... but no problem ;) I'm starting to keep the URL links of all the problems and solutions in a document, so when I'm stuck I can just have a quick gander. Once it's large enough I'll pos it with them all.
  • olster1olster1 Member Posts: 396
    sent.
Sign In or Register to comment.