Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #TouhouDanmakufu[Single]
- #ScriptVersion[3]
- #Title["SampleA01"]
- #Text["SampleA01:Shooting Bullets Straight Down"]
- #Player["./Player/Arisa.txt"]
- #include"script/default_system/Default_ShotConst.txt"
- //----------------------------------------------------
- let objEnemy;
- let frame = 0;
- let disk;
- let objE;
- let cut = GetCurrentScriptDirectory ~ "cirnocut.png";
- @Event
- {
- alternative(GetEventType())
- case(EV_REQUEST_LIFE)
- {
- SetScriptResult(8000);
- }
- }
- @Initialize
- {
- SetPlayerLife(99);
- objEnemy = ObjEnemy_Create(OBJ_ENEMY_BOSS);
- ObjEnemy_Regist(objEnemy);
- let imgExRumia = GetCurrentScriptDirectory ~ "/img/51906.png";
- ObjPrim_SetTexture(objEnemy, imgExRumia);
- ObjSprite2D_SetSourceRect(objEnemy, 245, 797, 283, 852);
- ObjSprite2D_SetDestCenter(objEnemy);
- Obj_SetRenderPriorityI(GetPlayerObjectID,99);
- let cx = GetStgFrameWidth() / 2;
- ObjMove_SetDestAtFrame(objEnemy, cx, 60, 1);
- maintask;
- }
- @MainLoop
- {
- yield;
- }
- task maintask{
- renderBG;
- Enemi;
- ShotTask;
- }
- task Enemi{
- while(ObjEnemy_GetInfo(objEnemy, INFO_LIFE) > 0){ let ex = ObjMove_GetX(objEnemy);
- let ey = ObjMove_GetY(objEnemy); ObjEnemy_SetIntersectionCircleToShot(objEnemy, ex, ey, 32); yield;}
- Obj_Delete(objEnemy);
- CloseScript(GetOwnScriptID());
- return;
- }
- task renderBG{
- let path = GetCurrentScriptDirectory ~ "/img/PC Computer - Touhou Fuujinroku Mountain of Faith - Stage Tilesets and Textures.png";
- let bg = ObjPrim_Create(OBJ_SPRITE_2D);
- ObjPrim_SetTexture(bg,path);
- ObjSprite2D_SetSourceRect(bg,1290,890,1799,1335);
- ObjSprite2D_SetDestRect(bg,0,0,GetStgFrameWidth,GetStgFrameHeight);
- Obj_SetRenderPriorityI(bg,21);
- }
- task ShotTask{
- Shots;
- loop(300){yield;}
- Shots2;
- loop(300){yield;}
- Shots3;
- loop(600){yield;}
- Shots;
- Shots2;
- Shots3;
- loop(300){yield;}
- Shots;
- Shots2;
- Shots3;
- loop(300){yield;}
- Shots;
- Shots2;
- Shots3;
- loop(300){yield;}
- Shots;
- Shots2;
- Shots3;
- loop(300){yield;}
- Shots;
- Shots2;
- Shots3;
- loop(300){yield;}
- }
- task Shots {
- let x=0;
- let y=0;
- while(ObjEnemy_GetInfo(objEnemy, INFO_LIFE) > 0){
- loop(50){
- let obj = ObjShot_Create(OBJ_SHOT);
- ObjShot_SetDelay(obj,10);
- ObjShot_SetGraphic(obj,DS_SCALE_PURPLE);
- ObjMove_SetPosition(obj,x,y);
- ObjMove_SetAngle(obj,rand(0,360));
- ObjMove_SetSpeed(obj,0);
- ObjShot_Regist(obj);
- x+=10;
- y+=5+rand(1,3);
- ObjMove_AddPatternA1(obj,70,3,rand(0,360));
- }
- loop(300){yield;}
- x=0;
- y=0;
- yield;}
- }
- task Shots2 {
- let x=500;
- let y=0;
- while(ObjEnemy_GetInfo(objEnemy, INFO_LIFE) > 0){
- loop(50){
- let obj = ObjShot_Create(OBJ_SHOT);
- ObjShot_SetDelay(obj,10);
- ObjShot_SetGraphic(obj,DS_SCALE_WHITE);
- ObjMove_SetPosition(obj,x,y);
- ObjMove_SetSpeed(obj,0);
- ObjMove_SetAngle(obj,rand(0,360));
- ObjShot_Regist(obj);
- x-=10;
- y+=5+rand(1,3);
- ObjMove_AddPatternA1(obj,70,3,rand(0,360));
- }
- loop(300){yield;}
- x=500;
- y=0;
- yield;}
- }
- task Shots3 {
- let x=0;
- let y=100;
- while(ObjEnemy_GetInfo(objEnemy, INFO_LIFE) > 0){
- loop(50){
- let obj = ObjShot_Create(OBJ_SHOT);
- ObjShot_SetDelay(obj,10);
- ObjShot_SetGraphic(obj,DS_SCALE_RED);
- ObjMove_SetPosition(obj,x,y);
- ObjMove_SetSpeed(obj,0);
- ObjMove_SetAngle(obj,rand(0,360));
- ObjShot_Regist(obj);
- x+=10;
- y=100+rand(-5,5);
- ObjMove_AddPatternA1(obj,70,3,rand(0,360));
- }
- loop(300){yield;}
- x=0;
- y=0;
- yield;}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement