How do I disable an every tick condition?

Get help using Construct 2

Post » Sun Mar 06, 2016 12:03 am

Image
Hey,

The plan was to make it so, every time I clicked, the Sprite2 moved in a parabola to targets x and y. I'm sure I overcomplicated things with all these instance variables (I'd appreciate if someone told me an easier way), but it kind of worked in the end. The Sprite2 does move in a parabola once I click, but it keeps going down past the target location.
Seems like it's because the every tick action doesn't stop once the mv_pgs (movement progress) gets to 1, as when I displayed the variable, it kept increasing. Thus, how would I fix that?

Thank you really much for any help given.
B
3
Posts: 7
Reputation: 189

Post » Sun Mar 06, 2016 12:11 am

Floating point math can have rounding errors, so there is no guarantee the value is exactly 1.0. Change event 31 to mv_pgs <= 1 and use Else to reset, rather than event 33.
ImageImageImage
B
71
S
22
G
248
Posts: 3,757
Reputation: 138,065


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 23 guests