Author Topic: Danmakufu Q&A/Problem Thread  (Read 172195 times)

Re: Danmakufu Q&A/Problem Thread
« Reply #660 on: September 09, 2009, 12:06:30 AM »
<3

Re: Danmakufu Q&A/Problem Thread
« Reply #661 on: September 09, 2009, 04:21:28 PM »
Doublepost, bitches.

How does @Background work and what functions can be passed in it?

Stuffman

  • *
  • We're having a ball!
Re: Danmakufu Q&A/Problem Thread
« Reply #662 on: September 09, 2009, 04:44:30 PM »
Functionally I'm pretty sure @Background is exactly the same as @DrawLoop, except in terms of priority. @Background is executed before @DrawLoop so anything you draw in it will be below all other graphics. Also, I think @Background might have less priority in terms of processor power? When I hit the fast forward key the background doesn't move as fast as the play field, or something like that.

@Background is really more for organization purposes, clarifying what's stage graphics and what's character graphics. It's also unusual to use @Background in a spellcard script, as making a background in a stage script will pass it to any spellcards.

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: Danmakufu Q&A/Problem Thread
« Reply #663 on: September 09, 2009, 05:04:31 PM »
It's also unusual to use @Background in a spellcard script, as making a background in a stage script will pass it to any spellcards.
What if you want to change the background after a few spellcards, like with Marisa's/Reimu's IN "running away". CommonData?

Stuffman

  • *
  • We're having a ball!
Re: Danmakufu Q&A/Problem Thread
« Reply #664 on: September 09, 2009, 05:18:04 PM »
Well in IN's case it would actually be easy because technically the first part of the fight is a midboss, since it ends and you go into normal stage mode again; you would just set a variable in the stage script at that point to make the background behave differently.

If you wanted to change the background in the middle of a plural file though...well personally I would just use commondata for the stage @Background to reference, but yeah you could put a special background into the spellcard. Though that does raise the question to me, will spellcard @Background positions carry over between spellcards or will they reset each time a new attack comes up? I would assume they don't so that's another reason to save @Background for the stage script.

Re: Danmakufu Q&A/Problem Thread
« Reply #665 on: September 09, 2009, 07:30:17 PM »
I asked because I can't draw text in @Background for a stage script. Thought it might be different.

Re: Danmakufu Q&A/Problem Thread
« Reply #666 on: September 10, 2009, 12:34:33 AM »
is there a way to make a bullet start at..lets say x=200, is there a way i can like make it fire +10 every time? so it would first fire at 200, then 210, 220, 230...and so on an so on?

Drake

  • *
Re: Danmakufu Q&A/Problem Thread
« Reply #667 on: September 10, 2009, 12:41:10 AM »
ascent(i in 0..10){
    CreateShot01(200+(i*10), 0, 3, 0, RED01, 5);
}

add pauses and such

A Colorful Calculating Creative and Cuddly Crafty Callipygous Clever Commander
- original art by Aiけん | ウサホリ -

Henry

  • The observer
  • Exploring to the new world of Danmaku
