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

Re: Danmakufu Q&A/Problem Thread II
« Reply #210 on: November 05, 2009, 05:09:51 AM »
let k = 36;
let angle = 0;

loop(k){
   CreateShot01(GetPlayerX + 70*cos(angle), GetPlayerY + 70*sin(angle), 2, angle - 180, RED32, 30);
   angle+=360/k;
}
For some reason I forgot that bullets actually moved on thier own

:VSUPERDERP:V

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: Danmakufu Q&A/Problem Thread II
« Reply #211 on: November 05, 2009, 09:07:56 AM »
Btw quite funny ZUN uses the glowing round bullets as shotdelay effect. He uses it like everywhere. And the lasers in MoF/SA/UFO are spawned with the same bullets except rotating very fast.

Me needs to do some more investigation regarding this.

Fujiwara no Mokou

  • Hourai Incarnate
  • Oh, so this trial of guts is for ME?
    • Profile
Re: Danmakufu Q&A/Problem Thread II
« Reply #212 on: November 05, 2009, 03:29:12 PM »
Did anyone figure out how to spin the camera about Z axis yet?

Blargel

  • RAWR!
  • I'M AN ANGRY LOLI!
Re: Danmakufu Q&A/Problem Thread II
« Reply #213 on: November 05, 2009, 03:48:29 PM »
Did anyone figure out how to spin the camera about Z axis yet?

As far as I can gather, the only way to do this is to rotate the whole world rather than the camera. Unless there's a function missing in the wiki... which is pretty likely.


For example, GetLife is missing. But I'm not sure where to add it or how to word it. There's GetEnemyLife which returns the life left of the boss, and GetLife which returns the life of the enemy that it is being called from. For example, if there is a fairy with 100 life and no boss, calling GetLife in its script will return 100 if it just spawned, and calling GetEnemyLife will return 0.
<WorkingKeine> when i get home i just go to the ps3 and beat people up in blazblue with a loli
<Azure> Keine: Danmakufu helper by day, violent loli by night.

Re: Danmakufu Q&A/Problem Thread II
« Reply #214 on: November 05, 2009, 04:04:17 PM »

Drake

  • *
Re: Danmakufu Q&A/Problem Thread II
« Reply #215 on: November 05, 2009, 04:05:17 PM »
Btw quite funny ZUN uses the glowing round bullets as shotdelay effect. He uses it like everywhere. And the lasers in MoF/SA/UFO are spawned with the same bullets except rotating very fast.

Me needs to do some more investigation regarding this.
IDs 149-155. People tend to use them for actual bullets, but in reality their purpose is only for bullet delay. For all types of bullets, too.

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

Fujiwara no Mokou

  • Hourai Incarnate
  • Oh, so this trial of guts is for ME?
    • Profile
Re: Danmakufu Q&A/Problem Thread II
« Reply #216 on: November 05, 2009, 04:51:10 PM »
As far as I can gather, the only way to do this is to rotate the whole world rather than the camera. Unless there's a function missing in the wiki... which is pretty likely.


Something tells me, you don't have to move the whole world, but the camera instead.

If you've played SA Phantasm, you'll see the camera swerve left and right, and rotate on the Z axis just a bit.  If you look even more closely, it turns counterclockwise a bit as it swerves toward the left wall, and clockwise a bit as it swerves toward the right wall.  I don't know how to do that, but I hope I can find out.




You know what I'm talking about, right?
« Last Edit: November 05, 2009, 05:02:59 PM by Fujiwara no Mokou »

Blargel

  • RAWR!
  • I'M AN ANGRY LOLI!
Re: Danmakufu Q&A/Problem Thread II
« Reply #217 on: November 05, 2009, 05:17:18 PM »
Quote
Something tells me, you don't have to move the whole world, but the camera instead.

If you've played SA Phantasm, you'll see the camera swerve left and right, and rotate on the Z axis just a bit.  If you look even more closely, it turns counterclockwise a bit as it swerves toward the left wall, and clockwise a bit as it swerves toward the right wall.  I don't know how to do that, but I hope I can find out.

(images)

You know what I'm talking about, right?

Yeah, I know. Well if there's a script that's able to do it, someone should look through it and check how its done then.
*proceeds to look for the thread and download it*

