Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- script_enemy_main{
- LoadUserShotData("lib/ZUN/ZUN's shotdata.txt");
- let CSD = GetCurrentScriptDirectory;
- let dir = 0;
- let Kona = CSD ~ "System\Kona_Metsuka-Dot.png";
- let Shot0 = GetCurrentScriptDirectory ~ "SE\Shot00.wav";
- let Shot1 = GetCurrentScriptDirectory ~ "SE\Shot01.wav";
- let Shot2 = GetCurrentScriptDirectory ~ "SE\Shot02.wav";
- let BG = CSD ~ "System\Spell-3.png";
- let CutIn = CSD ~ "System\Kona-Cut-in.png";
- @Initialize{
- SetLife(250);
- SetDamageRate(10, 10);
- SetTimer(60);
- SetScore(10000);
- SetInvincibility(60);
- SetEnemyMarker(true);
- SetMovePosition03(GetCenterX,150,2,5);
- LoadGraphic(Kona);
- LoadGraphic(CutIn);
- LoadGraphic(BG);
- mainTask;
- CutIn(YOUMU,"Wind Sign "\""Dropping Hurricanes"\",CutIn,0,0,250,375);
- }
- @MainLoop{
- SetCollisionA(GetX,GetY,15);
- SetCollisionB(GetX,GetY,15);
- yield;
- }
- @DrawLoop{
- SetTexture(Kona);
- SetRenderState(ALPHA);
- SetAlpha(225);
- SetGraphicScale(1,1);
- SetGraphicAngle(0,0,0);
- if(int(GetSpeedX())==0){
- SetGraphicRect(0,0,29,39);
- }
- if(int(GetSpeedX())>0){
- SetGraphicRect(30,0,59,39);
- }
- if(int(GetSpeedX())<0){
- SetGraphicRect(60,0,89,39);
- }
- DrawGraphic(GetX,GetY);
- }
- @BackGround{
- SetTexture(BG);
- SetRenderState(ADD);
- SetGraphicRect(0,0,500,500);
- SetGraphicScale(1,1);
- SetGraphicAngle(0,0,0);
- DrawGraphic(GetCenterX,GetCenterY);
- }
- @Finalize{
- DeleteGraphic(Kona);
- DeleteGraphic(BG);
- DeleteGraphic(CutIn);
- }
- // main task, activates stuff.
- task mainTask{
- wait(60);
- yield;
- fire;
- fire2;
- }
- task fire{
- loop{
- cyclone(rand(1,400),0);
- wait(80);
- cyclone1(rand(1,400),0);
- wait(80);
- }
- }
- task fire2{
- loop(20){
- PlaySE(Shot0);
- Bullet2(GetX,GetY,3,dir);
- dir+=360/20;
- }
- wait(60);
- dir++;
- dir++;
- dir++;
- dir++;
- dir++;
- dir++;
- dir++;
- dir++;
- dir++;
- fire2;
- }
- task Bullet(x, y, v, angle) {
- let obj=Obj_Create(OBJ_SHOT);
- Obj_SetPosition(obj, x, y);
- Obj_SetAngle(obj, angle);
- Obj_SetSpeed(obj, v);
- ObjShot_SetGraphic(obj, 7);
- ObjShot_SetDelay (obj, 20);
- ObjShot_SetBombResist (obj, true);
- while(Obj_BeDeleted(obj)==false) {
- Obj_SetAngle(obj, Obj_GetAngle(obj) + 1.3);
- Obj_SetPosition(obj, Obj_GetX(obj), Obj_GetY(obj) + 1.4);
- yield;
- }
- }
- function cyclone(x, y){
- ascent(i in 0..10){
- ascent(k in 0..2){
- Bullet(x, y, 0.5*(1+k), i*40);
- }
- }
- }
- task Bullet1(x, y, v, angle) {
- let obj=Obj_Create(OBJ_SHOT);
- Obj_SetPosition(obj, x, y);
- Obj_SetAngle(obj, angle);
- Obj_SetSpeed(obj, v);
- ObjShot_SetGraphic(obj, 9);
- ObjShot_SetDelay (obj, 20);
- ObjShot_SetBombResist (obj, true);
- while(Obj_BeDeleted(obj)==false) {
- Obj_SetAngle(obj, Obj_GetAngle(obj) - 1.3);
- Obj_SetPosition(obj, Obj_GetX(obj), Obj_GetY(obj) + 1.4);
- yield;
- }
- }
- function cyclone1(x, y){
- ascent(i in 0..10){
- ascent(k in 0..2){
- Bullet1(x, y, 0.5*(1+k), i*40);
- }
- }
- }
- task Bullet2(x, y, v, angle) {
- let obj=Obj_Create(OBJ_SHOT);
- Obj_SetPosition(obj, x, y);
- Obj_SetAngle(obj, angle);
- Obj_SetSpeed(obj, v);
- ObjShot_SetGraphic(obj, 92);
- ObjShot_SetDelay (obj, 20);
- ObjShot_SetBombResist (obj, true);
- }
- // wait function
- function wait(w){
- loop(w){ yield; }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement