Interpolate bug .. or expected behaviour?

SparkyidrSparkyidr Member Posts: 2,033
edited November -1 in Working with GS (Mac)
Got a little issue with using interpolate to move an actor.

I have an interpolate to set an objects Y value to 50, ease out
and it works fine.

I then have a rule that says when a certain attribute is set to "leave", it then interpolates the Y value to 345 ease in

(it's a rocket that lands, and then takes off...looks really nice)

if I wait until the actor's Y is 50, and then set the attribute to leave, it works fine.

If I set the attribute to leave before the Y gets to 50 (I.E. before it has landed), it interpolates up to 345, but once there, it immediately flicks to Y=50 and stays there.

I'm assuming the first interpolate is still taking precedent over the 2nd? Or am I just being a bit silly, and have missed something obvious?

Sparks.

Comments

  • SparkyidrSparkyidr Member Posts: 2,033
    hmmmmm... so I removed the rule. And recreated it exactly as it was (no changes at all)
    and it's just worked fine 2 times in a row.

    I then quit the preview and started again.....and first time round, it didn't work again

    Seems inconsistent.
  • VoidedSkyVoidedSky Member Posts: 1,095
    I have had some problems with interpolate also. This is what I have learned: The only to stop an interpolate, is to have another interpolate acting on the same attribute that lasts LONGER than the first.

    EX)

    `
    when key "L" is down
    interpolate game.number to 50
    for 5 seconds

    when key "K" is down
    interpolate game.number to 10
    for 2 seconds
    `
    if the second interpolate gets done with its funtction BEFORE the first one, then the first one will continue its interpolate.

    So here is what it would look like:

    Sec 1: L is pressed; interpolating to 50
    Sec 2: K is pressed; interpolating to 10
    Sec 3: Interpolating to 10
    Sec 4: Interpolating to 10 is done, now interpolating to 50
    Sec 5: interpolating to 50 is done.

    I hope I helped a little.
    ~CTM
  • SparkyidrSparkyidr Member Posts: 2,033
    yeah. deffo is a timing issue.

    My interpolate "down" from 345 to 50 is set to 7 seconds
    and my interpolate "up" back up to 345 was set to 1 second

    When I have them both set to 7 seconds, it all works as expected.

    Thanks for the info CTM, I will see if I can fudge some timing logic into what I am trying to do. :o/
  • SparkyidrSparkyidr Member Posts: 2,033
    made myself a little workaround.

    When the y>343 I am contraining it to 345
    This stops the initial interpolate from er...interpolating :o)

    Seems to work ok, but probably needs a bit more testing
  • VoidedSkyVoidedSky Member Posts: 1,095
    Great! you also could use one of the Move behaviors.
    ~CTM
  • SparkyidrSparkyidr Member Posts: 2,033
    yeah, I initially substituted the 2nd interpolate for a move to.
    but
    1. It didn't look quite so "cool"
    2. There seems to still be the bug that when the speed is set to more than 300, it sometimes doesn't stop ;o)
Sign In or Register to comment.