EDIT: My internet is being ungodly slow. I'll be able to look through it in like an hour (yup, 4KBps), but it shouldn't be that hard to look through it yourself too.


EDIT2:
Quote
Add it to the new good wiki.

Added.

EDIT3: As far as I can gather, the second parameter of SetViewFrom may somehow control the z-rotation. I'll have to look into this later. It's 2am and should sleep.
« Last Edit: November 06, 2009, 03:42:11 PM by Blargel »
<WorkingKeine> when i get home i just go to the ps3 and beat people up in blazblue with a loli
<Azure> Keine: Danmakufu helper by day, violent loli by night.

Fujiwara no Mokou

  • Hourai Incarnate
  • Oh, so this trial of guts is for ME?
    • Profile
Re: Danmakufu Q&A/Problem Thread II
« Reply #218 on: November 05, 2009, 06:43:34 PM »
Not exactly a question, but I'm so close to getting this magic circle thing down properly, I can almost feel it  ;D



BUT IT WON'T STOP SPINNING AND IT'S DRIVING ME CRAZY AKJFJDKLFAKL;DJKLAKL

Chronojet ⚙ Dragon

  • The Oddity
  • 今コソ輝ケ、我ガ未来、ソノ可能性!!
Re: Danmakufu Q&A/Problem Thread II
« Reply #219 on: November 05, 2009, 06:59:59 PM »
Code: [Select]
#TouhouDanmakufu
#Title[Trig Pattern]
#Text[...WOOT TRIG!!]
#Player[FREE]
#ScriptVersion[2]

script_enemy_main {
    let BossImage = "script\img\ExRumia.png";
    let frame = -120;
    let a = 0;
    let num = 20;
    @Initialize {
        SetLife(2400); SetDamageRate(40, 0);
        SetEnemyMarker(true);
        LoadGraphic(BossImage);
        SetTexture(BossImage);
        SetGraphicRect(0, 0, 64, 64);
        SetMovePosition02(GetCenterX, GetClipMinY+100, 60);
        CutIn(KOUMA,"Danmaku Sign「Made in Danmakufu」", "", 0, 0, 0, 0);
        SetScore(1000000); SetDurableSpellCard;
    }

    @MainLoop {
        SetCollisionA(GetX, GetY, 32); //32 for boss, 10 for fairy
        SetCollisionB(GetX, GetY, 24);//24 for boss, 5 for fairy
        if(frame <= 360 && frame > 0) {
CreateShot01(GetX+100*cos(a+180+90), GetY-100*cos(a+90), 3, -a, RED21, 10);
CreateShot01(GetX+100*cos(a+180+90), GetY-100*cos(a+90), 3, a, RED21, 10);
CreateShot01(GetX-100*cos(a+90), GetY+100*cos(a+90), 3, a, RED21, 10);
CreateShot01(GetX-100*cos(a+90), GetY+100*cos(a+90), 3, -a, RED21, 10);
a+=3;
        }
        if(frame > 420 && frame <= 720) {
CreateShot01(GetX+100*cos(a+180+90), GetY-50*cos(a+90), 3, -a, ORANGE21, 10);
CreateShot01(GetX+100*cos(a+180+90), GetY-50*cos(a+90), 3, a, ORANGE21, 10);
CreateShot01(GetX-100*cos(a-90), GetY+50*cos(a-90), 3, a, ORANGE21, 10);
CreateShot01(GetX-100*cos(a-90), GetY+50*cos(a-90), 3, -a, ORANGE21, 10);
a-=3;
        }
        if(frame == 720) { frame = -60; }
        frame++;
    }

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

    @Finalize {
        DeleteGraphic(BossImage);
    }
}
Came up with this when trying to replicate Roarschach. Doesn't even look like Rorschach at all.
« Last Edit: November 05, 2009, 07:16:53 PM by Always お⑨ »

Re: Danmakufu Q&A/Problem Thread II
« Reply #220 on: November 05, 2009, 07:17:01 PM »
EDIT2:Added.

Let us pray that Blargel has another fit of boredom.



Thanks for the contribution. I love you <3

