How to make an actor follow another actor to only one direction?

Let say I trow an actor#1 up and I want a couple of actors to follow it while it is going up but to stop following it and stay in place as soon as actor#1 will start to go down. Also taking in consideration that actor#1 can go up at different speeds.

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited February 2014
    Actor #1
    When [actor is already moving up... maybe you have a Touch is Pressed or a time delay or some other condition for when this happens]
         When self.motion.linear velocity.Y ≤ 0
              Change attribute game.MovingDown [boolean] to true

    Following actors
    When attribute game.MovingDown is false
         [follow actor #1]
    Otherwise
         Change Velocity to 0 [or spawn a copy that doesn't move and then destroy the actor]
  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    edited February 2014
    ...Beat me to it, @tatiang. ;)
  • LordTarantorLordTarantor Member, PRO Posts: 890
    thanks a lot guys!!!
    I'll get right to it.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited February 2014
    ...Beat me to it, @tatiang. ;)
    @Braydon_SFX I'm surprised with that cape and all. B-)
Sign In or Register to comment.