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
103
S
25
G
40
Posts: 1,875
Reputation: 31,883

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
378
S
220
G
84
Posts: 23,863
Reputation: 188,019


Return to How do I....?

Who is online

Users browsing this forum: jhjconstruct, Tuiii and 7 guests