But now I have to translate it all.
« Last Edit: November 05, 2009, 07:18:57 PM by Naut »

Iryan

  • Ph?nglui mglw?nafh
  • Cat R?lyeh wgah?nagl fhtagn.
Re: Danmakufu Q&A/Problem Thread II
« Reply #221 on: November 05, 2009, 07:32:31 PM »
Not exactly a question, but I'm so close to getting this magic circle thing down properly, I can almost feel it  ;D



BUT IT WON'T STOP SPINNING AND IT'S DRIVING ME CRAZY AKJFJDKLFAKL;DJKLAKL
Well, if I know anything about effect objects, and I don't, then you make the object rotate by calling a function that sets the angle of the objects relative to its actual angle, right? To make it stop spinning in a way that doesn't look stupid, just have the amount the angle rotates by each frame be determined by a variable which is reduced every frame right after the angle setting function. I believe exponential deceleration would be both easier and look better in this case, so just have the angular velocity of your object be vspin and call "vspin=vspin*0.995" or something like that.

Of course, if the angular velocity of them objects doesn't work that way, then I just typed total rubbish, but from looking at the functions in the wiki, I think I may at least not be completely wrong.  :V
« Last Edit: November 05, 2009, 07:35:56 PM by Iryan »
Old Danmakufu stuff can be found here!

"As the size of an explosion increases, the numbers of social situations it is incapable of solving approaches zero."

Fujiwara no Mokou

  • Hourai Incarnate
  • Oh, so this trial of guts is for ME?
    • Profile
Re: Danmakufu Q&A/Problem Thread II
« Reply #222 on: November 05, 2009, 07:55:38 PM »
No no.
It's not the angle that's making it spinning.  In fact, in reality it's not spinning at all.

The angles are all where they are supposed to be.  The thing that's making it spinning is the 30*sin(digit) that I put in there, that gets added to the radius.  See, the SetVertex is in an ascent in order for me to have like 100 some vertices.  The ascent itself is also in a loop.

In the ascent, the digit does digit++;
Then, the whole thing gets added to the real radius of the circle.  Which in this picture, happens to be 0. (That's why it looks like it's stretching toward the center)


In short, some parts of the circle get an extra radius than others, depending on the value of the digit. If it becomes over 180, it resets to 0, since I'm using sine.  This way, I get that constant hill effect.

But because the digit constantly becomes digit++; (which is necessary for the hill-effect)   ,   it also constantly shrinks and enlarges, making it look like it's spinning, when it's not.

Get it?  I could make it so the thing isn't "spinning" by adding an equal negative somewhere in the loop, and the star will be "stayed put", but then the wrap, or the words you can read there, start moving in that "circle".

Re: Danmakufu Q&A/Problem Thread II
« Reply #223 on: November 05, 2009, 08:06:56 PM »
Posting code is usually a key element in getting other people to troubleshoot something for you.

Fujiwara no Mokou

  • Hourai Incarnate
  • Oh, so this trial of guts is for ME?
    • Profile
Re: Danmakufu Q&A/Problem Thread II
« Reply #224 on: November 05, 2009, 08:22:22 PM »
haha nevermind I got it.  Woohoo a perfect replica too.

I'll post it later if you want to see it.

Iryan

  • Ph?nglui mglw?nafh
  • Cat R?lyeh wgah?nagl fhtagn.
