if global.shotcount=1
{
switch (global.pl_weapon)
{
case (0) : instance_create(pl.x,pl.y,red); break;
case (1) : instance_create(pl.x,pl.y,orange); break;
case (2) : instance_create(pl.x,pl.y,yellow); break;
case (3) : instance_create(pl.x,pl.y,green); break;
case (4) : instance_create(pl.x,pl.y,blue); break;
case (5) : instance_create(pl.x,pl.y,purple); break;
case (6) : instance_create(pl.x,pl.y,white); break;
case (7) : instance_create(pl.x,pl.y,black); break;
}
if global.shotcount=2
{
switch (global.pl_weapon)
{
case (0) : instance_create(pl.x+2,pl.y+2,red)
instance_create(pl.x-2,pl.y-2,red); break;
case (1) : instance_create(pl.x+2,pl.y+2,orange)
instance_create(pl.x-2,pl.y-2,orange); break;
case (2) : instance_create(pl.x+2,pl.y+2,yellow)
instance_create(pl.x-2,pl.y-2,yellow); break;
case (3) : instance_create(pl.x+2,pl.y+2,green)
instance_create(pl.x-2,pl.y-2,green); break;
case (4) : instance_create(pl.x+2,pl.y+2,blue)
instance_create(pl.x-2,pl.y-2,blue); break;
case (5) : instance_create(pl.x+2,pl.y+2,purple)
instance_create(pl.x-2,pl.y-2,purple); break;
case (6) : instance_create(pl.x+2,pl.y+2,white)
instance_create(pl.x-2,pl.y-2,white); break;
case (7) : instance_create(pl.x+2,pl.y+2,black)
instance_create(pl.x-2,pl.y-2,black); break;
}
}
}This is in the 'glob right button' event. When I try to shoot two bullets, nothing happens, but when I shoot one, it works properly. What went wrong in the 'if shotcount=2' part? And if you'd be so kind, how could I make it work? Think Galaga.
Edited by Kortuga, 24 April 2012 - 10:38 PM.











