ourotorrus's Forum Posts

  • Hello blackhornet

    The plugin is working great now, and actually the inset parameters are awesome.

    I think that would be great to be able to reach them with events as well, for example to make the scroll to bound to a specific area by modifying those parameters.

    Cheers!

  • Ok ok, I read the repeat tutorial but I wasn't using the wait with repeat, I think I understand how it works now.

    Thank you very much !

  • Ah yea

    thanks so much !

  • Hello

    So I am using a "on animation finished" trigger

    I can't figure out how it's working really and I am confused.

    It seems that 1 tick before the animation is actually finished, the event "on animation finished" is triggered

    So in my case for example, I have :

    On A "prejump" animation finished :

    set A animation to "jumping"

    then I have another condition saying :

    when A "jumping" animation is playing

    set A value to x

    What happens is that during 1 tick, A still has "prejump" drawn on the screen but A value is already to x, but its animation is not set to "jumping" yet.

    I tried to put everything in the same event like this :

    On A "prejump" animation finished :

    set A animation to "jumping"

    set A value to x

    But it does the same.

  • Hello

    Currently I have this :

    IF

    A = 1

    Trigger once

    THEN

    set box.opacity to 0

    wait 0.1 seconds

    set box.opacity to 1

    wait 0.1 seconds

    set box.opacity to 0

    wait 0.1 seconds

    set box.opacity to 1

    wait 0.1 seconds

    set box.opacity to 0

    wait 0.1 seconds

    set box.opacity to 1

    wait 0.1 seconds

    and it's working fine.

    But I would like to replace it with Repeat

    I tried this :

    IF

    A = 1

    THEN

    Repeat 3 times

    set box.opacity to 0

    wait 0.1 seconds

    set box.opacity to 100

    wait 0.1 seconds

    but it doesn't work, opacity stays at 0. I also tried by adding trigger once here and there and it doesn't work either. What is the proper way to use repeat ?

    Many thanks

  • Thank you so much for your example, it's being very instructive.

    So as I can see you have the same problem that I had, the value is slightly overshooting because dt cannot be 100% accurate, however in your example it's more accurate.

    I think the only way to counter this is by creating limits such as : if X>10 then set X to 10

    you could also do :

    on timer, set X to max value

    if you need 100% accurate values

    Also your example will be very useful to try all sort of curves based on expressions. Thanks a lot again!

  • Ah ! working very well

    Thank you so much

  • I have the same issues, I don't think this is a bug, it's a missing feature.

    When the search feature doesn't work, I usually click on some random events and then click search again and that does the job.

  • So let's say you have an item "box" which is a sprite.

    You have 3 "box" in your layout.

    Those "box" are overlapping each other, and I would like to make them interacting to each other this way :

    If a box is overlapping another box on the left, it goes 1 pixel on the right

    If a box is overlapping another box on the right, it goes 1 pixel on the left

    Currently, I have this :

    "box" is overlapping "box" at offset -1, 0 : Set X to Self.X+1

    "box" is overlapping "box" at offset 1, 0 : Set X to Self.X-1

    Which is working fine for 2 item, but not 3 or more.

    For each doesn't work either.

    Any advice ?

  • I get the picture yes, this is good to simulate a framerate animation btw

    I like the idea of creating a step global variable to control the use of dt

    The subevent

    If step > 100 >>>>>>>>> set value to max

    Can be used to define the maximum value to prevent overshooting as well

    Thanks

  • Well even after reading this very interesting article scirra.com <img src="{SMILIES_PATH}/icon_arrow.gif" alt=":arrow:" title="Arrow" /> /blog/ashley/17/using-lerp-with-delta-time?action=lastpage&t=1461233976004#lastcomment

    I can't manage to have something accurate

    I guess the best is to carry on with timers and put maximum/minimum values to prevent any overshoot... technically you can't really have a 100% accurate value animation using lerp I think.

  • I am not sure it's quite working though,

    In another try I have some overshoot issue, I wonder if that's because I'm using a timer and not dt...

  • 99Instances2Go

    Alright that's it, I understand how it's working

    So the issue was that the first parameter was relative : item.opacity

    So whatever the math, the curve was constantly changing because of this relative value and so inevitably scaling down and down without never reaching its goal

    lerp is linearly interpolating a to b by x so a and b need to be "static" values so that they follow x function properly, knowing that x=0 will result the value being a and x=1 will result the value being b

    So :

    lerp(0,100,(Object.timer.currenttime("blabla")/blablaTime)^x)

    You will have a nice exponential acceleration from a to b for the duration of your timer.

    Thank you so much for your help

  • That totally makes sense, I try that now !

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello world !

    I'm an animator and I start to make games with Construct2

    You can check my progress by following me on Twitter or my blog : twitter.com/ourotorrus

    Cheers!