Re: Danmakufu Q&A/Problem Thread II
« Reply #225 on: November 05, 2009, 08:28:18 PM »
<snip>
Well, if I understand your way correctly (and I think I don't), then just replace the
digit++;
with
digit+=vspin;
then add the vspin=vspin*0.995; into the loop outside the ascent cluster.

Alternatively, to just reduce the spinning, make it so that you add a negative somewhere that isn't equal but just different enough to make it look good. You'll have to toy on the exact value, maybe even take a negative one. Anything between 0.5 and 0.9 times the regular spinning factor should make the spinning less annoying.


...I really like to talk about stuff I don't know about as if I did...

Augh, lunardial'd. Blah, if it works then it is fine I guess.  :P
Old Danmakufu stuff can be found here!

"As the size of an explosion increases, the numbers of social situations it is incapable of solving approaches zero."

Fujiwara no Mokou

  • Hourai Incarnate
  • Oh, so this trial of guts is for ME?
    • Profile
Re: Danmakufu Q&A/Problem Thread II
« Reply #226 on: November 05, 2009, 10:53:33 PM »
No no, I've already got it down perfectly.  It was hard, but I did it. ;D

Blargel

  • RAWR!
  • I'M AN ANGRY LOLI!
Re: Danmakufu Q&A/Problem Thread II
« Reply #227 on: November 05, 2009, 11:49:02 PM »
Let us pray that Blargel has another fit of boredom.

beast.jpg

Thanks for the contribution. I love you <3

But now I have to translate it all.

The thing is, any domain with the string "wiki" or "blog" seems to be blocked in China so to access touhou.wikia.com, I need to do some annoying stuff that isn't always available for me. I thought that if I wanted to do some scripting whenever I wanted without memorizing all the functions and parameters, I might as well add the remaining functions.

Also, I'm an idiot. GetLife actually IS in there already... but I was looking in the wrong place. I don't get why GetX, GetY, GetEnemyX, GetEnemyY, and GetEnemyLife are all in informational functions, but GetLife is in Enemy Script Functions. Crazy Japanese categorization? :V
« Last Edit: November 05, 2009, 11:53:35 PM by Blargel »
<WorkingKeine> when i get home i just go to the ps3 and beat people up in blazblue with a loli
<Azure> Keine: Danmakufu helper by day, violent loli by night.

Re: Danmakufu Q&A/Problem Thread II
« Reply #228 on: November 06, 2009, 12:00:43 AM »
The idea behind the new wiki is to change it from the old one, and translate all the functions into English.

Cyclone722

  • Danmakufu beginner
Re: Danmakufu Q&A/Problem Thread II
« Reply #229 on: November 06, 2009, 05:40:54 AM »
How do I get get a random number to not repeat itself?
Kaze ha watashi no ha ninaru!
The wind becomes my blade!

Re: Danmakufu Q&A/Problem Thread II
« Reply #230 on: November 06, 2009, 05:52:57 AM »
How do I get get a random number to not repeat itself?

I'll take a stab at that:

let r = 0;
let arr = [];

...

r = rand(i, j); //where i and j are your lower and upper random number limits

ascent(k in 0..length(arr)){
   while(r==ar[k]){
       r = rand(i, j);
   }
}

arr = arr ~ r;

Code can create infinite loops though, so don't do it for a small difference in i and j for a long period of time (this is practically ignorable as long as you use rand(...) instead of rand_int(...), so don't worry about it). Somebody else would probably do a better job of eliminating the previous random numbers from the pool, though.


Actually, this code doesn't work, but I tried. Disregard.
« Last Edit: November 06, 2009, 05:56:02 AM by Naut »

Blargel

  • RAWR!
  • I'M AN ANGRY LOLI!
Re: Danmakufu Q&A/Problem Thread II
« Reply #231 on: November 06, 2009, 08:01:57 AM »
If you're gonna just use rand, you will probably not have to worry about reusing numbers since it returns crazy numbers like 39.3982374982374 or -1.293748392. If you wanna use integers though, here's a method that may work. (not tested)

Code: [Select]
let result;
let resultIndex;
let randomIntegers = [];
let smallestInteger = -12; //change to whatever you want it to be
let largestInteger = 15; //change this to whatever value too
ascent(i in smallestInteger..largestInteger+1){
  randomIntegers = randomIntegers ~ [i];
}

...


if(length(randomIntegers) > 0){
  resultIndex = rand_int(0, length(randomIntegers)-1);
  result = randomIntegers[resultIndex];
  randomIntegers = erase(randomIntegers, resultIndex);
}
else{
  //Whatever's in here will be run if you ran out of integers.
}
« Last Edit: November 06, 2009, 10:11:04 PM by Blargel »
<WorkingKeine> when i get home i just go to the ps3 and beat people up in blazblue with a loli
<Azure> Keine: Danmakufu helper by day, violent loli by night.

Blargel

  • RAWR!
  • I'M AN ANGRY LOLI!
Re: Danmakufu Q&A/Problem Thread II
« Reply #232 on: November 06, 2009, 03:44:16 PM »
Something tells me, you don't have to move the whole world, but the camera instead.

