Hundreds of features to explore
Games made in Construct
Your questions answered
Popular & trusted by schools and Universities world-wide
Construct 3 runs in the browser & works offline
Students do not need accounts with us
Our educational partners
Free education resources to use in the classroom
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
I'm playing around with the top down shooter from one of the tutorials here and I'm trying to make a "bullet spread" item. Preferably I wanted to make it at random angles within a certain angle space oriented by the player's own angle. It'd be something like a "triangle" in which bullets are shot at random angles within it. My question is: is it possible to do so? And if so, how?
Yes it is possible. You have to set the bullets angle on creation to random(player.angle-45, player.angle+45). This whould spread the bullets in a 90° range infront of the player.
I'm going to try that out, really thanks for the reply!
That worked like a charm, thanks a lot!
Glad I could help. You can change the 45 values to anything you want to increase the spread. If you change them to 90° the player should spreed the bullets at a 180° angle.
Develop games in your browser. Powerful, performant & highly capable.
I'm having some fun with it by doing a flamethrower, I've set them to 15º both and made the fade in and out times quicker and the speed higher. It's so fun to kill everything with fire haha