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

Re: Danmakufu Q&A/Problem Thread II
« Reply #120 on: October 30, 2009, 05:00:54 AM »
I'm not sure which fourm to post this on but since its a question, ill post it here...

how would you change a sprite when its moving left or right? and how about when its getting ready to attack?

Credit goes to Alwaysthe(9) for the sprite sheet:

i tried using the snippet for the Satori boss Onthenet helped me wiht but i can not get it right >_<, and thanks in advance!!

Blargel

  • RAWR!
  • I'M AN ANGRY LOLI!
Re: Danmakufu Q&A/Problem Thread II
« Reply #121 on: October 30, 2009, 05:57:30 AM »
Boy, I need to actually work at work instead of check the Danmakufu forum every hour. >.>

What I usually do is put a variable that stores a string (a number works too if you wanna remember which number belongs to which animation). In the case you have, I'd put something like "normal" for the left/right/normal poses, "charge" for the charging animation, and "attack" for the attack animation. Then you just set the variable as one of those three for when you want to change them.

In the draw loop, you set which part of the sprite sheet to draw based off of the variable. As for detecting left/right movement, you can call GetSpeed to get the enemy's speed. If it's positive, the boss is going right. If it's negative, the boss is going left. And if it's 0 (I actually suggest detecting less than 0.1 or something like that), the boss is not moving or only doing vertical movement. Just set the correct section of the sprite sheet according to the value returned by GetSpeed.
« Last Edit: October 30, 2009, 05:59:36 AM 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.

Henry

  • The observer
  • Exploring to the new world of Danmaku
Re: Danmakufu Q&A/Problem Thread II
« Reply #122 on: October 30, 2009, 07:53:35 AM »
Only sprites for turning left (or right) of a boss (or an enemy) are required because we can reflect the image, is that true?

(If I would like to reflect horizontally (left to right and vice versa), I should use
Code: [Select]
SetGraphicAngle(0, 180, 0);, right?)
Old/Forgotten member.

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

Blargel

  • RAWR!
  • I'M AN ANGRY LOLI!
Re: Danmakufu Q&A/Problem Thread II
« Reply #123 on: October 30, 2009, 08:28:39 AM »
You certainly can reflect a sprite like that, but keep in mind that some characters aren't symmetrical. For example, if you were to flip Marisa, she has a single braid and a ribbon on her hat that would be on the wrong side for one of the directions. Of course, not many people are going to actually notice minor details like that so it's up to you whether you do that or not.
<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.

Chronojet ⚙ Dragon

  • The Oddity
  • 今コソ輝ケ、我ガ未来、ソノ可能性!!
Re: Danmakufu Q&A/Problem Thread II
« Reply #124 on: October 30, 2009, 03:07:19 PM »
I'm not sure which fourm to post this on but since its a question, ill post it here...

how would you change a sprite when its moving left or right? and how about when its getting ready to attack?

Credit goes to Alwaysthe(9) for the sprite sheet:

i tried using the snippet for the Satori boss Onthenet helped me wiht but i can not get it right >_<, and thanks in advance!!

I'll be making left-right moving sprites this afternoon, and finishing touches tomorrow, k? (And if they're easy enough, they'll be done today! Haha.)

Chronojet ⚙ Dragon

  • The Oddity
  • 今コソ輝ケ、我ガ未来、ソノ可能性!!
Re: Danmakufu Q&A/Problem Thread II
« Reply #125 on: October 30, 2009, 03:08:00 PM »
You certainly can reflect a sprite like that, but keep in mind that some characters aren't symmetrical. For example, if you were to flip Marisa, she has a single braid and a ribbon on her hat that would be on the wrong side for one of the directions. Of course, not many people are going to actually notice minor details like that so it's up to you whether you do that or not.

Henry

  • The observer
  • Exploring to the new world of Danmaku
Re: Danmakufu Q&A/Problem Thread II
« Reply #126 on: October 30, 2009, 03:29:30 PM »
You certainly can reflect a sprite like that, but keep in mind that some characters aren't symmetrical. For example, if you were to flip Marisa, she has a single braid and a ribbon on her hat that would be on the wrong side for one of the directions. Of course, not many people are going to actually notice minor details like that so it's up to you whether you do that or not.

Most enemies does not have much details and:
aren't they covered by danmaku?
Old/Forgotten member.

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

DgBarca

  • Umineko fuck yeah
  • Spoilers ?
Re: Danmakufu Q&A/Problem Thread II
« Reply #127 on: October 30, 2009, 07:39:12 PM »
I have a player script(ReimuA) (based on Naut SanaeB) that have for basic shots :
Code: [Select]
task amulet(x, y, ang, v, d){
let obj = Obj_Create(OBJ_SHOT);
let angleBOOM = ang;
Obj_SetPosition(obj, x, y);
Obj_SetAngle(obj, ang);
Obj_SetSpeed(obj, v);
let xx = x;
let yy = y;
let xc = xx;
let yc = yy;
ObjShot_SetGraphic(obj, 7);
ObjShot_SetDamage(obj, d);
ObjShot_SetBombResist(obj, true);
ObjShot_SetPenetration(obj, 2);

while(! Obj_BeDeleted(obj)){
xc = Obj_GetX(obj);
yc = Obj_GetY(obj);
}

let amul=Obj_Create(OBJ_EFFECT);
  let Yvar = 8;
  ObjEffect_SetTexture(amul,GetCurrentScriptDirectory~"reimu.png");
  ObjEffect_SetRenderState(amul,ALPHA);
  ObjEffect_SetPrimitiveType(amul,PRIMITIVE_TRIANGLEFAN);
  ObjEffect_CreateVertex(amul,4);
  ObjEffect_SetVertexColor(amul, 0, 205, 200, 255, 255);
  ObjEffect_SetVertexColor(amul, 1, 205, 200, 255, 255);
  ObjEffect_SetVertexColor(amul, 2, 205, 200, 255, 255);
  ObjEffect_SetVertexColor(amul, 3, 205, 200, 255, 255);
  loop(2){
  ObjEffect_SetVertexUV(amul,0,49,143);
  ObjEffect_SetVertexUV(amul,1,61,143);
  ObjEffect_SetVertexUV(amul,2,61,161);
  ObjEffect_SetVertexUV(amul,3,49,161);
  ObjEffect_SetVertexXY(amul,0,xc,yc - Yvar);
  ObjEffect_SetVertexXY(amul,1,xc,yc - Yvar);
  ObjEffect_SetVertexXY(amul,2,xc,yc + Yvar);
  ObjEffect_SetVertexXY(amul,3,xc,yc + Yvar);
  Yvar+=8;
  yield;}
  loop(2){
  ObjEffect_SetVertexUV(amul,0,49,161);
  ObjEffect_SetVertexUV(amul,1,61,161);
  ObjEffect_SetVertexUV(amul,2,61,179);
  ObjEffect_SetVertexUV(amul,3,49,179);
  ObjEffect_SetVertexXY(amul,0,xc,yc - Yvar);
  ObjEffect_SetVertexXY(amul,1,xc,yc - Yvar);
  ObjEffect_SetVertexXY(amul,2,xc,yc + Yvar);
  ObjEffect_SetVertexXY(amul,3,xc,yc + Yvar);
  Yvar+=8;
  yield;}
  loop(2){
  ObjEffect_SetVertexUV(amul,0,49,179);
  ObjEffect_SetVertexUV(amul,1,61,179);
  ObjEffect_SetVertexUV(amul,2,61,197);
  ObjEffect_SetVertexUV(amul,3,49,197);
  ObjEffect_SetVertexXY(amul,0,xc,yc - Yvar);
  ObjEffect_SetVertexXY(amul,1,xc,yc - Yvar);
  ObjEffect_SetVertexXY(amul,2,xc,yc + Yvar);
  ObjEffect_SetVertexXY(amul,3,xc,yc + Yvar);
  Yvar+=8;
  yield;}
loop(2){
  ObjEffect_SetVertexUV(amul,0,36,143);
  ObjEffect_SetVertexUV(amul,1,48,143);
  ObjEffect_SetVertexUV(amul,2,48,161);
  ObjEffect_SetVertexUV(amul,3,36,161);
  ObjEffect_SetVertexXY(amul,0,xc,yc - Yvar);
  ObjEffect_SetVertexXY(amul,1,xc,yc - Yvar);
  ObjEffect_SetVertexXY(amul,2,xc,yc + Yvar);
  ObjEffect_SetVertexXY(amul,3,xc,yc + Yvar);
  Yvar+=8;
  yield;}
 
  Obj_Delete(amul);
 
}