If you've played SA Phantasm, you'll see the camera swerve left and right, and rotate on the Z axis just a bit.  If you look even more closely, it turns counterclockwise a bit as it swerves toward the left wall, and clockwise a bit as it swerves toward the right wall.  I don't know how to do that, but I hope I can find out.


Double-post, but it's relatively important! The mystery of the SA Phantasm camera z-rotation is solved. The result? It's impossible to rotate the camera about the z-axis in Danmakufu!

SA Phantasm does indeed make the camera rotate to achieve the effect you're going for, but not on the z-axis. As I thought previously, it was with the second parameter of SetViewFrom, aka the y-axis. What they did was build the environment on the x-y plane and moved the camera's y-position in SetViewTo to simulate moving forward rather than build the environment on the x-z plane and moving the camera's z-position.

This pretty much means you're gonna need to flip your 3-D environment and camera 90 degrees forward. and then change the second parameter of SetViewFrom to make it rotate on the "z"-axis (which is really the y-axis now according to Danmakufu).
« Last Edit: November 06, 2009, 03:45:48 PM by Blargel »
<WorkingKeine> when i get home i just go to the ps3 and beat people up in blazblue with a loli
<Azure> Keine: Danmakufu helper by day, violent loli by night.

Drake

  • *
Re: Danmakufu Q&A/Problem Thread II
« Reply #233 on: November 06, 2009, 04:30:12 PM »
In general that's probably a good idea if your stage requires moving forward instead of upwards or something. A bit complicated, but still.

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

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: Danmakufu Q&A/Problem Thread II
« Reply #234 on: November 06, 2009, 04:32:44 PM »
I could swear you could achieve the z-axis rotation in Danmakufu as I have used it but then again. I could be completely wrong with it as well.

RavenEngie

  • Now how'm I supposed to stop those mean ol' Mother Hubbards from tearin' me a structurally superfluous new behind? The answer, use a gun. If that don't work...
  • Gaming-Obsessed Illusionist
Re: Danmakufu Q&A/Problem Thread II
« Reply #235 on: November 06, 2009, 07:09:09 PM »
Right, I've run across a problem while spawning each of the forces for my Seven Force script. I've managed to make them spawn in a random order, as per what I promised, but sometimes the same one spawns more than once in a battle.

http://www.mediafire.com/?sharekey=8c7b707f7b527b3a6b21be4093fab7ac30d0413cb4ef3c7bbf1b77d2eb488dac

Those are the files I'm working with right now. Try it and see what happens.
WALUIGI BACK! NOW THIS SIG IS FUNNY AGAIN!
Mah arts! :3

Fujiwara no Mokou

  • Hourai Incarnate
  • Oh, so this trial of guts is for ME?
    • Profile
Re: Danmakufu Q&A/Problem Thread II
« Reply #236 on: November 06, 2009, 07:39:07 PM »

Double-post, but it's relatively important! The mystery of the SA Phantasm camera z-rotation is solved. The result? It's impossible to rotate the camera about the z-axis in Danmakufu!

SA Phantasm does indeed make the camera rotate to achieve the effect you're going for, but not on the z-axis. As I thought previously, it was with the second parameter of SetViewFrom, aka the y-axis. What they did was build the environment on the x-y plane and moved the camera's y-position in SetViewTo to simulate moving forward rather than build the environment on the x-z plane and moving the camera's z-position.

This pretty much means you're gonna need to flip your 3-D environment and camera 90 degrees forward. and then change the second parameter of SetViewFrom to make it rotate on the "z"-axis (which is really the y-axis now according to Danmakufu).


Oh. My. God.  If you're saying what I think you're saying, then the camera is actually moving and pointing UPward instead of forward?!

That's genius!  I should have thought of that...
If that's the cause, then it's just an illusion.  You're moving up and don't even know it!  Truly, genius.

EDIT:

Wow, it's so easy.
Code: [Select]
#TouhouDanmakufu[Stage]
#Title[How do I rotate about Z?]
#Text[you need the colorful box for this]
#Player[FREE]
#ScriptVersion[2]

