M
Mr_koozit
Guest
This will be hard to explain but ill do my best. I am trying to make my character shoot 3 chain projectiles. They dont need to stick they just need to do damage and disappear after a set amount of distance.
Explanation: (The image order is not right so i numbered them)
I already have a code for shooting three bullets at a time but i dont know how to make it to what i want:
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Create event:
firingdelay = 0;
can_shoot = true;
count=0;
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Begin step:
x = Player.x+10;
y = Player.y;
image_angle = point_direction(x,y,mouse_x,mouse_y)
firingdelay = firingdelay - 1;
if (mouse_check_button_pressed(mb_left)) && (firingdelay < 0) && (can_shoot = true) && (count<3)
{
count += 1;
can_shoot = false;
firingdelay = 5;
alarm[0] = room_speed * 0.2
with (instance_create_layer(x, y, "Bullets", Bullet))
{
speed = 30;
direction = other.image_angle;
image_angle = direction;
}
if (count==3)
{
alarm[1] = room_speed * 0.8
}
}
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Alarm 0:
can_shoot = true;
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Alarm 1:
count=0;
can_shoot=true;
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Explanation: (The image order is not right so i numbered them)
I already have a code for shooting three bullets at a time but i dont know how to make it to what i want:
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Create event:
firingdelay = 0;
can_shoot = true;
count=0;
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Begin step:
x = Player.x+10;
y = Player.y;
image_angle = point_direction(x,y,mouse_x,mouse_y)
firingdelay = firingdelay - 1;
if (mouse_check_button_pressed(mb_left)) && (firingdelay < 0) && (can_shoot = true) && (count<3)
{
count += 1;
can_shoot = false;
firingdelay = 5;
alarm[0] = room_speed * 0.2
with (instance_create_layer(x, y, "Bullets", Bullet))
{
speed = 30;
direction = other.image_angle;
image_angle = direction;
}
if (count==3)
{
alarm[1] = room_speed * 0.8
}
}
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Alarm 0:
can_shoot = true;
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Alarm 1:
count=0;
can_shoot=true;
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------