task amuletbreak(xc,yc) {
  let amul=Obj_Create(OBJ_EFFECT);
  let Yvar = 8;
  ObjEffect_SetTexture(amul,GetCurrentScriptDirectory~"sanae.png");
  ObjEffect_SetRenderState(amul,ADD);
  ObjEffect_SetLayer(amul, 8);
  ObjEffect_SetPrimitiveType(amul,PRIMITIVE_TRIANGLEFAN);
  ObjEffect_CreateVertex(amul,4);
  ObjEffect_SetVertexColor(amul, 0, 255, 200, 255, 255);
  ObjEffect_SetVertexColor(amul, 1, 255, 200, 255, 255);
  ObjEffect_SetVertexColor(amul, 2, 255, 200, 255, 255);
  ObjEffect_SetVertexColor(amul, 3, 255, 200, 255, 255);
  loop(2){
  ObjEffect_SetVertexUV(amul,0,49,143);
  ObjEffect_SetVertexUV(amul,1,61,143);
  ObjEffect_SetVertexUV(amul,2,61,161);
  ObjEffect_SetVertexUV(amul,3,49,161);
  ObjEffect_SetVertexXY(amul,0,xc,yc - 17);
  ObjEffect_SetVertexXY(amul,1,xc,yc - 17);
  ObjEffect_SetVertexXY(amul,2,xc,yc + 16);
  ObjEffect_SetVertexXY(amul,3,xc,yc + 16);
  Yvar+=8;
  yield;}
  loop(2){
  ObjEffect_SetVertexUV(amul,0,49,161);
  ObjEffect_SetVertexUV(amul,1,61,161);
  ObjEffect_SetVertexUV(amul,2,61,179);
  ObjEffect_SetVertexUV(amul,3,49,179);
  ObjEffect_SetVertexXY(amul,0,xc,yc - Yvar);
  ObjEffect_SetVertexXY(amul,1,xc,yc - Yvar);
  ObjEffect_SetVertexXY(amul,2,xc,yc + Yvar);
  ObjEffect_SetVertexXY(amul,3,xc,yc + Yvar);
  Yvar+=8;
  yield;}
  loop(2){
  ObjEffect_SetVertexUV(amul,0,49,179);
  ObjEffect_SetVertexUV(amul,1,61,179);
  ObjEffect_SetVertexUV(amul,2,61,197);
  ObjEffect_SetVertexUV(amul,3,49,197);
  ObjEffect_SetVertexXY(amul,0,xc,yc - Yvar);
  ObjEffect_SetVertexXY(amul,1,xc,yc - Yvar);
  ObjEffect_SetVertexXY(amul,2,xc,yc + Yvar);
  ObjEffect_SetVertexXY(amul,3,xc,yc + Yvar);
  Yvar+=8;
  yield;}
loop(2){
  ObjEffect_SetVertexUV(amul,0,36,143);
  ObjEffect_SetVertexUV(amul,1,48,143);
  ObjEffect_SetVertexUV(amul,2,48,161);
  ObjEffect_SetVertexUV(amul,3,36,161);
  ObjEffect_SetVertexXY(amul,0,xc,yc - Yvar);
  ObjEffect_SetVertexXY(amul,1,xc,yc - Yvar);
  ObjEffect_SetVertexXY(amul,2,xc,yc + Yvar);
  ObjEffect_SetVertexXY(amul,3,xc,yc + Yvar);
  Yvar+=8;
  yield;}
 
  Obj_Delete(amul);
 
}