script_stage_main
{
   let rotation = 0;
   let imagefile = GetCurrentScriptDirectory ~ "bg1.png";
   let viewX=0;
   let viewY=0;
   let viewZ= 10;
   let focus = 250;
   let azimuthal=90;
   let elevation=-55;
   let frame=0;
   let number=63;

   let depth_buffer_enable = true;

   @Initialize
   {
      LoadGraphic(imagefile);
      makeithappen;
   }

   @MainLoop
   {
    yield;

   }

   @DrawLoop
   {
   }

   @BackGround
   {



      WriteZBuffer(depth_buffer_enable);
      UseZBuffer(depth_buffer_enable);

      SetViewTo(viewX, viewY, viewZ);
      SetViewFrom(focus, azimuthal, elevation);

      SetFog(200, 350, 0, 0, 0);



      // Draw the box
      SetAlpha(255);
      SetTexture(imagefile);
      SetGraphicRect(0, 0, 127, 127);


      SetGraphicAngle(0, -180, 0);
      DrawGraphic3D(0, 0, 63);

      SetGraphicAngle(0, -180, 0);
      DrawGraphic3D(0, number*2, 63);

      SetGraphicAngle(0, -180, 0);
      DrawGraphic3D(0, number*4, 63);

      SetGraphicAngle(0, -180, 0);
      DrawGraphic3D(0, number*6, 63);

      SetGraphicAngle(0, -180, 0);
      DrawGraphic3D(0, number*8, 63);

      SetGraphicAngle(0, -180, 0);
      DrawGraphic3D(0, number*10, 63);



      SetGraphicAngle(0, 90, 0);
      DrawGraphic3D(63, 0, 0);

      SetGraphicAngle(0, 90, 0);
      DrawGraphic3D(63, number*2, 0);

      SetGraphicAngle(0, 90, 0);
      DrawGraphic3D(63, number*4, 0);
      SetGraphicAngle(0, 90, 0);
      DrawGraphic3D(63, number*6, 0);
      SetGraphicAngle(0, 90, 0);
      DrawGraphic3D(63, number*8, 0);
      SetGraphicAngle(0, 90, 0);
      DrawGraphic3D(63, number*10, 0);
      SetGraphicAngle(0, 90, 0);
      DrawGraphic3D(63, number*12, 0);



      SetGraphicAngle(0, 270, 0);
      DrawGraphic3D(-63, 0, 0);


      SetGraphicAngle(0, 270, 0);
      DrawGraphic3D(-63, number*2, 0);
      SetGraphicAngle(0, 270, 0);
      DrawGraphic3D(-63, number*4, 0);
      SetGraphicAngle(0, 270, 0);
      DrawGraphic3D(-63, number*6, 0);
      SetGraphicAngle(0, 270, 0);
      DrawGraphic3D(-63, number*8, 0);
      SetGraphicAngle(0, 270, 0);
      DrawGraphic3D(-63, number*10, 0);
      SetGraphicAngle(0, 270, 0);
      DrawGraphic3D(-63, number*12, 0);

      SetGraphicAngle(90, 0, 0);
      DrawGraphic3D(0, 63, 0);

      SetGraphicAngle(-90, 0, 0);
      DrawGraphic3D(0, -63, 0);


   }

   @Finalize
   {
      DeleteGraphic(imagefile);
   }

task makeithappen{ let digit=0;


loop{     digit+=2;

azimuthal+=cos(digit); yield; viewY++;  if(viewY>number*6){viewY=number*4}   }



}



}



The code makes you go "forward" on that plane, which goes on forever.

Spoiler:
it doesn't really go on forever, you're stuck in an infinite loop
« Last Edit: November 06, 2009, 08:41:06 PM by Fujiwara no Mokou »

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: Danmakufu Q&A/Problem Thread II
« Reply #237 on: November 06, 2009, 10:25:45 PM »
I think the direction you are heading really depends on how you make your stage scroll (perspective and such). As I have this stage where you have the feeling you are going forward. But at the end everything is 2D anyway :V especially during boss fights.

Chronojet ⚙ Dragon

  • The Oddity
  • 今コソ輝ケ、我ガ未来、ソノ可能性!!
