Spawn multiple bullets with variance starting poin

0 favourites
  • 3 posts
From the Asset Store
Be quick and choose the right answer for the shown equation.
  • I want to spawn multiple bullets for every mouse click, I was able to achieve that with system repeat condition but in the layout when running it appears as the same bullet as they starting from the same image point and same acceleration. What is the best way to provide the visual differentiation of these multiple bullets.

    I was able to think of the following

    1) use a system wait in the action so bullets gets created after that delay (I tried it but for some reason I am still not able to see it)

    2) set a random speed (this shows the difference only if the range of random values is big)

    is there any other way, I think the best way is to add a variance to the image points for each of this creation is that possible or is there a better way to achieve this.


  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You can't vary the image points themselves, but you could create multiple image points and have the bullet spawn from a random one.

    Alternatively, use the system>create object function to spawn the bullets at "spawner.ImagePointX(0)+random(-10,10)), spawner.ImagePointY(0)+random(-10,10)" (or however much of a random spread you want).

    Altering speed, as you said, is also a good way, but that depends entirely on your gameplay dynamics, and generally bullets move at the same speed when fired from the same gun, anyway.

  • You can slightly alter their angle (aka spray) by setting each one's angle to Sprite.angle(random(Sprite.angle-1,Sprite.angle+1))

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)