jdvergarad's Recent Forum Activity

  • Ah ok. One of the many ways.

    https://www.dropbox.com/s/yx2fmprpiqdqy ... .capx?dl=0

    Using the MoveTo plugin, behavior-moveto_t63156

    I was a bit done with all the lerping 2day.

    As you see. You can not lock the interactivity of the player up in a loop. And you can not lock this moving (that takes time) up in a loop. A loop happens in the same tick. This movement happens over several ticks.

    Normally i wouldo this with instances of the same sprite for the player, but i feel that you learn more of it (for now) if i use two different sprites.

    Have fun coding.

    thank you

    I am going to try

    I'm new with this so, I'm doing my best <img src="{SMILIES_PATH}/icon_rolleyes.gif" alt=":roll:" title="Rolling Eyes" />

  • Why would you do this in a loop ?

    Are you aware that the events already run in a 'big' loop ?

    I know, I know

    But I need the real player selects his movements first i.e

    The player wants to go right, right, down and right, so he will select those movements from a list and when he finishes, presses play and the character Will move according those selected movements?

    I had to do that because someone else needs it that way

  • Yes you can use lerp also.

    lerp works kind of like this.

    lerp(sprite.startposition, sprite.endposition, 0.1)

    0.1 is 10% of the distance per tick.

    You can also try a plugin called liteTween you can find it here on the forums. It can do similar a thing but with much more nice acceleration and smooth movement. Highly recommended, as lerp is only linear.

    Thanks for responding tunepunk

    The problem is:

    It is a loop who moves the character, like this

    so, if it is 1 - move the player right, if it's 2 - move the player left and the same for up and down

    that's why I need to use a "wait" there, in the loop.

    I used lerp, following what you said but the character barely moves.

    I don't know what to do, even if it is possible into a loop

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hi.

    At this moment, I'm moving my character using the simple way

    player.X = player.X + 64 ( :v ) so, the player jumps instandly to the next position

    I want to know if it is possible to make that movement smooth, like a transition (?)

    I read about lerp, but I don't know if I can use it in this case or if there is a different way to make it.

    Thanks you all.

  • Hi everyone.

    This is my problem...

    I'm new using construct 2 and I'm stuck.

    After the wait finish, I need to know the value in "linea_movimiento" in that moment and then, move the "player" depending on that value (1 right, 2 left, 3 up, 4 down)...

    I'm trying to do something like this:

    ________________________________

    if(linea_movimiento==1)

    player.move(right)

    if(linea_movimiento==2)

    player.move(left)

    ... etc...

    _________________________________

    Thanks.

jdvergarad's avatar

jdvergarad

Member since 8 Feb, 2017

None one is following jdvergarad yet!

Trophy Case

  • 7-Year Club
  • Email Verified

Progress

8/44
How to earn trophies