Tweening, sprite visibility, and event sheet order

0 favourites
  • 4 posts
From the Asset Store
Very simple code without excess options (15 events for server and 11 events for client)
  • This is kind of a complicated question.

    My project involves the player standing on the bottom of the screen. There are two platforms above, one to the left and one to the right. Depending on what direction you indicate, the platforms move to simulate jumping up to them. For example, if you choose to jump right, the right-upper platform will move itself under your feet, and the left-upper platform will move offscreen and be destroyed. Meanwhile, other platforms move from above into the proper place to replace the platforms that moved downward.

    The intended behavior is that the arrows to select which direction you'll jump will disappear upon being pressed, and then will reappear when the platforms have been reset and put in place for the next jump.

    However, the arrows in my project are appearing a split-second before the jump is able to be repeated. Even though the events related to moving the platforms are triggered only by pressing the arrows, for a brief period they are visible but do nothing when pressed. If you wait a bit, the arrows function correctly and trigger platform movement.

    I cannot figure out why the player's ability to jump is delayed for a bit after everything seems to be ready. Moreover, even after testing some things, I'm unsure of where the problem lies, exactly. The tweening of the platforms? The visibility of the arrows? The order of events on the event sheet?

    The project file is linked above, and I would very much appreciate anyone who has guidance on this.

  • "However, the arrows in my project are appearing a split-second before the jump is able to be repeated." Looks fine to me, they appear as expected.

    The arrows can always be clicked, making them invisible does not make them inactive as you say. The problem you are seeing is that you've used a tap gesture which isn't always simulated well with a mouse click so sometimes it doesn't work.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The problem you are seeing is that you've used a tap gesture which isn't always simulated well with a mouse click so sometimes it doesn't work.

    Ah, I wasn't aware of that. I will add a mouse click itself as a condition and see if I reach the behavior I expect.

  • That seems to have successfully fixed the problem.

    For anyone else who has a similar issue in the future, make note that the condition block has to be set as an 'or' block to add "mouse click on object" as a second condition. From there, I added a sub-event to check whether the arrows should be activated, not just visible.

    Thank you, lionz!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)