How can I make an actor "chase" another actor?

NederBrosNederBros Member Posts: 13
edited November -1 in Working with GS (Mac)
I'm making a game with enemy actors that would chase the player. How can I make them follow the actor around the scene?

Comments

  • AfterBurnettAfterBurnett Member Posts: 3,474
    Click on "support" at the top of the page. Seek and you shall find ;)
  • ORBZORBZ Member Posts: 1,304
    Move behavior
  • hrsmediahrsmedia Member Posts: 522
    I am trying this method from the wiki:

    Chasing the actor (version 2)

    Timer: Every .01 sec
    Change Attribute: self.PositionX = self.PositionX + (game.TargetX-self.Position.X)/4
    Change Attribute: self.PositionY = self.PositionY + (game.TargetY-self.Position.Y)/4

    The actor follows ok, but it is VERY jittery/jerky. Anyone tried this?
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    I haven't tried it nor the following, but it might work possibly: maybe try Constrain Attribute instead of Change and the Timer?

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • ForteForte Member, PRO Posts: 297
    @POLYGAMe "Click on "support" at the top of the page. Seek and you shall find ;)"

    Copyright infringement POLYGAMe!

    Im pretty sure that motto is copyright be Seek.com!

    lol jokes.
Sign In or Register to comment.