ourotorrus's Recent Forum Activity

  • Hello R0J0hound

    And by the way, just curiosity but, is there any way of "simulating" a "real trigger" with events ? Like to fire an event like "on key pressed" does ?

  • You are faster than light !!

    Just tested the new feature, it works great, this is absolutely awesome

    Many thanks blackhornet

  • Actually Ashley and R0J0hound answered this already in this topic :

    I wonder if something couldn't be made in the software to give a clue about that difference that can be very important. Maybe a different color for the arrow icon for trigger conditions that are "fake triggers" ?

  • okay!

    Thank you so much R0J0hound

    well, that's very good to know that. I guess I can remove my bug topic then.

  • Problem Description

    The controller behavior and the keyboard behavior are not behaving the same way to trigger a "on pressed" event.

    The controller will trigger the event the following tick where the button has been pressed.

    The keyboard will trigger the event at the same tick where the button has been pressed.

    Attach a Capx

    we.tl/fSh5LLTTM0

    Description of Capx

    switch the animation of the sprite with keyboard or controller to compare. Launch in debug mode to make it tick by tick.

    Steps to Reproduce Bug

    step 1

    create 1 sprite with 2 animations :

    step 2

    on gamepad button pressed :

    IF sprite animation = A, set to B

    ELSE set to A

    on keyboard button pressed :

    IF sprite animation = A, set to B

    ELSE set to A

    Observed Result

    The event is not triggered during the same tick depending of which behavior is used

    Expected Result

    Both behaviors keyboard and controllers should trigger during the same tick

    Affected Browsers

    • Chrome: (YES)
    • FireFox: (YES)
    • Internet Explorer: (YES)

    Operating System and Service Pack

    Windows 10

    Construct 2 Version ID

    227

  • Hey 99Instances2Go

    So I had this whole thing working using your way, and then I just bumped into something crazy.

    Basically I have copy pasted my thing and literally just changed the input, instead of using the controller it's using the keyboard now, for the exact same thing. But it wasn't working !!!!!!!

    I have noticed that now it's changing the name of the animation on the same tick than the tick where you press the button, but both keyboard and controller are using the "on press" trigger. And when it is with the controller it's changing the animation the tick after you actually pressed the button.

    Are the controllers and keyboard not behaving the same way ? is that a bug of Construct 2 ?

    EDIT : ok yep, I just tried it in an empty project. If you make two sprites and switch their animation on a "on press button" trigger it is not going to change at the same tick depending of keyboard or controller

  • 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 !

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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!

ourotorrus's avatar

ourotorrus

Member since 15 Jun, 2015

None one is following ourotorrus yet!

Connect with ourotorrus

Trophy Case

  • 9-Year Club
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

12/44
How to earn trophies