Re: Danmakufu Q&A/Problem Thread II
« Reply #238 on: November 07, 2009, 12:35:27 AM »
Is this one possible?
Code: [Select]
#TouhouDanmakufu
#Title[Stuff 2]
#Text[OMFG THE INK BLOTS!
THE INK BLOTS!!!!

This one may very well be impossible.]
#ScriptVersion[2]

script_enemy_main {
let frame = 0;
let frame2 = -120;
let x = GetX;
let y = GetY; //+170;
let a = 0;
function wait(k){
loop(k){yield;}
}

    @Initialize {
        SetLife(1500); if(GetPlayerType == REIMU_A || GetPlayerType == REIMU_B) { SetDamageRate(40, 0); } else { SetDamageRate(20, 0); } SetTimer(75);
        SetEnemyMarker(true);
        SetMovePosition02(GetCenterX, GetClipMinY+100, 60);
        CutIn(KOUMA,"Little Rock「Rorschach Test」", "", 0, 0, 0, 0);
        SetScore(10000000);
SetShotAutoDeleteClip(500, 500, 500, 500);
    }

    @MainLoop {
x = GetX;
y = GetY;
if(frame < 300) { frame++; }
frame2++;
if(frame2 == 60) { SetMovePosition02(GetClipMinX+50, GetClipMaxY-25, 120); }
if(frame2 == 180) { SetMovePosition02(GetClipMaxX-50, GetClipMaxY-25, 120); }
if(frame2 == 300) { SetMovePosition02(GetCenterX, GetClipMinY+150, 120); }
if(frame2 == 420) { PlaySE(GetCurrentScriptDirectory~"se\se_ch00.wav"); SetColor(0, 0, 255); Concentration02(120); }
if(frame2 == 540) { SetMovePosition02(GetCenterX, GetClipMaxY, 10); }
if(frame2 == 560) {
PlaySE(GetCurrentScriptDirectory~"se\se_water.wav");
ascent(i in -6..6) {
CreateShot01(GetX, GetY, 5, GetAngleToPlayer+i*12, BLUE03, 10);
}
SetMovePosition02(GetCenterX, GetClipMinY+50, 30);
frame2 = 0;
}
               if(frame == 120) { lissajous; }
        if(!OnBomb) { SetCollisionA(GetX, GetY, 32); } //32 for boss, 10 for fairy
        SetCollisionB(GetX, GetY, 24);//24 for boss, 5 for fairy

yield;

    }
    @DrawLoop {
    }

    @Finalize {
        if(GotSpellCardBonus) {
loop(50) { CreateItem(ITEM_SCORE, GetX+rand(-150, 150), GetY+rand(-50, 50)); }
        } else {
loop(5) { CreateItem(ITEM_SCORE, GetX+rand(-150, 150), GetY+rand(-50, 50)); }
        }
    }

task lissajous {
x = GetX;
y = GetY; //+170;
loop(300) {
CreateShot02(x-100*cos(a-90), y-75*cos(a-90), -5, -a, 0.1, 3, RED04, 10);
CreateShot02(x-100*cos(a+90), y+75*cos(a+90), -5, a+180, 0.1, 3, RED04, 10);
a+=6.5;
wait(1);
}
wait(1);
loop(300) {
CreateShot02(x-75*cos(a-90), y-125*cos(a-90), -5, -a, 0.1, 3, ORANGE04, 10);
CreateShot02(x-75*cos(a+90), y+125*cos(a+90), -5, a+180, 0.1, 3, ORANGE04, 10);
a+=6.5;
wait(1);
}
lissajous;
}
}

Seems not to be so for me.
(Thanks Naut for Rorschach (matHh) base) (also i heart cosine!)
« Last Edit: November 07, 2009, 02:44:37 AM by Always お⑨ »

Fujiwara no Mokou

  • Hourai Incarnate
  • Oh, so this trial of guts is for ME?
    • Profile
Re: Danmakufu Q&A/Problem Thread II
« Reply #239 on: November 07, 2009, 01:42:50 AM »
I've got a question.  It's pretty trivial, though.

Is there a way to load ANM files into Danmakufu?  The kind that are direct rips from the games?

Somehow, I think they'll give a better color value and resolution than the converted PNGs