Ok, so i"ve made this spellcard and stuff.
So when I tried it out this, it crashes.
#TouhouDanmakufu[Stage]
#Title[I don't know why it's crashing.]
#Text[It just crashes.]
//Background[IceMountain]
#PlayLevel[Wut]
#BGM[]
#Player[FREE]
#ScriptVersion[2]
script_stage_main{
let GCSD = GetCurrentScriptDirectory;
function Wait(let frames){
loop(frames){yield;}
}
function WaitForZeroEnemy{
while(GetEnemyNum != 0){yield;}
}
function WaitForNoEvent {
while(OnEvent) { yield; }
}
task stage6 {
Wait(1);
CreateEnemyBossFromFile(GCSD~"theattack.txt", GetCenterX, GetClipMinY-50, 0, 0, 0);
Wait(360);
Clear;
}
@Initialize{
stage6;
LoadGraphic(EFamiliar);
}
@MainLoop{
yield;
}
let EFamiliar = GCSD~"img\enemy_option.png";
let rotateoptioncircle = 0; let rotateoptioncirclea = 0;
@Background{
rotateoptioncircle -= rotateoptioncirclea; rotateoptioncirclea+=1/4;
if(rotateoptioncircle >= 360) { rotateoptioncircle -= 360; } if(rotateoptioncirclea >= 360) { rotateoptioncirclea -= 360; }
SetTexture(EFamiliar);
SetGraphicRect(0,0,75,75);
SetGraphicAngle(0, 0, rotateoptioncircle);
SetGraphicScale(5, 5);
SetRenderState(ALPHA);
SetAlpha(255);
SetColor(255, 255, 255);
DrawGraphic(GetCenterX, GetCenterY);
}
@Finalize{
LoadGraphic(EFamiliar);
}
}
#TouhouDanmakufu
#Title[Works here, though.]
#Text[]
#Image[]
#BackGround[IceMountain]
#Player[FREE]
#ScriptVersion[2]
//Don't worry about having the images.
script_enemy_main {
let BossImage = "script\img\ExRumia.png";
let EFamiliar = GetCurrentScriptDirectory~"img\enemy_option.png";
let CutInGraphic = GetCurrentScriptDirectory~"img\cut.png";
let bossname = "????????? ?? ?????";
let Spell = 1;
let SpellName = "「???」";
@Initialize {
SetLife(500000); SetDamageRate(0, 0); SetTimer(68);
SetEnemyMarker(true); MagicCircle(true); SetInvincibility(180);
LoadGraphic(BossImage); LoadGraphic(EFamiliar);
TMain;
SetInvincibility(480);
SetEffectForZeroLife(60, 55, 3); //LastSpell;
SetShotAutoDeleteClip(10, 10, 10, 10);
}
@MainLoop {
if(GetTimer > 0) { SetLife(630); }
SetCommonData("StuffLife", GetEnemyLife);
SetCommonData("StuffTime", GetTimer);
if(Spell <= 1) {
if(show) { ascent(i in 0..7) { SetCollisionA(GetPlayerX+50*cos(i*360/7), GetPlayerY+50*sin(i*360/7), 10); } }
}
yield;
}
let animation = 0;
let rotate = 0; let rotatea = 0;
let alpha = 0;
let x = 0;
let count = 0;
let show = 0;
@DrawLoop {
if(!show){
if(count<270) {
count++;
if(x<=20) { x+=1/6; }
if(alpha < 255) { alpha+=255/120; }
if(count==210) { alpha=255; } if(count>210) { x+=1/4; alpha-=255/60; }
SetFontColor(255, 255, 255, 0, 0, 155);
DrawText("Blue text! THIS IS A COPY", GetCenterX-100+x, GetCenterY+150-10, 15, alpha);
SetFontColor(255, 255, 255, 155, 0, 155);
DrawText("Purple text! OF YUYUKO", GetCenterX-100-x, GetCenterY+150+10, 10, alpha);
}
}
SetFontColor(255, 255, 255, 0, 0, 155);
DrawText(bossname, 40, 36, 12, 255);
}
@Finalize {
PlaySE("se\se_enep01.wav");
DeleteCommonData("StuffLife");
DeleteCommonData("StuffTime");
SetShotAutoDeleteClip(200, 200, 200, 200);
SetShotColor(255, 255, 255);
DeleteGraphic(BossImage); DeleteGraphic(EFamiliar);
}
task TMain {
suika;
SetMovePosition02(GetCenterX, GetCenterY, 1);
loop(120){yield;}
loop(4) { Concentration02(45); PlaySE("se\se_ch00.wav"); loop(30){yield;} } Concentration02(90); PlaySE("se\se_ch00.wav"); loop(45){yield;}
show = 1;
SetText(SpellName); SetScore(10000000); //SetDurableSpellCard;
loop(30) { yield; }
loop(150) { yield; }
PlaySE("se\se_option.wav"); ascent(i in 0..6) { CreateEnemyFromScript("one", GetX, GetY, 0, 0, i*360/6); }
while(GetCommonData("StuffLife")>400 && GetCommonData("StuffTime")>50) { yield; } attack1;
while(GetCommonData("StuffLife")>300 && GetCommonData("StuffTime")>40) { yield; } SetDamageRate(9, 3); attack2;
}
task suika {
task CreateShotR(x, y, delay) {
let obj = Obj_Create(OBJ_SHOT); let c = -delay;
Obj_SetPosition(obj, x, y);
ObjShot_SetGraphic(obj, BLUE05);
ObjShot_SetDelay(obj, delay);
ObjShot_SetBombResist(obj, 1);
Obj_SetCollisionToPlayer(obj, 0);
while(!Obj_BeDeleted(obj)) {
Obj_SetY(obj, Obj_GetY(obj)-2);
c++; if(c==0) { Obj_Delete(obj); }
yield;
}
}
loop {
loop(10) { CreateShotR(GetX+rand(-15, 15), GetY+rand(-10, 30), rand_int(15, 25)); }
loop(5) { yield; }
}
}
task attack1 {
let graphic = [BLUE03, BLUE02, BLUE01, BLUE04, BLUE05];
let num = 3; let a = GetAngleToPlayer;
loop {
a = GetAngleToPlayer;
ascent(i in 0..num) {
PlaySE("se\se_lazer01.wav");
CreateShot01(GetX, GetY, 5, a+i*360/num, graphic[0], 10);
loop(30) { CreateShot01(GetX, GetY, rand(4, 5), a+i*360/num+rand(-2, 2), graphic[1], 10); }
loop(60) { CreateShot01(GetX, GetY, rand(3, 5), a+i*360/num+rand(-3, 3), graphic[2], 10); }
loop(25) { CreateShot01(GetX, GetY, rand(1, 5), a+i*360/num+rand(-3, 3), graphic[3], 10); }
loop(70) { CreateShot01(GetX, GetY, rand(1, 5), a+i*360/num+rand(-7, 7), graphic[4], 10); }
}
loop(60) { yield; }
}
}
task attack2 {
loop {
ascent(i in -17..18) { ascent(j in 0..6) { CreateShot01(GetX, GetY, 1/3, GetAngleToPlayer+i*1+j*360/6, RED02, 0); PlaySE("se\se_tan02.wav"); } }
loop(180) { yield; }
}
}
}
script_enemy one {
let EFamiliar = GetCurrentScriptDirectory~"img\enemy_option.png";
@Initialize {
SetLife(9999);
TMain;
//LoadGraphic(EFamiliar);
}
@MainLoop {
SetLife(9999);
SetMovePosition02(GetCenterX+radius*cos(a), GetCenterY+radius*sin(a), 1);
yield;
}
let rotate = 0;
@DrawLoop {
rotate += 7; if(rotate >= 360) { rotate -= 360; }
SetTexture(EFamiliar);
SetGraphicRect(0,0,75,75);
SetGraphicAngle(0, 0, rotate);
SetGraphicScale(1, 1);
SetRenderState(ADD);
SetAlpha(255);
SetColor(255, 255, 255);
DrawGraphic(GetX, GetY);
}
@Finalize {
SetShotColor(255, 255, 255);
//DeleteGraphic(EFamiliar);
}
let radius = 0; let a = GetArgumentDefault(0); let delay = 3;
task TMain {
radiusinc;
ainc;
unr;
atak1;
while(GetCommonData("StuffLife")>100 && GetCommonData("StuffTime")>10) { yield; }
PlaySE("se\se_option.wav"); CreateEnemyFromScript("two", GetPlayerX, GetPlayerY, 0, 0, GetArgument);
}
task radiusinc {
while(radius<225) {
radius+=2;
yield;
}
loop {
CreateShot01(GetX, GetY, 4, a, BLUE22, 0); PlaySE("se\se_kira01.wav");
loop(delay) { yield; }
}
}
let spin = 0.75;
task ainc {
loop {
a+=spin; if(a>=360) { a-=360; }
yield;
}
}
task unr {
while(GetCommonData("StuffLife")>400 && GetCommonData("StuffTime")>30) { yield; }
while(radius > 150) { radius-=1/4; yield; }
spin = 5.5; delay = 1;
}
task atak1 {
while(GetCommonData("StuffLife")>200 && GetCommonData("StuffTime")>20) { yield; }
loop {
CreateShot01(GetX, GetY, 2, GetAngleToPlayer, RED03, 0); PlaySE("se\se_tan02.wav");
loop(240) { yield; }
}
}
}
script_enemy two {
let EFamiliar = GetCurrentScriptDirectory~"img\enemy_option.png";
@Initialize {
SetLife(9999);
TMain;
//LoadGraphic(EFamiliar);
}
@MainLoop {
SetLife(9999);
SetMovePosition02(GetPlayerX+radius*cos(a), GetPlayerY+radius*sin(a), 1);
yield;
}
let rotate = 0;
@DrawLoop {
rotate += 7; if(rotate >= 360) { rotate -= 360; }
SetTexture(EFamiliar);
SetGraphicRect(0,0,75,75);
SetGraphicAngle(0, 0, rotate);
SetGraphicScale(1, 1);
SetRenderState(SUBTRACT);
SetAlpha(255);
SetColor(255, 255, 255);
DrawGraphic(GetX, GetY);
}
@Finalize {
SetShotColor(255, 255, 255);
//DeleteGraphic(EFamiliar);
}
let radius = 0; let a = GetArgumentDefault(0);
task TMain {
ainc;
unr;
}
let spin = 5.5;
task ainc {
loop {
a-=spin; if(a>=360) { a-=360; }
yield;
}
}
task unr {
while(GetCommonData("StuffLife")>400 && GetCommonData("StuffTime")>20) { yield; }
while(radius < 100) { radius+=1; yield; }
atak1;
}
task atak1 {
while(GetCommonData("StuffLife")>100 && GetCommonData("StuffTime")>20) { yield; }
loop {
ascent(i in -5..6) { CreateShot01(GetX, GetY, 3/4, a+i*30, RED22, 0); } PlaySE("se\se_tan02.wav");
loop(240) { yield; }
}
}
}
Does it have to do with the familiars spawning familiars?