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