• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

how to make a gun that shoots in three direction?

pixeltroid

Member
Im guessing it involves creating 3 bullet objects and then setting the directions so they spread out.

Can someone tell me what the code for it might look like?
 
Depending on your direction system... But when you press your fire button:

Code:
var bullet1 = instance_create(o_bullet,x,y);
bullet1.direction = angle1;

var bullet2 = instance_create(o_bullet,x,y);
bullet2.direction = angle2;

var bullet3 = instance_create(o_bullet,x,y);
bullet3.direction = angle3;
And the o_bullet object holds all the logic for moving the bullet.
 
Top