tWeeen (Construct 3 Behaviours)

You're viewing a single comment in a conversation. View all the comments
  • 11 Comments

  • Order by
  • Here was a comment about an error, but I'll replace it by a conclusion after a big debugging session:

    I didn't know it, but you can't launch timelines or tweens on several instances at the same time (around less than 0.1-second difference. Might be a bug.

    It's a bit annoying for "is on floor" from the platform behavior when everyone spaws at the same time for example but understandable.

    I just hope it's going to be fixed soon because it causes me problems when players are jumping.

    • Hey, I´m not 100% sure if I understand everything correct (based on your image) but from what I tested it appears to work. One thing that did cause trouble is the platform behavior interfering with the tween bahvior (most likely because it has a permanent gravity acting on it) so as long as the tween is running, the platform behavior should be disabled. If that doesn´t solve it I´d request an example file showcasing the bug.

      EDIT: If you don´t want to disable it completely (so the player can still move left/right) you can also set the gravity to 0.

      wackytoaster.at/parachute/tweeen_platformer.c3p

        • Well we have our answer. I was using an accidentally documented, undocumented feature that wasn´t intended to be used.

          github.com/Scirra/Construct-3-bugs/issues/2155

          I guess I will have to rework that part with the next update.

          • Thanks, the fall tween is working fine.

            I maybe misunderstood some part of it because the workaround in the same style I thought to be efficient just worsened things.

            I am though sure that the error was that the variables used were intended for calls, and so deduced that using a function would solve the problem, did I misunderstand?

            EDIT: My bad it was just that I forgot to pick Player at the "on Jump"

          • Thanks to that thread I was able to find out another workaround for my jump that has the same problem, I'll do:

            Is animation "BlueJump" playing && trigger once {

            call "BlueJump"

            }

            on "BlueJump" {

            #tween

            }

            instead of directly tweening

        • Wew so long story short: There is some weird crazy stuff going on and basically I have no clue why it is happening, I may have to ask Ashley about that one.

          Anyway, the newest update fixes the problem BUT you must change a minor thing in your code. Instead of using "Is on floor + trigger once" you have to use "on landed" because... reasons.

          Hope that solves it :)

      • Ok, didn't fix, I'm going to send an example capx soon

      • ok

        I am glad you answered but from what I tested the problem is not here.

        I checked before and the platform behavior and tweeen were working perfectly fine together (mainly because I didn't change the coordinates when not on the floor) when I tested with one player, but as soon as I land or jump at the same time with several players it crashes.

        I'm going to try the c3p you sent.

        EDIT: your c3p was a good source of inspiration, thanks, I'll try to disable the platform behavior for the jumping and falling animation but I'm afraid that it will affect gameplay.

        RE-DIT: While I'm at it, the error was: Uncaught (in promise) TypeError: Cannot read property 'val' of undefined, which doesn't seem to be linked to the platform behavior