Re: Danmakufu Q&A/Problem Thread
« Reply #668 on: September 10, 2009, 02:35:20 AM »
Can anyone tell me about how to make Talking events in Danmakufu, is the 'yield;' statement required? (i'm totally lost)
Old/Forgotten member.

Old Patchouli Project was outdated but new one is in progress.

Re: Danmakufu Q&A/Problem Thread
« Reply #669 on: September 10, 2009, 02:38:40 AM »

Henry

  • The observer
  • Exploring to the new world of Danmaku
Re: Danmakufu Q&A/Problem Thread
« Reply #670 on: September 10, 2009, 02:53:59 AM »
However, this script is non-functional (boss image won't display)

Code: [Select]
script_enemy_main{
   let ImgBoss = "..\images\patchouli.png";
   let bg = "";
   let frame=0;
   SetX(GetCenterX);
   SetY(GetClipMinY+120);
   @Initialize{
      SetLife(1);
      SetDamageRate(0,0);
      LoadGraphic(ImgBoss);
      CreateEventFromScript("talk");
      MagicCircle(false);
   }

   @MainLoop{
   }
   @DrawLoop{
      if(frame>50){
      LoadGraphic(ImgBoss);
      SetTexture(ImgBoss);
      SetGraphicAngle(0, 0, 0);
      SetGraphicRect(49*floor(2-absolute(frame/15-2)), 0,49*floor(3-absolute(frame/15-2)), 80);
      SetGraphicScale(1, 1);
      if(frame>0){
         DrawGraphic(GetX, GetY+sin(frame*3)*10);
      }else{
         DrawGraphic(GetX, GetY);
      }
      }
      frame++;
   }
}

script_event talk{
   let imgPatchy = "..\images\imgPatchy.png";
   let imgReimu = "..\images\imgReimu.png";
   let imgMarisa = "..\images\imgMarisa.png";
   @MainLoop{
alternative( GetPlayerType() )
case( MARISA_A, MARISA_B ){
   TextOut("\c[BLUE]...Hey...");
   SetChar(RIGHT,imgPatchy);
           SetGraphicRect(RIGHT,1,1,127,255);
   MoveChar(RIGHT,FRONT);
           SetNameFromText(RIGHT,TEXT_RED,"Patchouli Knowledge","The Unmoving Great Library");
   TextOut("\c[BLUE]Hi Marisa!\nYou want to 'borrow' books again?");
           DeleteName(RIGHT);
   SetChar(LEFT,imgMarisa);
           SetGraphicRect(LEFT,127,1,255,255);
           MoveChar(LEFT,FRONT);
   MoveChar(RIGHT,BACK);
   TextOut("\c[RED]Well... You seem to want to aruge it a lot...");
   TextOut("\c[RED]In fact, I am treated as a thief each time I enter the mansion.");
   TextOut("\c[RED]Even the Aya accused me of that!!!");
           MoveChar(RIGHT,FRONT);
   MoveChar(LEFT,BACK);
   SetChar(RIGHT,imgPatchy);
           SetGraphicRect(RIGHT,127,1,255,255);
   TextOut("\c[BLUE]You are.");
           MoveChar(LEFT,FRONT);
   MoveChar(RIGHT,BACK);
   SetChar(LEFT,imgMarisa);
           SetGraphicRect(LEFT,1,1,127,255);
   TextOut("\c[RED]Anyway, I'll be free to enter or leave this mansion freely if I defeat you.");
   TextOut("\c[RED]And every time along with my leaving, I'll borrow 10 books.");
           MoveChar(RIGHT,FRONT);
   MoveChar(LEFT,BACK);
           SetGraphicRect(RIGHT,1,1,127,255);
   SetChar(RIGHT,imgPatchy);
   TextOut("\c[BLUE]You must be dreaming.\nYou won't defeat me.");
           MoveChar(LEFT,FRONT);
   MoveChar(RIGHT,BACK);
   SetChar(LEFT,imgMarisa);
           SetGraphicRect(LEFT,127,1,255,255);
   TextOut("\c[RED]We'll see. Just like I defeated you many times ago!");
           End();
}
   }
}

All images have been declared properly but when I use Marisa, the boss image won't display. :(
Old/Forgotten member.

Old Patchouli Project was outdated but new one is in progress.

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: Danmakufu Q&A/Problem Thread
« Reply #671 on: September 10, 2009, 07:56:06 AM »
You are not loading your graphics. Where is your @initialize?.

Code: [Select]
script_event showdown{
let CSD = GetCurrentScriptDirectory;

let ReiNorm = CSD ~ "system\ReiNorm.png";
let ReiBoos = CSD ~ "system\ReiBoos.png";
let ReiHo = CSD ~ "system\ReiHo.png";
let ReiOk = CSD ~ "system\ReiOk.png";
let ReiTel = CSD ~ "system\ReiTel.png";
let ReiSch = CSD ~ "system\ReiSch.png";
let ReiOpm = CSD ~ "system\ReiOpm.png";
let ReiAtt = CSD ~ "system\ReiAtt.png";

let AfroNorm = CSD ~ "system\AfroNorm.png";
let AfroSch = CSD ~ "system\AfroSch.png";
let AfroBoos = CSD ~ "system\AfroBoos.png";

@Initialize{    <-------- THIS IS NEEDED YO.
LoadGraphic(ReiNorm);   <----- LOADZ ZE GRAPHICS.
LoadGraphic(ReiHo);
LoadGraphic(ReiBoos);
LoadGraphic(ReiOk);
LoadGraphic(ReiTel);
LoadGraphic(ReiSch);
LoadGraphic(ReiOpm);
LoadGraphic(ReiAtt);

LoadGraphic(AfroNorm);
LoadGraphic(AfroSch);
LoadGraphic(AfroBoos);
}

@MainLoop{
if(GetPlayerType==REIMU_A || GetPlayerType==REIMU_B){
SetChar(LEFT,ReiHo);SetGraphicRect(LEFT,0,0,128,256);
MoveChar(LEFT,FRONT);
TextOutA("\c[RED]I can't see a thing. Is this really the place Marisa told me?");
MoveChar(LEFT,BACK);
TextOutA("\c[BLUE]A Shrine Maiden? Ha ha ha ha!");
SetChar(LEFT,ReiBoos);SetGraphicRect(LEFT,0,0,128,256);
MoveChar(LEFT,FRONT);

Don't forget to end with @Finalize also deleting them from memory.

Henry

  • The observer
  • Exploring to the new world of Danmaku
Re: Danmakufu Q&A/Problem Thread
« Reply #672 on: September 10, 2009, 12:06:14 PM »
This is the edited code, but the ImgBoss does not show up (it exists).
Code: [Select]
script_enemy_main{
   let ImgBoss = "..\images\patchouli.png";
   let bg = "";
   let frame=0;
   SetX(GetCenterX);
   SetY(GetClipMinY+120);
   @Initialize{
      SetLife(1);
      SetDamageRate(0,0);
      LoadGraphic(ImgBoss);
      CreateEventFromScript("talk");
      MagicCircle(false);
   }

   @MainLoop{
      yield;
   }
   @DrawLoop{
      if(frame>50){
         LoadGraphic(ImgBoss);
         SetTexture(ImgBoss);
         SetGraphicAngle(0, 0, 0);
         SetGraphicRect(49*floor(2-absolute(frame/15-2)), 0,49*floor(3-absolute(frame/15-2)), 80);
         SetGraphicScale(1, 1);
         DrawGraphic(GetX, GetY+sin(frame*3)*10);
      }
      frame++;
   }
   @Finalize{
      DeleteGraphic(ImgBoss);
   }
}

script_event talk{
   let imgPatchy = "..\images\imgPatchy.png";
   let imgReimu = "..\images\imgReimu.png";
   let imgMarisa = "..\images\imgMarisa.png";
   @Initialize{
      LoadGraphic(imgPatchy);
      LoadGraphic(imgReimu);
      LoadGraphic(imgMarisa);
   }
   @MainLoop{
alternative( GetPlayerType() )
/*case( REIMU_A, REIMU_B ){
   TextOut("\c[BLUE]Hey, I know you...");
   SetChar(RIGHT,imgCirno);
           SetGraphicRect(RIGHT,1,1,127,255);
   MoveChar(RIGHT,FRONT);
           SetNameFromText(RIGHT,TEXT_RED,"Cirno","Math Teacher");
   TextOut("\c[BLUE]Hey Rumia!\nHow are you?");
           DeleteName(RIGHT);
   SetChar(LEFT,imgRumia);
           SetGraphicRect(LEFT,127,1,255,255);
           MoveChar(LEFT,FRONT);
   MoveChar(RIGHT,BACK);
   TextOut("\c[RED]Let's see...\nI'm hungry!");
   SetChar(LEFT,imgRumia2);
           SetGraphicRect(LEFT,1,1,127,255);
   TextOut("\c[RED]May I eat you?");
           MoveChar(RIGHT,FRONT);
   MoveChar(LEFT,BACK);
           SetGraphicRect(RIGHT,127,1,255,255);
   TextOut("\c[BLUE]No...");
           MoveChar(LEFT,FRONT);
   MoveChar(RIGHT,BACK);
   SetChar(LEFT,imgRumia);
           SetGraphicRect(LEFT,1,1,127,255);
   TextOut("\c[RED]Anyway, I'm lost here.\nWhere AM I?");
           MoveChar(RIGHT,FRONT);
   MoveChar(LEFT,BACK);
           SetGraphicRect(RIGHT,1,1,127,255);
   TextOut("\c[BLUE]Seems we're in space!\nCool, isn't it?");
           MoveChar(LEFT,FRONT);
   MoveChar(RIGHT,BACK);
   SetChar(LEFT,imgRumia2);
           SetGraphicRect(LEFT,127,1,255,255);
   TextOut("\c[RED]Hell, no!");
   SetChar(LEFT,imgRumia);
           SetGraphicRect(LEFT,1,1,127,255);
   TextOut("\c[RED]If you don't mind I'm\ngoing to find the cause of this.");
           MoveChar(RIGHT,FRONT);
   MoveChar(LEFT,BACK);
   TextOut("\c[BLUE]I found out already...\nWhen remilia was defeated...");
   TextOut("\c[BLUE]She ordered Sakuya to warp a planet\nin front of the sun to block the light.");
   TextOut("\c[BLUE]It seems Sakuya accidently \nwarped us into the infinite, too.");
           End();
}*/
case( MARISA_A, MARISA_B ){
   TextOut("\c[BLUE]...Hey...");
   SetChar(RIGHT,imgPatchy);
           SetGraphicRect(RIGHT,1,1,127,255);
   MoveChar(RIGHT,FRONT);
           SetNameFromText(RIGHT,TEXT_RED,"Patchouli Knowledge","The Unmoving Great Library");
   TextOut("\c[BLUE]Hi Marisa!\nYou want to 'borrow' books again?");
           DeleteName(RIGHT);
   SetChar(LEFT,imgMarisa);
           SetGraphicRect(LEFT,127,1,255,255);
           MoveChar(LEFT,FRONT);
   MoveChar(RIGHT,BACK);
   TextOut("\c[RED]Well... You seem to want to aruge it a lot...");
   TextOut("\c[RED]In fact, I am treated as a thief each time I enter the mansion.");
   TextOut("\c[RED]Even the Aya accused me of that!!!");
           MoveChar(RIGHT,FRONT);
   MoveChar(LEFT,BACK);
   SetChar(RIGHT,imgPatchy);
           SetGraphicRect(RIGHT,127,1,255,255);
   TextOut("\c[BLUE]You are.");
           MoveChar(LEFT,FRONT);
   MoveChar(RIGHT,BACK);
   SetChar(LEFT,imgMarisa);
           SetGraphicRect(LEFT,1,1,127,255);
   TextOut("\c[RED]Anyway, I'll be free to enter or leave this mansion freely if I defeat you.");
   TextOut("\c[RED]And every time along with my leaving, I'll borrow 10 books.");
           MoveChar(RIGHT,FRONT);
   MoveChar(LEFT,BACK);
           SetGraphicRect(RIGHT,1,1,127,255);
   SetChar(RIGHT,imgPatchy);
   TextOut("\c[BLUE]You must be dreaming.\nYou won't defeat me.");
           MoveChar(LEFT,FRONT);
   MoveChar(RIGHT,BACK);
   SetChar(LEFT,imgMarisa);
           SetGraphicRect(LEFT,127,1,255,255);
   TextOut("\c[RED]We'll see. Just like I defeated you many times ago!");
           End();
}
yield;
   }
   @Finalize{
      DeleteGraphic(imgMarisa);
      DeleteGraphic(imgPatchy);
      DeleteGraphic(imgReimu);
   }
}
Old/Forgotten member.

Old Patchouli Project was outdated but new one is in progress.

Drake

  • *
Re: Danmakufu Q&A/Problem Thread
« Reply #673 on: September 10, 2009, 03:07:24 PM »
You have two dots in your main folder locator thingy. It's not "..\etc", it's ".\etc".

A Colorful Calculating Creative and Cuddly Crafty Callipygous Clever Commander
- original art by Aiけん | ウサホリ -

Chronojet ⚙ Dragon

  • The Oddity
  • 今コソ輝ケ、我ガ未来、ソノ可能性!!
Re: Danmakufu Q&A/Problem Thread
« Reply #674 on: September 10, 2009, 11:02:36 PM »
I believe there's no way to change the difficulty in the middle of a script.
Anways... :yukkuri:

Re: Danmakufu Q&A/Problem Thread
« Reply #675 on: September 10, 2009, 11:42:24 PM »
I believe there's no way to change the difficulty in the middle of a script.
Anways... :yukkuri:
Uh actually I'm pretty sure it's possible. Depends on how you want to do it though.

Henry

  • The observer
  • Exploring to the new world of Danmaku
Re: Danmakufu Q&A/Problem Thread
« Reply #676 on: September 11, 2009, 12:18:43 AM »
I believed that .\ and ..\ are the same, and it worked for my other scripts (using the same images and resources in the same folder)
Old/Forgotten member.

Old Patchouli Project was outdated but new one is in progress.

Chronojet ⚙ Dragon

  • The Oddity
  • 今コソ輝ケ、我ガ未来、ソノ可能性!!
Re: Danmakufu Q&A/Problem Thread
« Reply #677 on: September 11, 2009, 02:52:46 AM »
I believe there's no way to change the difficulty in the middle of a script.
Anways... :yukkuri:
Uh actually I'm pretty sure it's possible. Depends on how you want to do it though.

Oh, I mean the text displayed by #PlayLevel[blah blah blah].

Is it changable mid-game?
« Last Edit: September 11, 2009, 06:10:47 PM by AlwaysThe⑨ »

Re: Danmakufu Q&A/Problem Thread
« Reply #678 on: September 11, 2009, 03:00:21 AM »
I believe there's no way to change the difficulty in the middle of a script.
Anways... :yukkuri:
Uh actually I'm pretty sure it's possible. Depends on how you want to do it though.

Oh, I mean the text displayed by #PlayLevel[blah blah blah].

Is it changable mid-game?
Midscript I guess not, but you could have a stage script with multiple spellcard scripts in it, and have different #PlayLevel strings for each spellcard or something.

Re: Danmakufu Q&A/Problem Thread
« Reply #679 on: September 11, 2009, 03:06:45 AM »
im having trouble using Tasks now...
Im trying to get this task to work and it wont >_< the script_enemy_main
error comes up.. here is the script:

Code: [Select]
#TouhouDanmakufu
#Title[Task & Loop Test]
#Text[Task Test]
#Player[FREE]
#ScriptVersion[2]

script_enemy_main {
    let frame = 0;
    let angle = 0;
    let BossImage = "script\img\ExRumia.png";
    let BossCutIn = "script\img\ExRumia.png";
    @Initialize {
        LoadGraphic(BossImage);
        SetLife(100);
        SetDamageRate(10, 10);
        SetTimer(50);
SetMovePosition02(GetCenterX, GetCenterY - 100, 120);
        SetInvincibility(30);
        CutIn(YOUMU, "Spellcard Name", BossCutIn, 0, 0, 200, 600);
        SetScore(500000);
        SetEnemyMarker(true);
        SetDurableSpellCard;
        Concentration01(60);
        Concentration02(60);
        MagicCircle(false);
        SetEffectForZeroLife(180, 100, 1);
    }

@MainLoop{
SetCollisionA(GetX, GetY, 32);
SetCollisionB(GetX, GetY, 16);
frame++;

if(frame==10){

loop(100){
CreateShot01(GetX, GetY, 3, 180+angle, BLUE12, 0);
angle += 180/100;

}

angle = 0;
frame = 0;
}
if(frame==60){
Bullet(GetX, GetY, 3, 10);
yeild;
frame = 0;
}
}


    @DrawLoop {
        SetTexture(BossImage);
        DrawGraphic(GetX, GetY);
       
    }

    @Finalize {
    }
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, RED01);
      ObjShot_SetDelay  (obj, 0);
      ObjShot_SetBombResist (obj, true);

      while(Obj_BeDeleted(obj)==false) {

              if(Obj_GetX(obj)<GetClipMinX) {
                     Obj_SetAngle(obj, 180 - Obj_GetAngle(obj) );
                     Obj_SetX(obj,  Obj_GetX(obj) + 0.1);
              }

              if(Obj_GetX(obj)>GetClipMaxX) {
                     Obj_SetAngle(obj, 180 - Obj_GetAngle(obj) );
                     Obj_SetX(obj,  Obj_GetX(obj) - 0.1);
              }

              yield;
       }




Henry

  • The observer
  • Exploring to the new world of Danmaku
Re: Danmakufu Q&A/Problem Thread
« Reply #680 on: September 11, 2009, 03:09:10 AM »
Yuo misspelt to yield; into yeild; in the @MainLoop and a } is missing.
« Last Edit: September 11, 2009, 03:12:39 AM by Henry »
Old/Forgotten member.

Old Patchouli Project was outdated but new one is in progress.

Drake

  • *
Re: Danmakufu Q&A/Problem Thread
« Reply #681 on: September 11, 2009, 03:09:29 AM »
It would help if you at least looked at your script instead of just coming here going "oh no it doesn't work immediately"

"yield" is spelled wrong in the MainLoop, and should be called every frame, not just at 60.
Also, you're missing a } at the end of your script.

A Colorful Calculating Creative and Cuddly Crafty Callipygous Clever Commander
- original art by Aiけん | ウサホリ -

Henry

  • The observer
  • Exploring to the new world of Danmaku
Re: Danmakufu Q&A/Problem Thread
« Reply #682 on: September 11, 2009, 03:16:47 AM »
Btw, after frame==10, you set frame=0.
Then the if(frame==60){} can never be run.

Also:

Code: [Select]
script_enemy_main{
   let ImgBoss = GetCurrentScriptDirectory~"images\patchouli.png";
   let bg = "";
   let frame=0;
   let event=1;
   SetX(GetCenterX);
   SetY(GetClipMinY+120);
   @Initialize{
      SetLife(1);
      SetDamageRate(0,0);
      CreateEventFromScript("talk");
      MagicCircle(false);
   }

   @MainLoop{
      frame++;
      if(frame==50){
loop(3){
    Concentration01(100);
    Explosion01(GetX,GetY,5.5,0.2,255);
    SetColor(255,255,255);
}
      }
      if(event==0){
SetLife(-1);
      }
   }
   @DrawLoop{
      if(frame>75){
         LoadGraphic(ImgBoss);
         SetTexture(ImgBoss);
         SetGraphicAngle(0, 0, 0);
         SetGraphicRect(49*floor(2-absolute(frame/15-2)), 0,49*floor(3-absolute(frame/15-2)), 80);
         SetGraphicScale(1, 1);
         DrawGraphic(GetX, GetY+sin(frame*3)*10);
      }
   }
   @Finalize{
      DeleteGraphic(ImgBoss);
   }
}

script_event talk{
   let imgPatchy = "..\images\imgPatchy.png";
   let imgReimu = "..\images\imgReimu.png";
   let imgMarisa = "..\images\imgMarisa.png";
   let event=1;
   @Initialize{
      LoadGraphic(imgPatchy);
      LoadGraphic(imgReimu);
      LoadGraphic(imgMarisa);
   }
   @MainLoop{
alternative( GetPlayerType() )
case( MARISA_A, MARISA_B ){
   TextOutA("\c[BLUE]...Hey...");
   SetChar(RIGHT,imgPatchy);
           SetGraphicRect(RIGHT,1,1,127,255);
   MoveChar(RIGHT,FRONT);
           SetNameFromText(RIGHT,TEXT_RED,"Patchouli Knowledge","The Unmoving Great Library");
   TextOutA("\c[BLUE]Hi Marisa!\nYou want to 'borrow' books again?");
           DeleteName(RIGHT);
   SetChar(LEFT,imgMarisa);
           SetGraphicRect(LEFT,127,1,255,255);
           MoveChar(LEFT,FRONT);
   MoveChar(RIGHT,BACK);
   TextOutA("\c[RED]Well... You seem to want to aruge it a lot...");
   TextOutA("\c[RED]In fact, I am treated as a thief each time I enter the mansion.");
   TextOutA("\c[RED]Even the Aya accused me of that!!!");
           MoveChar(RIGHT,FRONT);
   MoveChar(LEFT,BACK);
   SetChar(RIGHT,imgPatchy);
           SetGraphicRect(RIGHT,127,1,255,255);
   TextOutA("\c[BLUE]You are.");
           MoveChar(LEFT,FRONT);
   MoveChar(RIGHT,BACK);
   SetChar(LEFT,imgMarisa);
           SetGraphicRect(LEFT,1,1,127,255);
   TextOutA("\c[RED]Anyway, I'll be free to enter or leave this mansion freely if I defeat you.");
   TextOutA("\c[RED]And every time along with my leaving, I'll borrow 10 books.");
           MoveChar(RIGHT,FRONT);
   MoveChar(LEFT,BACK);
           SetGraphicRect(RIGHT,1,1,127,255);
   SetChar(RIGHT,imgPatchy);
   TextOutA("\c[BLUE]You must be dreaming.\nYou won't defeat me.");
           MoveChar(LEFT,FRONT);
   MoveChar(RIGHT,BACK);
   SetChar(LEFT,imgMarisa);
           SetGraphicRect(LEFT,127,1,255,255);
   TextOutA("\c[RED]We'll see. Just like I defeated you many times ago!");
}
End();
        event=0;
   }
   @Finalize{
      DeleteGraphic(imgMarisa);
      DeleteGraphic(imgPatchy);
      DeleteGraphic(imgReimu);
   }
}

The enemy is displayed but the event doesn't end. The whole plural script stucks there. Why?
« Last Edit: September 11, 2009, 03:43:43 AM by Henry »
Old/Forgotten member.

Old Patchouli Project was outdated but new one is in progress.

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: Danmakufu Q&A/Problem Thread
« Reply #683 on: September 11, 2009, 06:06:26 AM »
The enemy is displayed but the event doesn't end. The whole plural script stucks there. Why?
Your dialogue file is setup terribly wrong

1) Give the boss 1 or 10 life.
2) Remove that End(); line. It is wrong.
3) In the 'event_script' section set the following line where you want the dialogue to end and the fight to start:  SetStep(x);  where x is a number. Example: SetStep(1); ( multiple steps are possible ).
4) In the 'enemy_script_main' set an if-statement listening to the step. if(GetEventStep==1){AddLife-50;}

