Okay, so there's nothing too wrong with this spellcard, but something is a bit peculiar.
I suggest you take a simple test run first.
Scroll down to "task Flowercenter" and find "//spores"
#TouhouDanmakufu
#Title[Flower sp]
#Text[Description]
#Player[FREE]
#ScriptVersion[2]
script_enemy_main{
///
#include_function "lib\SHOT_REPLACE\shot_replace.dnh"
function wait(let frames){ loop(frames){yield;} }
///
let sprite = "script\img\ExRumia.png";
let Cutin = "";
let fr = 0;
//////////
@Initialize{
shotinit;
LoadGraphic(sprite);
SetLife(5000);
SetDamageRate(100, 100);
SetTimer(50);
SetInvincibility(30);
CutIn(YOUMU, "X Sign "\""X"\", Cutin, 0, 0, 0, 0);
SetScore(500000);
SetEnemyMarker(true);
Concentration01(60);
MagicCircle(true);
SetEffectForZeroLife(180, 100, 1);
SetMovePosition02(GetCenterX, GetCenterY - 100, 30);
SetShotAutoDeleteClip(100,100,100,100);
Flowers;
}
//////////
@MainLoop{
SetCollisionA(GetX, GetY, 32);
SetCollisionB(GetX, GetY, 16);
fr++;
yield;
}
//////////
@DrawLoop{
SetColor(255,255,255);
SetRenderState(ALPHA);
SetTexture(sprite);
SetGraphicRect(64,1,127,64);
DrawGraphic(GetX,GetY);
}
@Finalize{
DeleteGraphic(sprite);
}
//////////
task Flowers{
let tr_ang = GetAngleToPlayer+15;
let ang = 0;
wait(60);
loop{
tr_ang = GetAngleToPlayer-20;
loop(10){
loop(6){
Petal(tr_ang, ang, 20, 1, YELLOW02);
FlowerCenter(tr_ang, ang, 20, 1, GREEN05);
ang += 360/6;
}
tr_ang += 360/10;
}
wait(120);
tr_ang = GetAngleToPlayer+20;
loop(10){
loop(6){
Petal(tr_ang, ang, 20, -1, RED02);
FlowerCenter(tr_ang, ang, 20, -1, YELLOW05);
ang += 360/6;
}
tr_ang += 360/10;
}
wait(120);
}
yield;
}
//////////
task Petal (tr_ang, ang, radius, spin, graphic){
let obj = Obj_Create(OBJ_LASER);
let speed = 1;
Obj_SetPosition (obj, GetX+radius*cos(tr_ang), GetY+radius*sin(tr_ang) );
Obj_SetSpeed (obj, 0);
Obj_SetAngle (obj, ang);
ObjShot_SetGraphic (obj, graphic);
ObjShot_SetDelay (obj, 10);
ObjShot_SetBombResist (obj, true);
ObjLaser_SetLength (obj, 0);
ObjLaser_SetWidth (obj, 40);
ObjLaser_SetSource (obj, false);
while(!Obj_BeDeleted(obj) ){
if(ObjLaser_GetLength(obj) < 80){
ObjLaser_SetLength (obj, ObjLaser_GetLength(obj) +2);
}
if(speed<3){
speed += 0.01;
}
Obj_SetPosition (obj, GetX + radius*cos(tr_ang), GetY + radius*sin(tr_ang) ); //movement
radius += speed;
tr_ang += 0.2 * spin;
Obj_SetAngle (obj, Obj_GetAngle(obj) + (1*spin) ); //flower rotation
yield;
}
}
//////////
task FlowerCenter (tr_ang, add_ang, radius, spin, add_graphic){
let o2 = Obj_Create(OBJ_SHOT);
let speed = 1;
let count = 0;
Obj_SetPosition (o2, GetX+radius*cos(tr_ang), GetY+radius*sin(tr_ang) );
Obj_SetSpeed (o2, 0);
Obj_SetAngle (o2, 0);
ObjShot_SetGraphic (o2, YELLOW02);
ObjShot_SetDelay (o2, 10);
ObjShot_SetBombResist (o2, true);
while(!Obj_BeDeleted(o2) ){
count++;
if(count==50){ //spores.
CreateShot01(Obj_GetX(o2), Obj_GetY(o2), 0.5, rand_int(0,359), add_graphic, 2);
}
if(speed<3){ //acceleration
speed += 0.01;
}
Obj_SetPosition (o2, GetX + radius*cos(tr_ang), GetY + radius*sin(tr_ang) ); //movement
radius += speed;
tr_ang += 0.2 * spin;
if(Obj_GetX(o2) < GetClipMinX-20){ //out-of-screen deletion
Obj_Delete(o2);
}
if(Obj_GetX(o2) > GetClipMaxX+20){
Obj_Delete(o2);
}
if(Obj_GetY(o2) < GetClipMinY-20){
Obj_Delete(o2);
}
if(Obj_GetY(o2) > GetClipMaxY+20){
Obj_Delete(o2);
}
yield;
}
}
//////////
}
Note how the flower centers release around six "spores."
Strangely, I don't believe I have any loop that would make them release six. Rather, each flower should only shoot one.
Like I said before, the end result is pretty tolerable. I should be able to just loop my CreateShot01 twice to get 12 spores per flower, which would be more ideal in the spellcard, but... It just wouldn't be right. Could someone explain why this is happening?