Actor attach to 2nd actor issue

kajutokajuto Member Posts: 314
edited March 2012 in Miscellaneous
Hi there.! Recently I made a actor that can jump and 2nd actor as a horse for example and can I jump over the horse actor it attach to him and move together ? I'm dunno and stuck there...

Answers

  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    Attaching is easy, just constrain the 2nd actors position to the main actors position after you trigger the attaching.
  • kajutokajuto Member Posts: 314
    I though about that but, if a want the actor attach the horse actor and stay on top of it how can I do that ? Just like a man on top of a horse

    Can you show me the code for the earlier question please
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    Just constrain the man to the horses y position + half the man's height or so.

    Create 2 game attributes (integer) - game.horseY or something and game.horseX

    In the forse constrain game.horseY to self.positionY and game.horseX to self.positionX
    Then in the man constrain self.positionY to game.horseY + (self. height/2)
    and constrain self.position X to game.horseX
  • kajutokajuto Member Posts: 314
    Scitunes thanks advance.! How can I constrain the man to the horse in Y and X position as u said before...?
Sign In or Register to comment.