Thanks. You got me through that problem, but now I have another.
#TouhouDanmakufu
#Title[blizzbullet]
#BGM[.\bgm.mp3]
#Player[FREE]
#ScriptVersion[2]
script_enemy_main
{
let CSD = GetCurrentScriptDirectory;
let imgBoss = CSD ~ "system\cirno.png";
let cut = CSD ~ "system\cirnocut.png";
let bg = CSD ~ "system\snowbg.png";
let lay = CSD ~ "system\blizzard.png";
let f = 0;
let f2 = 0;
let slide = 0;
@Initialize {
SetLife(3000);
SetTimer(30);
SetScore(50000);
SetMovePosition01(GetCenterX,GetCenterY,10);
LoadGraphic(imgBoss);
LoadGraphic(cut);
LoadGraphic(bg);
LoadGraphic(lay);
CutIn(YOUMU,"Powder storm",cut,0,0,300,384);
mainTask;
}
@MainLoop{
SetCollisionA(GetX,GetY,32);
SetCollisionB(GetX,GetY,16);
yield;
}
@DrawLoop{
// data for the boss
SetTexture(imgBoss);
SetRenderState(ALPHA);
SetAlpha(255);
SetGraphicRect(0,0,110,110);
SetGraphicScale(0.7,0.7);
SetGraphicAngle(0,0,0);
DrawGraphic(GetX,GetY);
}
@BackGround{
SetTexture(bg);
SetRenderState(ALPHA);
SetAlpha(255);
SetGraphicRect(0,0,512,512);
SetGraphicScale(1,1);
SetGraphicAngle(0,0,0);
DrawGraphic(GetCenterX,GetCenterY);
SetTexture(lay);
SetRenderState(ADD);
SetGraphicRect(0,0,20000,20000);
SetGraphicScale(1,1);
SetGraphicAngle(0,0,0);
DrawGraphic(GetCenterX+slide,GetCenterY+slide);
slide+=2;
}
@Finalize{
// delete the image from memory
DeleteGraphic(imgBoss);
DeleteGraphic(cut);
DeleteGraphic(bg);
}
function wait(t){
loop(t){ yield; }
}
// main task. activates stuff.
task mainTask{
wait(120);
yield;
movement;
fire2;
}
task movement{
loop{
SetMovePositionRandom01(60,30,10,GetCenterX-120,GetCenterY-100,GetCenterX+120,GetCenterY-40);
wait(30);
SetColor(128,128,255);
Concentration01(80);
SetColor(225,225,225);
wait(30);
fire;
wait(180);
yield;
}
}
task fire{
let x = 0;
let dir = rand_int(0,359);
while(x<16){
superbullet(GetEnemyX+60*cos(dir),GetEnemyY+60*sin(dir),3,dir,AQUA03,0);
dir+=22.5;
x++;
}
}
task fire2{
let x = 0;
let dir = 0;
loop{
while(x<36){
CreateShotA(1,GetEnemyX+20*cos(dir),GetEnemyY+20*sin(dir),0);
SetShotDataA(1,0,1,dir,-0.2,0,1,AQUA23);
FireShot(1);
CreateShotA(2,GetEnemyX+20*cos(dir),GetEnemyY+20*sin(dir),0);
SetShotDataA(2,0,1,dir,-0,2,0,1,AQUA23);
FireShot(2);
dir+=360/36;
x++;
}
x = 0;
dir = 0;
wait(90);
yield;
}
}
// object bullet task
task superbullet(x,y,v,dir,graphic,delay){
let obj = Obj_Create(OBJ_SHOT);
Obj_SetPosition(obj,x,y);
Obj_SetSpeed(obj,v);
Obj_SetAngle(obj,dir);
ObjShot_SetGraphic(obj,graphic);
ObjShot_SetDelay(obj,0);
ObjShot_SetBombResist(obj,true);
while(!Obj_BeDeleted(obj)){
wait(15);
Obj_SetSpeed(obj,0);
Concentration02(15);
wait(45);
ObjShot_SetGraphic(obj,RED03);
loop(8){
CreateLaser01(Obj_GetX(obj),Obj_GetY(obj),4,dir,300,10,BLUE01,0);
dir+=360/8;
}
wait(60);
ObjShot_FadeDelete(obj);
yield;
}
}
}
}
Apparently something is wrong with SetShotDataA. I have the 8 arguments. Should there be a function before hand telling danmakufu what SetShotData is?