needed to post this somewhere before I forgot
inc = random(360);
for(a=0;a<360;a+=10)
{
aa=instance_create(x,y,ball);
aa.speed = 3*(1 + (sqrt(2)-1))*abs(sin(2*degtorad(a+inc)));
aa.direction = a+inc;
}
needed to post this somewhere before I forgot
inc = random(360);
for(a=0;a<360;a+=10)
{
aa=instance_create(x,y,ball);
aa.speed = 3*(1 + (sqrt(2)-1))*abs(sin(2*degtorad(a+inc)));
aa.direction = a+inc;
}
Why will it be a little bit before you get to the computer?
Also, without even reading the code (just "360", "sin", and "degtorad" popped out at me), I'm going to guess it makes a circle, and not a square.Also, I glanced at it again and saw "aa.direction = a+inc", and that's definitely not something you'd do to a square.Do you want me to write you something for creating a square?My father's doing an excellent job sharing the computer :D
School computers reserved for testing :DI need to work for a couple more weeks before I can afford that laptop which is like a thousand bucks :DThe square comes from the difference in speed values…Do you want like a perfect square? I didn't even look that the speed was being set. =/
That makes a lot more sense. My trig is faaaar too rusty to tell you if that's correct or not. It doesn't look you can change the width/height of the square though. It'll fire 360 projectiles.Edit: I wanted to see how I would do it in a simple grid-based manner, and this is what I came up with in a few minutes (Sorry about the code tag not indenting. T_T):It's for Lunacy Star 2.
The idea would be that there are bursts of squares that you move through. They'd be at different angles and stuff.They expand out from the center, that's it, really.Whoops, that snippet of code doesn't take into account that it's all generated at once, and isn't actually grid based (I'm used to output in html. =/)
Also, it doesn't actually shoot squares at angles. The square can move in different directions, but it wouldn't form a square in all directions.Never mind what I have written.i love the number of people who tested this out for you to see if this works. Including me. :(
Howdy! This message is to prime the new Recent Activity List system. Please ignore!
Thanks,Not-a-bot.