how can i keep "move to" from freezing once it touches a destination?

part12studiospart12studios Member Posts: 620
edited August 2012 in Working with GS (Mac)
Hi there,

This is probably an easy one but i can't figure out how come the move to behavior has to stop once it reaches its destination.. and more importantly, whats the best way to get this to not happen.. so if the move to does come to a stop.. moving away will resume it tracking its target

Thanks!
Caleb

Best Answer

  • FViMaginationFViMagination Posts: 89
    Accepted Answer
    If I understood well your question, I think you should tell your Actor to move again somewhere after it reaches its destination by adding an Interpolate (I suggest to use that behavior instead of the MoveTo one) that will move your Actor to the desired destination. If you don't need your Actor to move somewhere with a animation, you may also use 2 ChangeAttribute behaviors, setting one with X Pos. and the other with Y Pos.
    Hope it helps :)

Answers

  • part12studiospart12studios Member Posts: 620
    @FrancyFranchini thanks for the feedback. I tried similar methods as you suggested and it does work, but seems really choppy. probably because of the time thing in interpolate. still its a good approach for certain things i can see so you taught me something valuable for sure!

    However I did manage to figure out the trick. It actually super simple after getting some help from a friend. here is what you do:

    you have two actors.. friend and enemy.. make a rule for the enemy to "actor receives event: overlaps or collides: friend.. now here's the awesome part. you leave the actual condition blank.. and in the "otherwise" section, the move to behavior.. you need to unlock the enemy in order to get the coordinates of the friend actor.

    works like a charm.

    Thanks!
    Caleb
Sign In or Register to comment.