So what happens here? The dialogue is spoken and SetStep is set to '1'. In the MainLoop, the statement will become true, thus it will subtract 50 life off the boss. The boss is 'killed' and the next line in the plural script is called.

Your plural script should also look like this:
#ScriptPath[.\Dialogue01.txt]  <--- Dialogue
#ScriptPath[.\Noncard01.txt]
#ScriptPath[.\Spellcard01.txt]
#ScriptNextStep
..

See my Afro boss which is done excactly the same.

( ps didn't I explained you this before somewhere on page 17 or so ? )
« Last Edit: September 11, 2009, 07:34:46 AM by Helepolis »

Henry

  • The observer
  • Exploring to the new world of Danmaku
Re: Danmakufu Q&A/Problem Thread
« Reply #684 on: September 11, 2009, 10:33:46 AM »
The problem is finally solved...

(It seems that it was not me and I didn't intend to make a talking script as I did not even know about yield;)

Thank, Helepolis
Old/Forgotten member.

Old Patchouli Project was outdated but new one is in progress.

Kylesky

  • *The Unknown*
  • Local Unbalanced Danmakufu Idiot Scripter
    • My useless youtube account... (will be useful in the future *I promise*)
Re: Danmakufu Q&A/Problem Thread
« Reply #685 on: September 12, 2009, 03:20:47 AM »
I have a question... how do you make the screen shake? like when minamitu murasa's anchors hit the edge of the screen... tnx in advance
Danmakufu Script Thread :V Latest Script: Intertwining Mechanical Intervention (temp name)

Yooooouuutuuuubeeee Channel Latest Video: Contest #8 Entry

Re: Danmakufu Q&A/Problem Thread
« Reply #686 on: September 12, 2009, 03:25:39 AM »
My guess is you have to basically redraw everything; the background, the boss, the player, etc. I'm not sure how you would get the bullets to shake unless you used object bullets or something... But yeah if you tried it this way it would take ages.

Chronojet ⚙ Dragon

  • The Oddity
  • 今コソ輝ケ、我ガ未来、ソノ可能性!!
Re: Danmakufu Q&A/Problem Thread
« Reply #687 on: September 12, 2009, 03:40:22 AM »
I have a question... how do you make the screen shake? like when minamitu murasa's anchors hit the edge of the screen... tnx in advance
Code: [Select]
let variable = 0;
let shakeboolean = false;
let xshake = 0;
let yshake = 0;

...

@Initialize {
...
LoadImage("script\img\thisistheimage.png");
...
}
@MainLoop {
...
if(insert some conditions here) {
shakeboolean = true;
} else {
shakeboolean = false;
}
if(shakeboolean == true) {
statements to alter xshake and yshake;
} else {
xshake = 0; yshake = 0;
}
...
}

...

@BackGround {
SetTexture("script\img\thisistheimage.png");
SetGraphicRect(left, top, right, bottom);
otherstuff;
DrawGraphic(x-coordinate to put the center of the image + xshake, y-coordinate to put the center of the image + yshake);

I think...  :-[

Re: Danmakufu Q&A/Problem Thread
« Reply #688 on: September 12, 2009, 03:43:06 AM »
That would only make the background shake, not the whole screen.

Kylesky

  • *The Unknown*
  • Local Unbalanced Danmakufu Idiot Scripter
    • My useless youtube account... (will be useful in the future *I promise*)
Re: Danmakufu Q&A/Problem Thread
« Reply #689 on: September 12, 2009, 04:16:09 AM »
Thanks! even though it's only making the background shake... I think I could use this... I don't really need the other things to shake anymore...  ;D
Danmakufu Script Thread :V Latest Script: Intertwining Mechanical Intervention (temp name)

Yooooouuutuuuubeeee Channel Latest Video: Contest #8 Entry