Creating object every 50 pixels

Get help using Construct 2

Post » Thu Apr 26, 2012 7:01 pm

I have bullet object, when i shoot from left to right i want the bullet create a dot every 50 pixels when he fly. Is this possible?
B
93
S
19
G
34
Posts: 1,840
Reputation: 27,963

Post » Thu Apr 26, 2012 8:15 pm

Every tick, add Sprite.Bullet.Speed * dt to an instance variable. That tracks the distance travelled. So whenever the instance variable is >= 50, spawn a dot and subtract 50.
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,544


Return to How do I....?

Who is online

Users browsing this forum: nimos100, Yahoo [Bot] and 21 guests