But amulet break does not work...
[21:16] <redacted> dgbarca makes great work
[21:16] <redacted> i hope he'll make a full game once

Chronojet ⚙ Dragon

  • The Oddity
  • 今コソ輝ケ、我ガ未来、ソノ可能性!!
Re: Danmakufu Q&A/Problem Thread II
« Reply #128 on: October 30, 2009, 07:42:39 PM »
I'm not sure which fourm to post this on but since its a question, ill post it here...

how would you change a sprite when its moving left or right? and how about when its getting ready to attack?

Credit goes to Alwaysthe(9) for the sprite sheet: (pixely image)

i tried using the snippet for the Satori boss Onthenet helped me wiht but i can not get it right >_<, and thanks in advance!!

You... can use the stuff in the ExRumia scripts as an example...
Code: [Select]
SetRenderState(ALPHA);
SetAlpha(255);
SetTexture(imgExRumia);
if(int(GetSpeedX())==0){SetGraphicRect(64,1,127,64);}
else if(GetSpeedX()>0){SetGraphicRect(192,1,255,64);}
else if(GetSpeedX()<0){SetGraphicRect(128,1,191,64);}
DrawGraphic(GetX(),GetY());
You can also use a variable like "animation" and increment it every frame. Then you can use in @DrawLoop:
Code: [Select]
if(int(GetSpeedX) == 0) { if(animation == <value>) { SetGraphicRect(left, top, right, bottom); } repeat_setting_graphic_coordinates; }
and all that.
« Last Edit: October 30, 2009, 07:47:31 PM by AlwaysThe⑨ »

Fujiwara no Mokou

  • Hourai Incarnate
  • Oh, so this trial of guts is for ME?
    • Profile
Re: Danmakufu Q&A/Problem Thread II
« Reply #129 on: October 31, 2009, 02:18:28 AM »
Help!


I got my magic circle to finally work.  It's the proper kind, ZUN style.  Problem is even though I can make it spin, I can't make it shrink.  It's pretty simple, all I gotta do is shrink the radius.  Problem is, it's not that simple
Spoiler:
at least not for me, anyway.

Here's the two stuff needed.

Code: [Select]
#TouhouDanmakufu
 #Title[magic circle]
 #Text[]
 #Player[FREE]
 #ScriptVersion[2]
 
 script_enemy_main{
      let imagefile = GetCurrentScriptDirectory ~ "etama3.png";
      let objid;




    @Initialize{
      SetMovePosition02(GetCenterX,GetCenterY-100,0);
      SetLife(1);
      LoadGraphic(imagefile);
     
      object;
      }
 
    @MainLoop{

     yield;
    }
 
    @DrawLoop{
    }
 
    @BackGround{
    }
 
    @Finalize{
    }





   task object{ yield; yield;



          objid = Obj_Create(OBJ_EFFECT);
          Obj_SetX(objid, GetX);
          Obj_SetY(objid, GetY);


          ObjEffect_SetScale(objid,1,1);
       

          ObjEffect_SetRenderState(objid,ADD);
 

          ObjEffect_SetTexture(objid, imagefile);

          ObjEffect_SetPrimitiveType(objid, PRIMITIVE_TRIANGLESTRIP);

           let totalradius=250;
                 let angle=0;       let repeat=8;   ////how many times the image is repeated
         let sides=100;  let i=0;    let d=0;     let Z=0;  let RotateSpeed=0.5;
         

       
         
          ObjEffect_CreateVertex(objid, sides*2+2);      /// vertices
         

          loop(sides+1){       ///the sides are done in pairs, the added loop is to finish the circle

ObjEffect_SetVertexUV(objid,i*2,16,d*repeat/sides);
              ObjEffect_SetVertexUV(objid,i*2+1,0,d*repeat/sides);
             

          ObjEffect_SetVertexXY(objid, i*2, totalradius*cos(angle), totalradius*sin(angle));
          ObjEffect_SetVertexXY(objid, i*2+1, (totalradius+22)*cos(angle), (totalradius+22)*sin(angle));
             
angle+=360/sides;        //// number of sides
i++;        //// the id # increases by 1 every loop
d+=-128;  /// the vertical size of the spellcard shown

                   }   




             while(Obj_BeDeleted(objid)==!true){ ObjEffect_SetAngle(objid,0,0,Z);  Z+=RotateSpeed; yield;}
                   
     }

     






}
Spoiler:
and yes, I seriously created 202 vertices to make this circle.  It's proper




