Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #TouhouDanmakufu
- #Title[Testing 123]
- #Text[Don't ask]
- #Image[]
- #BGM[F:\New Folder\script\GcbcSrvlCnst]
- #PlayLevel[Normal]
- #Player[FREE]
- #ScriptVersion[2]
- script_enemy_main{
- let Cirno = "script\tutorial\cirno.png";
- let cut = "script\tutorial\cirnocut.png";
- let bg = "script\tutorial\LAKE.png";
- @Initialize{
- LoadGraphic(Cirno);
- LoadGraphic(cut);
- LoadGraphic(bg);
- SetLife(1000);
- SetMovePosition01(GetCenterX,GetCenterY,5);
- SetTimer(60);
- SetScore(100000);
- CutIn(YOUMU,"Icicle Fall -Easy-",(cut),0,0,300,384);
- mainTask;
- }
- @MainLoop{
- SetCollisionA(GetX,GetY,32);
- SetCollisionB(GetX,GetY,16);
- yield;
- }
- @DrawLoop{
- // data for the boss
- SetTexture(Cirno);
- SetGraphicRect(0,0,100,100);
- SetGraphicScale(0.5,0.5);
- SetGraphicAngle(2,2,2);
- SetRenderState(ALPHA);
- SetAlpha(255);
- DrawGraphic(GetX,GetY);
- }
- @BackGround{
- SetTexture(bg);
- SetGraphicRect(0,0,512,512);
- SetGraphicScale(1,1);
- SetGraphicAngle(0,0,0);
- SetRenderState(ALPHA);
- SetAlpha(255);
- DrawGraphic(GetCenterX,GetCenterY);
- }
- @Finalize{
- // Delete the image from memory
- DeleteGraphic(Cirno);
- DeleteGraphic(bg);
- DeleteGraphic(cut);
- }
- // main task, activates stuff
- task mainTask{
- fire;
- movement;
- yield;}
- spawn;
- task fire{
- loop{
- // regular createshot
- CreateShot01(GetEnemyX,GetEnemyY,3,GetAngleToPlayer,AQUA01,10);
- CreateShot01(GetEnemyX,GetEnemyY,3,GetAngleToPlayer-20,AQUA01,10); CreateShot01(GetEnemyX,GetEnemyY,3,GetAngleToPlayer+20,AQUA01,10);
- CreateShot01(GetEnemyX,GetEnemyY,3,25,RED12,10);
- CreateShot01(GetEnemyX,GetEnemyY,3,155,RED12,10);
- // wait 30 frames
- wait(30);
- yield;}}
- task movement{
- loop{
- SetMovePosition01(GetCenterX-100,120,5);
- wait(120);
- SetMovePosition01(GetCenterX+100,120,5);
- wait(120);
- yield;
- }
- }
- sub spawn{
- CreateEnemyFromScript"itemFam",GetEnemyX,GetEnemyY,0,0,0);
- }
- //wait function
- function wait(w){
- loop(w){yield;}}
- }
- // Familiar
- script_enemy itemFam{
- let slv = "script\tutorial\item_sake.png";
- let dir = 0;
- let r = 80;
- @Initialize{
- SetLife(5000);
- LoadGraphic(slv);
- }
- @MainLoop{
- SetCollisionA(GetX,GetY,16);
- SetCollisionB(GetX,GetY,16);
- yield;
- }
- @DrawLoop{
- SetTexture(slv);
- SetGraphic(0,0,16,16);
- SetGraphicScale(3,3);
- SetGraphicAngle(0,0,0);
- SetRenderState(ALPHA);
- SetAlpha(255);
- DrawGraphic(GetCenterX,GetCenterY);
- }
- @Finalize{
- DeleteGraphic(slv);
- }
- task mainTask{
- loop{
- SetMovePosition03(GetEnemyX+r*cos(dir),GetEnemyY+r*sin(dir),20,10);
- dir++;
- yield;
- }}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement