Need help with a small issue

Get help using Construct 2

Post » Thu Jan 05, 2012 8:12 pm

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.
B
16
Posts: 15
Reputation: 630

Post » Thu Jan 05, 2012 9:20 pm

Last edited by Yann on Sun Sep 14, 2014 10:17 pm, edited 1 time in total.
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Thu Jan 05, 2012 9:35 pm

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.
B
16
Posts: 15
Reputation: 630

Post » Thu Jan 05, 2012 10:28 pm

Last edited by Yann on Sun Sep 14, 2014 10:16 pm, edited 1 time in total.
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Thu Jan 05, 2012 10:35 pm

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.jtlindeman2012-01-05 22:39:49
B
16
Posts: 15
Reputation: 630

Post » Thu Jan 05, 2012 10:44 pm

face palm

time to make some pancakes
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Thu Jan 05, 2012 11:38 pm

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
B
16
Posts: 15
Reputation: 630


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 23 guests