If I can get this part down, I'll easily be able to manipulate the inside and outside vertices too, to make the circle expand widely ZUN style, so it shapes a circle on the outside but a star on the inside of the circle when the spellcard starts.  Pretty cool, huh.


Anyway, what can I do to get the value of "totalradius" to shrink about 0.01 pixels per frame?
« Last Edit: October 31, 2009, 02:20:28 AM by Fujiwara no Mokou »

Blargel

  • RAWR!
  • I'M AN ANGRY LOLI!
Re: Danmakufu Q&A/Problem Thread II
« Reply #130 on: October 31, 2009, 07:10:50 AM »
Dear lord Mokou, you need to organize your code's spacing better. Use tabs OR spaces. Don't use both or it goes screwy. It might line up in one editor, but it won't line up in others.

Anyway, to answer your question take a look at the following code which is a copy of your while loop at the end of your task, edited to be slightly easier to read and with some an extra thing added in:
Code: [Select]
   
while(Obj_BeDeleted(objid)==!true){
    ObjEffect_SetAngle(objid,0,0,Z);
    Z+=RotateSpeed;

    if( conditions for making the circle shrink == true ){
        totalradius -= 0.01;
        ascent(i in 0..202){   //where 202 is the number of vertices
          ObjEffect_SetVertexXY(objid, i, totalradius*cos(angle), totalradius*sin(angle));
        }
    }

    yield;
}

Now, since I utterly fail with object effects, I have no idea if the above code actually works, but you should get the idea of what I was trying to accomplish.

