GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Stopping interpolatiom

digitalzerodigitalzero Posts: 639Member, BASIC

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.Posts: 12,822Member
    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 Posts: 639Member, BASIC

    @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 Posts: 639Member, BASIC

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

  • UncloudedStudioUncloudedStudio NetherlandsPosts: 285Member

    Maybe this can help you

  • digitalzerodigitalzero Posts: 639Member, BASIC

    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 Posts: 639Member, BASIC

    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.Posts: 12,822Member

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

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

  • digitalzerodigitalzero Posts: 639Member, BASIC

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

  • SocksSocks London, UK.Posts: 12,822Member
    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 Posts: 639Member, BASIC

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

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

    Why not use a moveto behavior instead of interpolate?

  • digitalzerodigitalzero Posts: 639Member, BASIC

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

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

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

    'It' = mysterious.

  • digitalzerodigitalzero Posts: 639Member, BASIC

    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.