Author Topic: Noob Alert! (Rotating Laser Problems)  (Read 12396 times)

Remliel

Noob Alert! (Rotating Laser Problems)
« on: June 20, 2009, 01:29:44 AM »
Hello everyone, Danmakufu noob here. I'm working on trying to design some of my own patterns, and run into a snag. I don't know if I'm just misreading the function settings on the Wiki and tutorials or what.

The intention of this code chunk is for it to create seven lasers around the boss that rotate around it as it chases you around the field. I have the rest of the details ironed out, but the main attack creation code doesn't seem to want to do what I want it to.

In fact, I tried pasting the example for SetLaserDataB and CreateLaserB from Blargel's tutorial and it doesn't work how he says it should.

What I get is a laser that tumbles over itself at hyperspeed while circling outwards from the boss. Not quite what I had in mind, even if it is kinda cool.

Any ideas?

Code: [Select]

    let angle=0;
    let color=[RED01, ORANGE01, YELLOW01, GREEN01, AQUA01, BLUE01, PURPLE01];

if (frame == 120)

{

ascent(i in 0..7)
{

SetLaserDataB(i, 0, 1, 0, 0, angle, 3, angle, 3);
SetShotKillTime(i,180);
CreateLaserB(i, 100, 16, color[i], 60);
FireShot(i);
angle += 360/7;
}

angle = 0;

}

Kylesky

  • *The Unknown*
  • Local Unbalanced Danmakufu Idiot Scripter
    • My useless youtube account... (will be useful in the future *I promise*)
Re: Noob Alert! (Rotating Laser Problems)
« Reply #1 on: June 20, 2009, 02:07:54 AM »
I think that you should put the CreateLaserB before the SetLaserDataB...
Danmakufu Script Thread :V Latest Script: Intertwining Mechanical Intervention (temp name)

Yooooouuutuuuubeeee Channel Latest Video: Contest #8 Entry

Remliel

Re: Noob Alert! (Rotating Laser Problems)
« Reply #2 on: June 20, 2009, 02:10:23 AM »
That fixed it! I didn't know that it had to be in that order. Thanks!