~Hakurei Shrine~ > Rika and Nitori's Garage Experiments
Some noobish questions
<< < (5/6) > >>
Cyclone722:
heres what I got in the end

--- Code: ---if(frame2==60||frame2==65||frame2==70){
let x=rand(100,300);
let y=rand(50,224);
loop(20){
angle += 360/20;
       CreateShot01(x, y, 3, angle, BLUE50, 0);
CreateShot01(x, y, 3, angle, BLUE50, 0);
CreateShot01(x, y, 3, angle, BLUE50, 0);

}
        }
if (frame2==120){
frame2=0;
}
  frame2++;
--- End code ---
This was what I actually wanted to happen.
Cyclone722:
This is a little more complicated, but I'm trying to create a spiral effect.
kinda like a whirlpool.
the bullets would start at a point and spiral inward to a single point.
Naut:

--- Quote from: Cyclone722 on June 06, 2009, 05:11:16 PM ---This is a little more complicated, but I'm trying to create a spiral effect.
kinda like a whirlpool.
the bullets would start at a point and spiral inward to a single point.

--- End quote ---

Bllrbll.
Iryan:
Do you want bullets to come from beyond the borders of the playing field and move to the center in a spiral pattern, then dissappear in the center?

@Intitialize, create a variable called phase with a random value and call SetShotAutoDeleteClip(300, 300, 300, 300);

Then put this in your main loop:

--- Code: ---phase+=angv;
ascent(i in 0..n){
   let x=GetX+300*cos(phase+360*i/n);
   let y=GetY+300*sin(phase+360*i/n);
   CreateShotA(1 , x, y, 0);
   SetShotDataA(1, 0, v, phase+180+360*i/n, 0, 0, 0, BLUE21);
   SetShotKillTime(1, 300/v);
   FireShot(1);
}

--- End code ---
v = speed of your bullets
n = number of "arms" your whirl has.
angv= angular velocity of your whirlpool

Inserting a value for v that will divide 300 into a non-integer-number is likely to cause... bad things.

?dit: *cough* forgot the FireShot command, *cough*
Cyclone722:
hmm... that is interesting but not what I need.

this is somewhat closer.
Navigation
Message Index
Next page
Previous page

Go to full version