if (direction==1) // right
{
xvelocity=5;
}
if (direction==-1) // left
{
xvelocity=-5;
}
// Add the directions as necassary
xvelocity=direction*5;
int i;
for (i=1; i<=powerlevel; i++){ //when powerlevel is 0, this loop will do nothing.
//20 is the angle offset for each
//new shot in the spread.
myangle=(i*20); //sets bullet angle above
CreateActor("bullet", "bullet", "no parent", "no path", 0, 0, false);
myangle=-(i*20); //sets bullet angle below
CreateActor("bullet", "bullet", "no parent", "no path", 0, 0, false);
}
//Here's the main shot (0 degrees) which still happens if powerlevel is 0.
CreateActor("bullet", "bullet", "no parent", "no path", 0, 0, false);
Users browsing this forum: No registered users and 1 guest