how to make one actor sit directly on top of another and move with it?

slevslev Member Posts: 99
edited November -1 in Working with GS (Mac)
how would you do this so that getting hit in the legs would register differntly from the getting hit in the chest

Comments

  • SlickZeroSlickZero Houston, TexasMember, Sous Chef Posts: 2,870
    You need to use constrain attribute on the chest actor to the leg actors X and Y position, and have an offset for the Y position so the chest actor sits above the leg actor.
  • iTouchGameriTouchGamer Member Posts: 681
    How do we add an offset?
  • SlickZeroSlickZero Houston, TexasMember, Sous Chef Posts: 2,870
    At the end of the string in the expression editor, when you set the constraint to the Y position, just add +50 or whatever number works to get it in the right position.

    +(value) makes it go up, and -(value) makes it go down.
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    youll need 2 make 2 real attributes callthem playerx and playery and in the actor constrain playerx to self position x and constain player y to self position y

    then in the pieces for the leg constrain self position x to player x +30 (you can change the + to a - and change the number to whatever you need, the +30 is the offset)

    then do the same for the y adding the offset however you need
  • iTouchGameriTouchGamer Member Posts: 681
    Thanks!
Sign In or Register to comment.