Help with actor growth

steeler0038steeler0038 Member Posts: 153
edited November -1 in Working with GS (Mac)
I want this actor to change it's width size. But when i create a rule to change it's size, the actor will grow on both sides. I only want the actor to grow going to the right. Is there anyway I can do this?

Comments

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    hi, put it's new x coordinate to it's old x + half of the extra new width wanted.
  • steeler0038steeler0038 Member Posts: 153
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Hi steeler0038, whoops, I've just deleted my post as that's not quite correct: I'll have to check it out again; I'll be two ticks...
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    OK, back! Here it is:

    Decide on your new/final width.
    Minus from that the starting width of the actor.
    Divide this number by 2.
    With this number, add it to the starting X position of your actor.
    This final number will be used for the interpolating of the new X position.

    Example: Actor is 100 wide. You want to make it grow to 300 pixels.
    So 300 - 100 = 200
    Divide by 2 = 100
    Say your starting X pos is 187. So add 187 to the 100 = 287.
    So:

    Interpolate Attribute: self.Size. Width To 300
    Interpolate Attribute: self.Position.X To 287.

    :-)
  • steeler0038steeler0038 Member Posts: 153
    thanks gyro!!!! :)
Sign In or Register to comment.