How do I make a bullet object stop moving after travelling D

Get help using Construct 2

Post » Tue Oct 18, 2016 9:59 pm

Message: codingr can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Hello,

I am new to this forum and to this platform 'Construct 2'

I am having a very weird problem, Let me show you my event sheet screenshot:
http://prnt.sc/cw0hrh

in real time what I am getting is that on collision with the object, the Tile moves, but doesn't really stop after travelling that distance..
That is strange..I've also tried loooking in the debugger under watch and each of the Instances goes by beyond 40 (The travelling distance variable) and nothing
happens.

what am I doing wrong?
B
3
Posts: 4
Reputation: 183

Post » Tue Oct 18, 2016 10:09 pm

You can't assume that the distance will be exactly 40. Try >=40.
ImageImageImage
B
71
S
22
G
257
Posts: 3,789
Reputation: 142,694

Post » Tue Oct 18, 2016 10:13 pm

OK yeah, You were right it is a logical error, but I tried >= 10 just for the testing, and it doesn't stop.
am i missing anything else?
B
3
Posts: 4
Reputation: 183

Post » Tue Oct 18, 2016 10:20 pm

You logic is backwards. The On collision needs to be first, then For each (might) be needed. You shouldn't bury triggers under normal events, in general.
ImageImageImage
B
71
S
22
G
257
Posts: 3,789
Reputation: 142,694


Return to How do I....?

Who is online

Users browsing this forum: babymumu, draiza, newt and 5 guests