Make Box follow Character

BreezeonholdBreezeonhold Member Posts: 187
edited November -1 in Working with GS (Mac)
I want a box to follow my character where ever the character goes... How can I do this? It needs to stay right in the center of the character no matter where the character runs.

All help would be greatly appreciated.

Thanks

Comments

  • reddotincreddotinc Member Posts: 653
    Simply constrain the x and y of the character to two attributes, then constrain the x and y of the box to those two attributes :)

    // Red Dot Inc
  • VoidedSkyVoidedSky Member Posts: 1,095
    Global Atts: game.CharacterPosX game.CharacterPosY

    Character:
    ---Constrain game.CharacterPosX to self.positionX
    ---Constrain game.CharacterPosY to self.positionY

    Box
    ---Constrain self.positionX to CharacterPosX
    ---Constrain self.positionY to CharacterPosY

    That should do it, Hope it helps!
  • BreezeonholdBreezeonhold Member Posts: 187
    Wow it worked haha, Thanks to the both of you.

    Reddotinc, and CowTechMan you get the helpful trophy award. Congratulations lol This is why I love the gamesalad forums. People help so much.

    Thanks again! It was so simple.
  • VoidedSkyVoidedSky Member Posts: 1,095
    Your Welcome!
Sign In or Register to comment.