Stopping interpolatiom

digitalzerodigitalzero Member, BASIC Posts: 639

Hey all! So i have an actor that is working as an elevator and maybe i have the wrong behavior placed but this is what i got

A boolean labeled activate...

If activated is true interpolate self position y to self finish y ( real attribute) otherwise if activated is false change attribute self position y to self.start y and of course if it collides with player activate is true otherwise its false

Comments

  • SocksSocks London, UK.Member Posts: 12,822
    edited June 2016

    You will get strange results trying to set a changing value for an Interpolate's target value.

    Try this:

    Loop:
    While activate is true:
    --Rule:
    --When self Y is < 600
    ----Change self Y to self Y +5

    Loop:
    While activate is false:
    --Rule:
    --When self Y is > 100
    ----Change self Y to self Y -5

  • digitalzerodigitalzero Member, BASIC Posts: 639

    @Socks is there a loop tutorial i can go to... Heck i think there should be a thread that complies and explains every behavior and whatnot

  • digitalzerodigitalzero Member, BASIC Posts: 639

    But now that I'm trying to decipher that I'm kinda confused lol

  • UncloudedStudioUncloudedStudio NetherlandsMember Posts: 285

    Maybe this can help you

  • digitalzerodigitalzero Member, BASIC Posts: 639

    The 600 and the 100 figures are from what cause I'm confused lol so the start y is 68 and end y is 369

  • digitalzerodigitalzero Member, BASIC Posts: 639

    Thanks @UncloudedStudio. I already have a moving platform but since my actor is one that moves back to its original positron if the hero jumps it won't work

  • SocksSocks London, UK.Member Posts: 12,822

    @digitalzero said:
    The 600 and the 100 figures are from what . . . .

    What values did you supply in your original post ? :)

  • digitalzerodigitalzero Member, BASIC Posts: 639

    @Socks i didn't see any values... Wait am i missing something... Sometimes I'm slow lol

  • SocksSocks London, UK.Member Posts: 12,822
    edited June 2016

    @digitalzero said:
    @Socks i didn't see any values...

    Exactly ! :smile: There are no values in your original post, therefore by logical extension the values I used are (must be) arbitrary, use whatever values are appropriate for your actor.

  • digitalzerodigitalzero Member, BASIC Posts: 639

    Oh @Socks. You get me every time hahaha!!!! Thank you so much I'll try to figure it out:)

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,879

    Why not use a moveto behavior instead of interpolate?

  • digitalzerodigitalzero Member, BASIC Posts: 639

    for some reason it isnt working... its kinda weird

  • SocksSocks London, UK.Member Posts: 12,822

    @digitalzero said:
    for some reason it isnt working... its kinda weird

    'It' = mysterious.

  • digitalzerodigitalzero Member, BASIC Posts: 639

    sorry i gotta realize i gotta put on my big girl panties and be more specific lol "it" could mean anything lol... but i actually got it! i combined jaimes magnitude tutorial with what you suggested socks! instead of having the player overlap with it

Sign In or Register to comment.