For some odd reason or another, when I used some part of a code in two different scripts, the same result does not occur.
#TouhouDanmakufu
#Title[Blazing Wheel of Hell]
#Text[Round and Round it goes. When it stops, nobody knows.]
#Player[FREE]
#ScriptVersion[2]
script_enemy_main {
let ImgBoss = "script\thC\IMAGE\CHAR\DOT\boss_remilia.png";
let count = 540;
let count2 = -120;
@Initialize {
SetLife(2500);
SetTimer(60);
SetScore(10000000);
SetMovePosition02(225, 200, 60);
LoadGraphic(ImgBoss);
SetTexture(ImgBoss);
SetGraphicRect(0, 0, 100, 100);
}
@MainLoop {
SetCollisionA(GetX, GetY, 32);
SetCollisionB(GetX, GetY, 16);
SetShotAutoDeleteClip(400, 400, 400, 400);
if(count == 600) {
ascent( i in 0..1050)
{
CreateShotA(i, GetX, GetY, 10);
SetShotDataA(i, 0+i*0.5, 2, i*93, 0, -0.05, 0, RED04);
SetShotDirectionType(PLAYER);
SetShotDataA(i, 60+i*0.5, 3, 0, 0, -0.05, 0, RED04);
SetShotDataA(i, 120+i*0.5, 9, 0, 0, -0.05, 0, RED04);
SetShotDataA(i, 180+i*0.5, 9, 0, 0, 0, 9, RED04);
SetShotDirectionType(ABSOLUTE);
FireShot(i);
}
count=0;
}
if(count2 == 60){
ascent( j in 0..9)
{
CreateShotA(j, GetX, GetY, 10);
SetShotDirectionType(ABSOLUTE);
SetShotDataA(j, 0, 2, rand(0, 360), 0, -0.05, 0.5, GREEN01);
SetShotDirectionType(ABSOLUTE);
FireShot(j);
}
count2 = 0;
}
count++;
count2++;
}
@DrawLoop {
DrawGraphic(GetX, GetY);
}
@Finalize {
DeleteGraphic(ImgBoss);
}
}
#TouhouDanmakufu
#Title[Spawn Test]
#Text[Test script]
#Player[FREE]
#ScriptVersion[2]
script_enemy_main {
let ImgBoss = "script\thC\IMAGE\CHAR\DOT\boss_remilia.png";
let count = 0;
let a = 0;
@Initialize {
SetLife(2500);
SetTimer(60);
SetScore(10000000);
SetMovePosition01(GetCenterX, GetClipMinY + 120, 120);
LoadGraphic(ImgBoss);
SetTexture(ImgBoss);
SetGraphicRect(0, 0, 100, 100);
}
@MainLoop {
SetCollisionA(GetX, GetY, 32);
SetCollisionB(GetX, GetY, 16);
if(count == 60) {
ascent( i in 0..120)
{
CreateShotA(i, GetX + 100*cos(a), GetY + 100*sin(a), 10);
SetShotDataA(i, i*0.5, 2, i*37.01, 0, 0, 2, GREEN01);
SetShotDirectionType(ABSOLUTE);
FireShot(i);
a += 37.01;
}
count=0;
}
count++;
}
@DrawLoop {
DrawGraphic(GetX, GetY);
}
@Finalize {
DeleteGraphic(ImgBoss);
}
}
#TouhouDanmakufu
#Title[Spawn 3]
#Text[Test script]
#Player[FREE]
#ScriptVersion[2]
script_enemy_main {
let ImgBoss = "script\thC\IMAGE\CHAR\DOT\boss_remilia.png";
let count = 0;
let a = 0;
@Initialize {
SetLife(2500);
SetTimer(60);
SetScore(10000000);
SetMovePosition01(GetCenterX, GetClipMinY + 120, 120);
LoadGraphic(ImgBoss);
SetTexture(ImgBoss);
SetGraphicRect(0, 0, 100, 100);
}
@MainLoop {
SetCollisionA(GetX, GetY, 32);
SetCollisionB(GetX, GetY, 16);
if(count == 60) {
ascent( i in 0..120)
{
CreateShotA(i, GetX + 100*cos(a), GetY + 100*sin(a), 10);
SetShotDataA(i, 0+i*0.5, 0, i*a, 0, 0, 0, GREEN01);
SetShotDataA(i, 30+i*0.5, 2, i*a, 0, 0, 2, GREEN01);
SetShotDirectionType(ABSOLUTE);
FireShot(i);
a += 33;
}
count=0;
}
count++;
}
@DrawLoop {
DrawGraphic(GetX, GetY);
}
@Finalize {
DeleteGraphic(ImgBoss);
}
}
See, in the first script, all of the bullets in | ascent( i in... ) | appear in their delayed order, while the bullets in the second and third scripts in the same area appear all at once as red bullets, THEN start to fire off in their order of delay. I want the second and third scripts to function like the first script. Why are they all appearing at once instead of individually?
Or how do I at least make it so that the first/whichever bullet in the i.d. changes angle as well?
Take this script, for example. Half of the bullets are thrown around in a ribbon in varied angles, while the other half of the bullets fly directly to the right, i.e. angle 0:
#TouhouDanmakufu
#Title[Spawn 4]
#Text[Test script]
#Player[FREE]
#ScriptVersion[2]
script_enemy_main {
let ImgBoss = "script\thC\IMAGE\CHAR\DOT\boss_remilia.png";
let count = -60;
let a = 0;
@Initialize {
SetLife(2500);
SetTimer(60);
SetScore(10000000);
SetMovePosition01(GetCenterX, GetClipMinY + 120, 120);
LoadGraphic(ImgBoss);
SetTexture(ImgBoss);
SetGraphicRect(0, 0, 100, 100);
}
@MainLoop {
SetCollisionA(GetX, GetY, 32);
SetCollisionB(GetX, GetY, 16);
if(count == 1) {
ascent( i in 0..2)
{
CreateShotA(i, GetX + 100*cos(a), GetY + 100*sin(a), 10);
SetShotDataA(i, i*0.5, 2, i*a, 0, 0, 2, GREEN01);
SetShotDirectionType(ABSOLUTE);
FireShot(i);
a += 13.01;
}
count=0;
}
count++;
}
@DrawLoop {
DrawGraphic(GetX, GetY);
}
@Finalize {
DeleteGraphic(ImgBoss);
}
}