Need help with a small issue

0 favourites
  • 7 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • Hey everyone, I just downloaded Construct 2 and started working on a little project. Seems like I've already ran into a snag and I just can't figure out what's causing it or how to remedy it. I figured I'd post on here and see if another set of eyes could spot the problem.

    Basically I have a frog sprite (which is currently using the facebook icon as a placeholder lol) that I want to jump to the location that is touched or clicked. Everything is working properly for the most part, the only issue is that sometimes when I keep clicking while the sprite is moving it will never end its jump and simply continue on its current path off the screen. It only happens once in awhile while clicking during the jump. I should also point out, the LZ sprite seems to be destroyed appropriately, but the jumping boolean isn't toggled in the same event.

    Here's a link to the .capx:

    http://dl.dropbox.com/u/16884361/Test.capx

    Thanks in advance for any help.

  • Thanks for the response. However, the issue is that I don't want to the frog to respond to another click until he has reached the position of the previous click.

  • That's a really nice way to implement a waypoint pathing system, but it's still not quite what I meant. The behavior I'm looking for is basically what I have in my example (all clicks while the frog is moving are ignored), the only issue is that once in awhile the sprite won't stop when it collides with the destination sprite and it just keeps moving off of the screen. So far I've only seen it happen if I click while the sprite is moving, however it seems to do it randomly.

    Thanks for the examples though, sorry I wasn't more clear on what I was going for.

    EDIT: Well looks like it was much simpler than I expected. Instead of using the toggle boolean action I just changed it to set the boolean to true or false directly. Thanks though Yann, your first example is what actually gave me the idea to try this.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • face palm

    time to make some pancakes

  • Lol.... sorry to waste your time, but thanks for the effort. Your second example actually gave me an idea for something else so it wasn't a complete loss :P

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