Oh and lastly, instead of writing Obj_BeDeleted(objid)==!true, you can just write !Obj_BeDeleted(obj). It'll mean the same thing and it's a bit shorter and easier to understand ('cause in plain English, yours is saying "Object is deleted is equal to not true" while this one says "Object is not deleted".
<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.

PT8Sceptile

  • All hail Giant Catfish!
Re: Danmakufu Q&A/Problem Thread II
« Reply #131 on: October 31, 2009, 08:07:30 AM »
For Fujiwara no Mokou:

Code: [Select]
#TouhouDanmakufu
#Title[magic circle]
#Text[]
#Player[FREE]
#ScriptVersion[2]
 
script_enemy_main{
    let imagefile = GetCurrentScriptDirectory ~ "etama3.png";
    let objid;




    @Initialize{
SetMovePosition02(GetCenterX,GetCenterY-100,0);
SetLife(1);
LoadGraphic(imagefile);
SetTimer(30);
object;
    }
 
    @MainLoop{
yield;
    }
 
    @DrawLoop{
    }
 
    @BackGround{
    }
 
    @Finalize{
    }

task object{
objid = Obj_Create(OBJ_EFFECT);
Obj_SetX(objid, GetX);
Obj_SetY(objid, GetY);
ObjEffect_SetScale(objid,1,1);
ObjEffect_SetPrimitiveType(objid, PRIMITIVE_TRIANGLESTRIP);
ObjEffect_SetRenderState(objid,ADD);
ObjEffect_SetTexture(objid, imagefile);
let totalradius=0;     
let repeat=8;   ////how many times the image is repeated
let sides=100;     
let d=0;     
let Z=0; 
let RotateSpeed=0.5;

let ctime = GetTimer*60;
let itime = ctime;
         
ObjEffect_CreateVertex(objid, sides*2+2);      /// vertices
ascent(i in 0..(sides+1)){       ///the sides are done in pairs, the added loop is to finish the circle
ObjEffect_SetVertexUV(objid,i*2,16,d*repeat/sides);
ObjEffect_SetVertexUV(objid,i*2+1,0,d*repeat/sides);
d+=-128;  /// the vertical size of the spellcard shown
}   
while(!Obj_BeDeleted(objid)){
ascent(i in 0..sides+1) {
ObjEffect_SetVertexXY(objid, i*2, totalradius*ctime/itime*cos(i*360/sides + Z), totalradius*ctime/itime*sin(i*360/sides + Z));
ObjEffect_SetVertexXY(objid, i*2+1, (totalradius*ctime/itime+22)*cos(i*360/sides + Z), (totalradius*ctime/itime+22)*sin(i*360/sides + Z));
}
Z+=RotateSpeed;
if (totalradius < 250) {
totalradius+= 3; //The bigger this number is, the quicker the circle will expand.
}
ctime--;
yield;
}
                   
}

}

Now it should expand quickly and then shrink in accordance with the time remaining. Blargel had the right idea, but he forgot to set the coordinates of the outer layer vertices in his example. I also formatted it so it wouldn't be that confusing.
« Last Edit: October 31, 2009, 08:14:46 AM by PT8Sceptile »

Fujiwara no Mokou

  • Hourai Incarnate
  • Oh, so this trial of guts is for ME?
    • Profile
Re: Danmakufu Q&A/Problem Thread II
« Reply #132 on: October 31, 2009, 01:17:15 PM »
Thanks a lot.  But gah! I hate ascents, I'd so much rather use loop instead, ascent just doesn't work well for me.  I'll have to re-arrange that.

lord Mokou

Haha wow.  What a title!

Blargel

  • RAWR!
  • I'M AN ANGRY LOLI!
Re: Danmakufu Q&A/Problem Thread II
« Reply #133 on: October 31, 2009, 02:20:59 PM »
Haha wow.  What a title!

:x

Dear lord, comma, Mokou. With "dear lord" being an expression similar to "holy crap".
<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 #134 on: October 31, 2009, 07:18:00 PM »



Why can't I get this part right darnit?


Code: [Select]
#TouhouDanmakufu
#Title[magic circle 3]
#Text[]
#Player[FREE]
#ScriptVersion[2]
 
script_enemy_main{
    let imagefile = GetCurrentScriptDirectory ~ "etama3.png";
    let objid;




    @Initialize{
      SetMovePosition02(GetCenterX,GetCenterY-100,0);
      SetLife(1);
      LoadGraphic(imagefile);
      SetTimer(60);
      object;
    }
 
    @MainLoop{
      yield;
    }
 
    @DrawLoop{
    }
 
    @BackGround{
    }
 
    @Finalize{
    }

   task object{   yield; yield;


      objid = Obj_Create(OBJ_EFFECT);
      Obj_SetX(objid, GetX);
      Obj_SetY(objid, GetY);
      ObjEffect_SetScale(objid,1,1);
      ObjEffect_SetPrimitiveType(objid, PRIMITIVE_TRIANGLESTRIP);
      ObjEffect_SetRenderState(objid,ADD);
      ObjEffect_SetTexture(objid, imagefile);

      let totalradius=250;
      let repeat=8;
      let sides=80;     
      let d=0;     
      let rotate=0;
      let RotateSpeed=0;
      let IN=0;
      let OUT=30;
      let timer=50*60;
      let timer2=timer;
      let accelerate=-20;

         
      ObjEffect_CreateVertex(objid, sides*2+2);   



                     ascent(i in 0..sides+1){

                         ObjEffect_SetVertexUV(objid,i*2,16,d*repeat/sides);
                         ObjEffect_SetVertexUV(objid,i*2+1,0,d*repeat/sides);
                         d+=-128;
                            }


      while(!Obj_BeDeleted(objid)){



                     ascent(i in 0..sides+1){         ///inside

                     let radiusINX=(totalradius*timer/timer2 +IN)*cos(i*360/sides +rotate);
                     let radiusINY=(totalradius*timer/timer2 +IN)*sin(i*360/sides +rotate);

                     let radiusOUTX=(totalradius*timer/timer2 +OUT)*cos(i*360/sides +rotate);
                     let radiusOUTY=(totalradius*timer/timer2 +OUT)*sin(i*360/sides +rotate);

                         ObjEffect_SetVertexXY(objid, i*2, radiusINX, radiusINY);
                         ObjEffect_SetVertexXY(objid, i*2+1, radiusOUTX, radiusOUTY);


                           }

               rotate+=RotateSpeed;
               timer+=accelerate;
               accelerate+=-2;
               yield;
               if(timer/timer2<-0.06){Obj_Delete(objid);}
               }


                   
   }
 


 

}



I thought this part would be easy.  But I just don't know how to attack it properly.  From what I see, if you just take one part, it starts of as a perfect circle and caves into itself as it goes.
But there's an order... it makes a pentagon.  There are three parts; the corners of the pentagon cave in at one accelerating speed, and the sides directly between each corner caves in about twice as fast.

But the part that will make it really hard for me to replicate is that the 'corners' of the pentagon bend in gradually.  They're wavy, not pointy and triangle-like.  It makes me wonder if sine or cosine is somehow involved.


This will also be useful again when capturing spellcards without death, where the circle going around the boss will move to the player and cave into them.  Very similar to Mokou's resurrection style, except it caves in at a much faster rate, and holds then spins around the player for a bit.


So much work for such little effects!

It's the small stuff that makes the game great.  Can anyone help me with this?
« Last Edit: October 31, 2009, 07:25:33 PM by Fujiwara no Mokou »

Drake

  • *
Re: Danmakufu Q&A/Problem Thread II
« Reply #135 on: October 31, 2009, 07:32:48 PM »
I don't need help for this, but everyone comes to this thread so I'll post it here too.

http://www.mediafire.com/?b1dzixozmwz

I finished the maple explosion and maple charge functions. Next up is item spawning, probably.

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

Re: Danmakufu Q&A/Problem Thread II
« Reply #136 on: November 01, 2009, 06:48:43 PM »
This probably a really common problem that newfags ask for help with all the time. :|

uh can you tell me whats wrong here

im trying to make a long laser that sticks around for a while because of its length.
but after a while, the SPRITE the laser moves on an axis, but the hitbox stays where the laser was originally shot.

im basically using

Code: [Select]
{
            if (frame == 200)

    {
        CreateLaser01(+rand(0, 900), +rand(0, 200), 50, GetAngleToPlayer, 9000000, 30, YELLOW05, 60);
frame=0;

        CreateLaser01(+rand(0, 900), +rand(0, 200), 50, +rand(0, 180), 9000000, 30, GREEN05, 60);
frame=0;

    }
            frame++;
}
Just wanted to shout out and say thanks for all the time and effort your putin in to make sure smogon has then best VGC'ers around.

Re: Danmakufu Q&A/Problem Thread II
« Reply #137 on: November 01, 2009, 07:01:39 PM »
This probably a really common problem that newfags ask for help with all the time. :|

uh can you tell me whats wrong here
<image>
im trying to make a long laser that sticks around for a while because of its length.
but after a while, the SPRITE the laser moves on an axis, but the hitbox stays where the laser was originally shot.

im basically using

Code: [Select]
{
            if (frame == 200)

    {
        CreateLaser01(+rand(0, 900), +rand(0, 200), 50, GetAngleToPlayer, 9000000, 30, YELLOW05, 60);
frame=0;

        CreateLaser01(+rand(0, 900), +rand(0, 200), 50, +rand(0, 180), 9000000, 30, GREEN05, 60);
frame=0;

    }
            frame++;
}

I would use a CreateLaserB for that.

Drake

  • *
Re: Danmakufu Q&A/Problem Thread II
« Reply #138 on: November 01, 2009, 07:06:23 PM »
wtf i don't even know what you're trying to do there

Context please?

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

Stuffman

  • *
  • We're having a ball!
Re: Danmakufu Q&A/Problem Thread II
« Reply #139 on: November 01, 2009, 07:06:35 PM »
I see two issues with your lasers:
- First, one of your lasers is using GetAngleToPlayer, but that won't work because it calculates the angle based on the enemy to the player, not the shot to the player. Unless you're doing it that way intentionally.
- Your hitbox issues are coming from the fact that your laser is moving incredibly fast and is unbelievably huge. Lasers don't really do hit detection correctly at that size, mainly because the graphic is stretched so much it doesn't correctly map to the hitbox. As bman said, I think the function you want to look into for a stationary laser is CreateLaserA.

Re: Danmakufu Q&A/Problem Thread II
« Reply #140 on: November 01, 2009, 09:51:59 PM »
I was using a massive laser to give the effect of a stationary laser. So you're saying CreateLaserA would work then? alright i'll give that a try.

and yea i wasnt really concerned about my angle at that point.

thanks.
Just wanted to shout out and say thanks for all the time and effort your putin in to make sure smogon has then best VGC'ers around.

Hello Purvis

  • *
  • Hello Jerry
Re: Danmakufu Q&A/Problem Thread II
« Reply #141 on: November 02, 2009, 12:51:09 AM »
So I got a problem that stumped Helepolis, so I'll toss it out there for the lot of ye to deal with.

Whenever I finish playing a script, be it through winning it or electing not to continue after dying, Danmakufu crashes. I've tried this with Helepolis' Perfect Imperishable Bucket and four incarnations of Ravenlocke's Seven Force script, and it happens every time.

For reference, I am running it on XP via AppLocale.

Fujiwara no Mokou

  • Hourai Incarnate
  • Oh, so this trial of guts is for ME?
    • Profile
Re: Danmakufu Q&A/Problem Thread II
« Reply #142 on: November 02, 2009, 01:14:13 AM »
I can't even come close to the effect I wanted to do.  It seems impossible.

Lux

  • I got a BSoD so all my gamez are gone D=
  • Suwako>All
Re: Danmakufu Q&A/Problem Thread II
« Reply #143 on: November 02, 2009, 07:21:35 AM »
I can't even get the file to extract... I got it from the link on both wikis, and when I try to extract it, it gives me this...

!   C:\Documents and Settings\Owner\Local Settings\Temp\th_dnh.zip: The archive is either in unknown format or damaged


I'm sure this should be asked somewhere else, but seeming that this is a problem with Danmakufu and all...

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: Danmakufu Q&A/Problem Thread II
« Reply #144 on: November 02, 2009, 08:24:09 AM »
Where did you download it from? From the link inside the FAQ I hope? Because that one is working fine. I just redownloaded it yesterday.

Lux

  • I got a BSoD so all my gamez are gone D=
  • Suwako>All
Re: Danmakufu Q&A/Problem Thread II
« Reply #145 on: November 02, 2009, 08:54:15 AM »
Yep. I just tried to re-download it though, and it worked... Now I have to figure out how to install the East Asian Language pack without the CD DX

Thanks for the help, you'll probably be seeing me here again soon.

Snaka

  • Do I post too fast
  • Or does everyone else post too slow
Re: Danmakufu Q&A/Problem Thread II
« Reply #146 on: November 02, 2009, 11:50:32 AM »
Hey, just wondering if it was possible to make dialogue in danmakufu? And if so, how?

The five magic rolling stones

Blargel

  • RAWR!
  • I'M AN ANGRY LOLI!
Re: Danmakufu Q&A/Problem Thread II
« Reply #147 on: November 02, 2009, 11:55:17 AM »
Hey, just wondering if it was possible to make dialogue in danmakufu? And if so, how?

Yup, and they're called events.
Sounds like someone needs to write an event tutorial for Danmakufu (not me, I dunno how to do them so well either).
<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.

Snaka

  • Do I post too fast
  • Or does everyone else post too slow
Re: Danmakufu Q&A/Problem Thread II
« Reply #148 on: November 02, 2009, 12:05:12 PM »
Thanks, I'll have to look that up sometime...

The five magic rolling stones

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: Danmakufu Q&A/Problem Thread II
« Reply #149 on: November 02, 2009, 12:31:14 PM »
Thanks, I'll have to look that up sometime...

Have you checked the intermediate tutorial inside the stickies? They explain how to do it.
« Last Edit: November 02, 2009, 12:34:41 PM by Helepolis »