Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #TouhouDanmakufu
- #Title[Spell 8]
- #Text[An attempt at making a spell]
- #Player[MARISA]
- #ScriptVersion[2]
- script_enemy_main{
- let CSD = GetCurrentScriptDirectory;
- let imgBoss = CSD ~ "system\touhoucharacter1.png";
- let cut = CSD ~ "system\touhoucharacter3.png";
- let bg = CSD ~ "system\trees.png";
- @Initialize{
- SetLife(2500);
- SetTimer(60);
- SetScore(100000);
- SetMovePosition01(GetCenterX,GetCenterY,5);
- LoadGraphic(imgBoss);
- LoadGraphic(cut);
- LoadGraphic(bg);
- CutIn(YOUMU,"...",cut,0,0,360,290);
- mainTask;
- }
- @MainLoop{
- SetCollisionA(GetX,GetY,32);
- SetCollisionB(GetX,GetY,16);
- yield;
- }
- @DrawLoop{
- 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,600,690);
- SetGraphicScale(1,1);
- SetGraphicAngle(0,0,0);
- DrawGraphic(GetCenterX,GetCenterY);
- }
- @Finalize{
- DeleteGraphic(imgBoss);
- DeleteGraphic(cut);
- DeleteGraphic(bg);
- }
- task mainTask{
- yield;
- fire;
- movement;
- }
- task movement{
- loop{
- SetMovePosition02(GetCenterX, GetCenterY-96, 0);
- yield;
- }
- }
- task fire(GetEnemyX, GetEnemyY, 2, GetAngleToPlayer){
- let obj=Obj_Create(OBJ_SHOT);
- Obj_SetPosition(obj, GetEnemyX, GetEnemyY);
- Obj_SetAngle(obj, GetAngleToPlayer);
- Obj_SetSpeed(obj, 2);
- ObjShot_SetGraphic(obj, WHITE03);
- ObjShot_SetDelay (obj, 60);
- ObjShot_SetBombResist (obj, true);
- while(Obj_BeDeleted(obj)==false){
- yield;
- }
- }
- function wait(w){
- loop(w){yield;}
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment