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

Blargel

  • RAWR!
  • I'M AN ANGRY LOLI!
Re: Danmakufu Q&A/Problem Thread v3
« Reply #120 on: February 05, 2010, 12:37:36 PM »
Advanced enough that you probably won't figure it out without asking a few more questions. If you want to give it a try, I suggest you first try reconstructing what you have right now with object lasers to get an understanding of them. After that, you can try adding the extra and complicated stuff. Once you get the hang of objects though, you can do all sorts of neat stuff. :V
<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.

DarkOverord

  • Damn Red Dragons
  • Aaaaaaaaaaaaaaaaargh
    • Lol YouTube
Re: Danmakufu Q&A/Problem Thread v3
« Reply #121 on: February 05, 2010, 02:17:11 PM »
Advanced enough that you probably won't figure it out without asking a few more questions. If you want to give it a try, I suggest you first try reconstructing what you have right now with object lasers to get an understanding of them. After that, you can try adding the extra and complicated stuff. Once you get the hang of objects though, you can do all sorts of neat stuff. :V
I see what you mean....

I can get the lasers themselves to work: Baring in mind that the red laser isn't an object laser, just normal for now. However. When I add the attempted messy code: It appears to work, then this:
http://www.majhost.com/gallery/DarkOverord/Other/SS2/Toehoes/ohwat.png
This is one of those occasions of I know roughly what's happening. I attempted to use the laser ends and the min/max clips (i.e. < > etc.) However. It seems to dislike the Y direction, I have the same code for all sides, but, the bottom, ooo, if the end goes under the botom, it refuses to die it seems. Wait no it isn't. LET'S TRY AND FIX THIS! Whoops...

Nevermind my issue is getting bullets to spawn and the fact it crashes now >:

Well you did say I'd be asking a few more questions :V
Code: [Select]
#TouhouDanmakufu
#Title[Dunno yet]
#Text[TEST YAY]
#Player[FREE]
#ScriptVersion[2]
#BGM[.\bgm\BorderofLife.mp3]

script_enemy_main{

let CSD = GetCurrentScriptDirectory;
let imgBoss = CSD ~ "system\boss17.png";
let cut = CSD ~ "system\yuyukocutin.png";
let bg = CSD ~ "system\bg.png";
let lay = CSD ~ "system\overlay.png";

let slide = 0;

let f = 0;
let f2 = 0;

@Initialize{
SetLife(1000);
SetMovePosition01(GetCenterX,120,5);

LoadGraphic(imgBoss);
LoadGraphic(cut);
LoadGraphic(bg);
LoadGraphic(lay);
LoadUserShotData(CSD ~ "system\supershot.txt");

MainTask;
}
@MainLoop{

yield;
}
@DrawLoop{
SetTexture(imgBoss);
SetRenderState(ALPHA);
SetAlpha(255);
SetGraphicScale(1,1);
SetGraphicAngle(0,0,0);

if(int(GetSpeedX())==0){
if(f<10){SetGraphicRect(0,0,50,80);}
if(f>=10 && f<20){SetGraphicRect(0,80,50,160);}
f2=0;
}

if(int(GetSpeedX())>0){
if(f2<10){SetGraphicRect(50,80,100,160);}
if(f2>=10){SetGraphicRect(100,80,150,160);}
f2++;
}

if(int(GetSpeedX())<0){
SetGraphicAngle(180,0,0);
if(f2<10){SetGraphicRect(50,80,100,160); }
if(f2>=10){SetGraphicRect(100,80,150,160);}
f2++;
}

f++;
if(f==20){f=0;}
DrawGraphic(GetX,GetY);
}
@BackGround{
SetTexture(bg);
SetRenderState(ADD);
SetAlpha(225);
SetGraphicRect(0,0,512,512+slide);
SetGraphicScale(1,1);
SetGraphicAngle(0,0,0);
DrawGraphic(GetCenterX,GetCenterY);

slide+=5;

SetTexture(lay);
SetRenderState(ALPHA);
SetAlpha(225);
SetGraphicRect(0,0,512,512);
SetGraphicScale(1,1);
SetGraphicAngle(0,0,0);
DrawGraphic(GetCenterX,GetCenterY);
}
@Finalize{
DeleteGraphic(imgBoss);
DeleteGraphic(cut);
DeleteGraphic(bg);
}

task MainTask{
      wait(60);
      loop{
         fire;
         wait(300);
      }
   }

task fire{
let x=0;
let g=3;
let z=0;
loop{
let Angle = GetAngleToPlayer;
let dir = Angle-45;
while(x<4){
if(g==4){g=5}
Laser1(GetEnemyX+50*cos(dir),GetEnemyY+50*sin(dir),dir,400,20,g,20);

if(z==0){CreateLaserA(1,GetEnemyX+50*cos(dir+45),GetEnemyY+50*sin(dir+45),500,15,2,40);
SetShotDirectionType(PLAYER);
SetLaserDataA(1,0,0,0,0,0,0);
SetShotKillTime(1,150);
SetShotDirectionType(ABSOLUTE);
FireShot(1);}
FireShot(0);

if(g==5){g=2};
g++;
x++;
Angle+=90;
dir+=90;
z++;
}
wait(200);
yield;
}
}

task Laser1(x,y,dir,L,W,g,delay){
let obj = Obj_Create(OBJ_LASER);

Obj_SetPosition(obj,x,y);
ObjLaser_SetLength(obj,L);
ObjLaser_SetWidth(obj,W);
ObjShot_SetGraphic(obj,g);
ObjShot_SetDelay(obj,delay);
ObjLaser_SetSource(obj,true);
Obj_SetAngle(obj,dir);

if(ObjLaser_GetEndY(obj) > GetClipMaxY){
let i = 0;
let dir2 = 0;
let g2=0;

if(g==3){g2+=210}
if(g==5){g2+=211}
while(i<6){
CreateShotA(1,ObjLaser_GetEndX(obj)+20*cos(dir2),ObjLaser_GetEndY(obj)+20*cos(dir2),0);
SetShotDataA(1,0,2,dir,0.2,0.1,3.5,g2);
FireShot(1);

dir2+=360/6;
i++;

}
g2+=-g2;
yield;

wait(150);
ObjShot_FadeDelete(obj);
}
if(ObjLaser_GetEndX(obj) > GetClipMaxX){
let i = 0;
let dir2 = 0;
let g2=0;

if(g==3){g2+=210}
if(g==5){g2+=211}
while(i<6){
CreateShotA(1,ObjLaser_GetEndX(obj)+20*cos(dir2),ObjLaser_GetEndY(obj)+20*cos(dir2),0);
SetShotDataA(1,0,2,dir,0.2,0.1,3.5,g2);
FireShot(1);

dir2+=360/6;
i++;

}
g2+=-g2;
yield;

wait(150);
ObjShot_FadeDelete(obj);
}
if(ObjLaser_GetEndY(obj) < GetClipMinY){
let i = 0;
let dir2 = 0;
let g2=0;

if(g==3){g2+=210}
if(g==5){g2+=211}
while(i<6){
CreateShotA(1,ObjLaser_GetEndX(obj)+20*cos(dir2),ObjLaser_GetEndY(obj)+20*cos(dir2),0);
SetShotDataA(1,0,2,dir,0.2,0.1,3.5,g2);
FireShot(1);

dir2+=360/6;
i++;

}
g2+=-g2;
yield;

wait(150);
ObjShot_FadeDelete(obj);
}
if(ObjLaser_GetEndX(obj) < GetClipMinX){
let i = 0;
let dir2 = 0;
let g2=0;

if(g==3){g2+=210}
if(g==5){g2+=211}
while(i<6){
CreateShotA(1,ObjLaser_GetEndX(obj)+20*cos(dir2),ObjLaser_GetEndY(obj)+20*cos(dir2),0);
SetShotDataA(1,0,2,dir,0.2,0.1,3.5,g2);
FireShot(1);

dir2+=360/6;
i++;

}
g2+=-g2;
yield;

wait(150);
ObjShot_FadeDelete(obj);
}



}

function wait(w){
loop(w){yield;}
}
}
« Last Edit: February 05, 2010, 05:56:01 PM by DarkOverord »
http://www.youtube.com/user/DarkOverord <-- its wat cool ddes do rite :V

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 v3
« Reply #122 on: February 05, 2010, 02:35:16 PM »
If you understand the math behind the function, it is not that difficult. I understand only halfways, but given the graphical limitations of danmakufu, it is actually pretty easy to come up with a task that creates a spear that looks like you intended:

Code: [Select]
let graph=[RED05, BLUE05, ORANGE05, GREEN05, PURPLE05, AQUA05];

task Mathspear(px, py, v, ang, n, phi, amp, n2){

let way=0;
let exp=0;

loop(n){

ascent(i in 1..(n2+1)){
exp=i;
loop(ceil(way)){ exp=exp^i; }
exp=exp*(exp^(way-ceil(way)));
CreateShot01(px+amp*cos(ang+90)*sin(exp)*way, +amp*sin(ang+90)*sin(exp)*way, v, ang, graph[i], 0);
CreateShot01(px-amp*cos(ang+90)*sin(exp)*way, -amp*sin(ang+90)*sin(exp)*way, v, ang, graph[i], 0);
}

way+=phi;

yield;
}

}
...however, there are obvious problems, as expected. For once, danmakufu will refuse to calculate the math behind the pattern as soon as the numbers reach ludicrous values, and that happens pretty fast. Once this point is reached, danmakufu will simply refuse to execute the command that uses the variable of said value: Instead of crashing, it just doesn't fire the bullet.
Even if that wasn't the case, the math behind this stuff calls for a ludicrous amount of iterations very soon, so even if the bullets still show up, the math alone will cause massive slowdown.

In case you were wondering, the values I used for testing were Mathspear(GetCenterX, 64, 2, 90, 5000, 0.005, 15, 5);
See for yourself.

Amazing! but unusable for anything in danmakufu due to the massive slowdown caused by it... still... this looks really nice ;D Awesome Iryan!

If I fiddle with this a bit... maybe I could make it not cause too much slowdown...
Danmakufu Script Thread :V Latest Script: Intertwining Mechanical Intervention (temp name)

Yooooouuutuuuubeeee Channel Latest Video: Contest #8 Entry

Blargel

  • RAWR!
  • I'M AN ANGRY LOLI!
Re: Danmakufu Q&A/Problem Thread v3
« Reply #123 on: February 05, 2010, 06:53:14 PM »
I see what you mean....
Nevermind my issue is getting bullets to spawn and the fact it crashes now >:

Well you did say I'd be asking a few more questions :V
Code: [Select]
#TouhouDanmakufu
#Title[Dunno yet]
#Text[TEST YAY]
#Player[FREE]
#ScriptVersion[2]
#BGM[.\bgm\BorderofLife.mp3]

script_enemy_main{

let CSD = GetCurrentScriptDirectory;
let imgBoss = CSD ~ "system\boss17.png";
let cut = CSD ~ "system\yuyukocutin.png";
let bg = CSD ~ "system\bg.png";
let lay = CSD ~ "system\overlay.png";

let slide = 0;

let f = 0;
let f2 = 0;

@Initialize{
SetLife(1000);
SetMovePosition01(GetCenterX,120,5);

LoadGraphic(imgBoss);
LoadGraphic(cut);
LoadGraphic(bg);
LoadGraphic(lay);
LoadUserShotData(CSD ~ "system\supershot.txt");

MainTask;
}
@MainLoop{

yield;
}
@DrawLoop{
SetTexture(imgBoss);
SetRenderState(ALPHA);
SetAlpha(255);
SetGraphicScale(1,1);
SetGraphicAngle(0,0,0);

if(int(GetSpeedX())==0){
if(f<10){SetGraphicRect(0,0,50,80);}
if(f>=10 && f<20){SetGraphicRect(0,80,50,160);}
f2=0;
}

if(int(GetSpeedX())>0){
if(f2<10){SetGraphicRect(50,80,100,160);}
if(f2>=10){SetGraphicRect(100,80,150,160);}
f2++;
}

if(int(GetSpeedX())<0){
SetGraphicAngle(180,0,0);
if(f2<10){SetGraphicRect(50,80,100,160); }
if(f2>=10){SetGraphicRect(100,80,150,160);}
f2++;
}

f++;
if(f==20){f=0;}
DrawGraphic(GetX,GetY);
}
@BackGround{
SetTexture(bg);
SetRenderState(ADD);
SetAlpha(225);
SetGraphicRect(0,0,512,512+slide);
SetGraphicScale(1,1);
SetGraphicAngle(0,0,0);
DrawGraphic(GetCenterX,GetCenterY);

slide+=5;

SetTexture(lay);
SetRenderState(ALPHA);
SetAlpha(225);
SetGraphicRect(0,0,512,512);
SetGraphicScale(1,1);
SetGraphicAngle(0,0,0);
DrawGraphic(GetCenterX,GetCenterY);
}
@Finalize{
DeleteGraphic(imgBoss);
DeleteGraphic(cut);
DeleteGraphic(bg);
}

task MainTask{
      wait(60);
      loop{
         fire;
         wait(300);
      }
   }

task fire{
let x=0;
let g=3;
let z=0;
loop{
let Angle = GetAngleToPlayer;
let dir = Angle-45;
while(x<4){
if(g==4){g=5}
Laser1(GetEnemyX+50*cos(dir),GetEnemyY+50*sin(dir),dir,400,20,g,20);

if(z==0){CreateLaserA(1,GetEnemyX+50*cos(dir+45),GetEnemyY+50*sin(dir+45),500,15,2,40);
SetShotDirectionType(PLAYER);
SetLaserDataA(1,0,0,0,0,0,0);
SetShotKillTime(1,150);
SetShotDirectionType(ABSOLUTE);
FireShot(1);}
FireShot(0);

if(g==5){g=2};
g++;
x++;
Angle+=90;
dir+=90;
z++;
}
wait(200);
yield;
}
}

task Laser1(x,y,dir,L,W,g,delay){
let obj = Obj_Create(OBJ_LASER);

Obj_SetPosition(obj,x,y);
ObjLaser_SetLength(obj,L);
ObjLaser_SetWidth(obj,W);
ObjShot_SetGraphic(obj,g);
ObjShot_SetDelay(obj,delay);
ObjLaser_SetSource(obj,true);
Obj_SetAngle(obj,dir);

if(ObjLaser_GetEndY(obj) > GetClipMaxY){
let i = 0;
let dir2 = 0;
let g2=0;

if(g==3){g2+=210}
if(g==5){g2+=211}
while(i<6){
CreateShotA(1,ObjLaser_GetEndX(obj)+20*cos(dir2),ObjLaser_GetEndY(obj)+20*cos(dir2),0);
SetShotDataA(1,0,2,dir,0.2,0.1,3.5,g2);
FireShot(1);

dir2+=360/6;
i++;

}
g2+=-g2;
yield;

wait(150);
ObjShot_FadeDelete(obj);
}
if(ObjLaser_GetEndX(obj) > GetClipMaxX){
let i = 0;
let dir2 = 0;
let g2=0;

if(g==3){g2+=210}
if(g==5){g2+=211}
while(i<6){
CreateShotA(1,ObjLaser_GetEndX(obj)+20*cos(dir2),ObjLaser_GetEndY(obj)+20*cos(dir2),0);
SetShotDataA(1,0,2,dir,0.2,0.1,3.5,g2);
FireShot(1);

dir2+=360/6;
i++;

}
g2+=-g2;
yield;

wait(150);
ObjShot_FadeDelete(obj);
}
if(ObjLaser_GetEndY(obj) < GetClipMinY){
let i = 0;
let dir2 = 0;
let g2=0;

if(g==3){g2+=210}
if(g==5){g2+=211}
while(i<6){
CreateShotA(1,ObjLaser_GetEndX(obj)+20*cos(dir2),ObjLaser_GetEndY(obj)+20*cos(dir2),0);
SetShotDataA(1,0,2,dir,0.2,0.1,3.5,g2);
FireShot(1);

dir2+=360/6;
i++;

}
g2+=-g2;
yield;

wait(150);
ObjShot_FadeDelete(obj);
}
if(ObjLaser_GetEndX(obj) < GetClipMinX){
let i = 0;
let dir2 = 0;
let g2=0;

if(g==3){g2+=210}
if(g==5){g2+=211}
while(i<6){
CreateShotA(1,ObjLaser_GetEndX(obj)+20*cos(dir2),ObjLaser_GetEndY(obj)+20*cos(dir2),0);
SetShotDataA(1,0,2,dir,0.2,0.1,3.5,g2);
FireShot(1);

dir2+=360/6;
i++;

}
g2+=-g2;
yield;

wait(150);
ObjShot_FadeDelete(obj);
}



}

function wait(w){
loop(w){yield;}
}
}

The first thing I see that can be screwing with your code is this in your fire task:

FireShot(1);}
FireShot(0);


I'm pretty sure you didn't mean for that but if you did, then you have epic tabbing and organization skills and no one will ever figure out your scripts. The second thing I noticed is that you are incredibly messy.  :V
<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.

Iryan

  • Ph?nglui mglw?nafh
  • Cat R?lyeh wgah?nagl fhtagn.
Re: Danmakufu Q&A/Problem Thread v3
« Reply #124 on: February 05, 2010, 06:57:56 PM »
@ Kylesky

There is still the issue with the bullets that danmakufu refuses to spawn due to the huge values calculated. I'd suggest to use a much simpler calculation that doesn't reach these values. Due to the limited drawing capabilities of danmakufu, the optical difference wouldn't be that huge I believe. Something like...

Code: [Select]
   task Mathspear(px, py, v, ang, n, phi, amp, n2){

      let way=0;
      let exp=0;

      loop(n){

         ascent(i in 1..(n2+1)){
            exp=way^i;
            CreateShot01(px+amp*cos(ang+90)*sin(exp)*way, +amp*sin(ang+90)*sin(exp)*way, v, ang, graph[i], 0);
            CreateShot01(px-amp*cos(ang+90)*sin(exp)*way, -amp*sin(ang+90)*sin(exp)*way, v, ang, graph[i], 0);
         }

         way+=phi;

         yield;
      }

   }

If you want the entire spear to spawn at once an then move into a specific direction, I can arrange for that, too, but I'll tell you that you will have to choose between
a) using a comparatively small amount of bullets through which the pattern won't look good
b) using a high amount of bullets so the pattern looks good but the game slows down incredibly around the spawning time of the spear, making the game "lagg".
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."

DarkOverord

  • Damn Red Dragons
  • Aaaaaaaaaaaaaaaaargh
    • Lol YouTube
Re: Danmakufu Q&A/Problem Thread v3
« Reply #125 on: February 05, 2010, 07:29:47 PM »
The first thing I see that can be screwing with your code is this in your fire task:

FireShot(1);}
FireShot(0);


I'm pretty sure you didn't mean for that but if you did, then you have epic tabbing and organization skills and no one will ever figure out your scripts. The second thing I noticed is that you are incredibly messy.  :V
Oh wha, whoops,Forgot to get rid of FireShot(0) there :V Though that } is from the If statement earlier.

And yes. I'm VERY messy and I apologise for that. The only neat thing I do is tab align I have to admit. But I seem to have resolved what caused the crashing. My ghetto coded If Statements. I think I might have to ask more questions on this :V That or do the opposite of what I planned (I dunno, have the bullets hit the walls and fire lasers? :V)
« Last Edit: February 05, 2010, 07:33:47 PM by DarkOverord »
http://www.youtube.com/user/DarkOverord <-- its wat cool ddes do rite :V

Re: Danmakufu Q&A/Problem Thread v3
« Reply #126 on: February 05, 2010, 07:31:11 PM »
Danmaku Nimmt's Mima enemy:
Code: (Mima) [Select]
//==============================================================================
//   ★敵表示スクリプト 魅魔
//==============================================================================
// 角度にリフレッシュフラグ、任意値引数にプレイヤー番号を指定
//------------------------------------------------------------------------------
script_enemy_main ComMima{

   // ヘッダ
   #include_function ".libhedderCom.txt"
   #include_function ".libanimeanimeMima.txt"

   // 変数
   let nChar = CHR_MIMA;
   let nAct = ACT_SHOT_A;

   // 共通構造
   #include_function ".libstructCom.txt"

}

This probably uses #include_script

Chronojet ⚙ Dragon

  • The Oddity
  • 今コソ輝ケ、我ガ未来、ソノ可能性!!
Re: Danmakufu Q&A/Problem Thread v3
« Reply #127 on: February 06, 2010, 02:37:37 AM »
Try downloading the DanmakuNimmt script. See if it does.

Infy♫

  • Demonic★Moe
  • *
Re: Danmakufu Q&A/Problem Thread v3
« Reply #128 on: February 06, 2010, 03:38:47 PM »
this is probably impossible, but how do i convert all bullets to point items or effect objects when a spellcard ends?

nevermind :|

KrackoCloud

  • I don't mean to be greedy...
  • ... but white rice is my favorite food.
Re: Danmakufu Q&A/Problem Thread v3
« Reply #129 on: February 07, 2010, 02:45:03 AM »
Could someone give a very simple script in which bullets pass a laser and change graphic and direction?

This is actually because I'm a bit worried about if my Danmakufu runs weird.
Two scripts I've downloaded before have not worked right, one of which I know for sure had to do with collisions and the like.

Re: Danmakufu Q&A/Problem Thread v3
« Reply #130 on: February 07, 2010, 03:49:36 AM »
Code: [Select]
#東方弾幕風
#Title[SampleC04]
#Text[SampleC04:レーザーに当たった弾の軌道を変える]
#Image[]
#BackGround[User]
#ScriptVersion[2]

script_enemy_main
{
let count= -90 ;//弾を出す間隔を制御するための変数
let cx=GetCenterX();//変数cxに中心x座標を代入
let cy=GetCenterY();//変数cxに中心y座標を代入
let imgExRumia=GetCurrentScriptDirectory~"img\ExRumia.png";
let arrayLaser=[];//LaserObjectのオブジェクトを保存しておく
@Initialize()
{
SetLife(1000);//敵のライフを1000に設定
SetGraphicRect(64,1,127,64);//描画元の矩形を(64,1)-(127,64)に設定
LoadGraphic(imgExRumia);//画像「img\ExRumia.png」を読みこむ
SetMovePosition02(cx,cy,60);//座標(cx,60)に60フレームで移動
}

@MainLoop()
{
if(count>0 && count%10 == 0)
{//30フレーム毎に弾をばらまく
let angle = 0;
while(angle<360)
{
ShotObject(GetX(), GetY(), 3, angle+count*5, AQUA21, 5);
angle+=10;
}
}
if(count == 60)
{//弾の軌道を変えるレーザー作成
LaserObject(0,RED01);
LaserObject(1,BLUE01);
LaserObject(2,GREEN01);
}
if(count == 360)
{//レーザー削除
let i=0;
loop(length(arrayLaser))
{
ObjShot_FadeDelete(arrayLaser[i]);
i++;
}
count=0;//カウンタを0にする
}

SetCollisionA(GetX(),GetY(),32);//敵の座標に当たり判定を登録
SetCollisionB(GetX(),GetY(),24);//敵の座標に当たり判定(体当たり用)を登録
count++;//1フレーム毎にcountが1増加
yield;//毎フレームタスク復帰
}

@DrawLoop()
{
SetTexture(imgExRumia);
DrawGraphic(GetX(),GetY());//敵の座標にExルーミアを描画;
}

@Finalize()
{
DeleteGraphic(imgExRumia);
}

task LaserObject(let num, let grf)
{//弾の軌道を変えるレーザー
//numは0-2のセットで敵を中心に三角形にレーザーを出現させる
//レーザータスク初期化
let r=120;
let angle=210+120*num;
let obj = Obj_Create(OBJ_LASER);
arrayLaser = arrayLaser~[obj];//オブジェクトをarrayLaserに登録
Obj_SetX(obj, GetX() + r*cos(angle-150));
Obj_SetY(obj, GetY() + r*sin(angle-150));
Obj_SetAngle(obj, angle);
ObjShot_SetGraphic(obj, grf);
ObjShot_SetDelay(obj, 120);//遅延時間:120フレーム
ObjLaser_SetLength(obj, (3^0.5)*r);//円に内接する正三角形の辺の長さ:√3*r
ObjLaser_SetWidth(obj, 12);//レーザーの幅:12
while( !Obj_BeDeleted(obj) )
{
angle+=1;//レーザーを回転
Obj_SetX(obj, GetX() + r*cos(angle-150));
Obj_SetY(obj, GetY() + r*sin(angle-150));
Obj_SetAngle(obj, angle);
yield;
}

let i=0;
loop(length(arrayLaser))
{//オブジェクトを削除
if(arrayLaser[i] == obj)
{//配列arrayLaserからi番目の要素を削除
arrayLaser = erase(arrayLaser, i);
break;
}
i++;
}
}
task ShotObject(let x, let y, let speed, let angle, let grf, let delay)
{//レーザーに当たったら軌道を変える弾
//弾タスク初期化
let obj = Obj_Create(OBJ_SHOT);
Obj_SetX(obj, x);
Obj_SetY(obj, y);
Obj_SetSpeed(obj, speed);
Obj_SetAngle(obj, angle);
ObjShot_SetGraphic(obj, grf);
ObjShot_SetDelay(obj, delay);

while( !Obj_BeDeleted(obj) )
{//削除されるまでループを実行
let i=0;
loop(length(arrayLaser))
{//レーザーとの当り判定を調査
if(Collision_Obj_Obj(arrayLaser[i], obj))
{//Laserと接触したら
//連続で判定されないよう普通の弾と入れ替える
//角度も変えておく
//数フレーム触れないようにカウンタで管理してもよいかも
x = Obj_GetX(obj);
y = Obj_GetY(obj);
CreateShot01(x, y, 3, Obj_GetAngle(arrayLaser[i])+90, grf, 0);
Obj_Delete(obj);
break;
}
i++;
}
yield;
}
}

}
 

KrackoCloud

  • I don't mean to be greedy...
  • ... but white rice is my favorite food.
Re: Danmakufu Q&A/Problem Thread v3
« Reply #131 on: February 07, 2010, 04:20:53 AM »
Mm. It works, so I guess I'm okay! Thanks.

DarkOverord

  • Damn Red Dragons
  • Aaaaaaaaaaaaaaaaargh
    • Lol YouTube
Re: Danmakufu Q&A/Problem Thread v3
« Reply #132 on: February 08, 2010, 07:26:32 PM »
Yeah I'm still struggling with this Lasers, walls, and bullets shoting from the lasers at the walls. I've tried doing it mathematically (Pythagoras lololololol). But I seem to suck at this :B

I tried using add shot. But it isn't working....as planed. While I could say "lol it's something I'm doing wrong". I honestly think it's more something I'm not doing :V I don't suppose anyone has a crash course or a script I could look at to help me with this? I mean I know ZUN has done it with Nazrin! :B
http://www.youtube.com/user/DarkOverord <-- its wat cool ddes do rite :V

Iryan

  • Ph?nglui mglw?nafh
  • Cat R?lyeh wgah?nagl fhtagn.
Re: Danmakufu Q&A/Problem Thread v3
« Reply #133 on: February 08, 2010, 07:53:17 PM »
*cough cough*

Code: [Select]
    task DestructionLaser(x, y, t, type){


let obj = Obj_Create(OBJ_LASER);
Obj_SetPosition(obj, x, y);

let astart;
let aend;

if(type==1){
astart=atan2((GetClipMaxY - Obj_GetY(obj)), (GetClipMinX - Obj_GetX(obj)));
aend=atan2((GetClipMaxY - Obj_GetY(obj)), (GetClipMaxX - Obj_GetX(obj)))+360;
} else{
astart=atan2((GetClipMaxY - Obj_GetY(obj)), (GetClipMaxX - Obj_GetX(obj)))+360;
aend=atan2((GetClipMaxY - Obj_GetY(obj)), (GetClipMinX - Obj_GetX(obj)));
}

let adiff=(aend-astart)/t;

Obj_SetAngle(obj, astart);

ObjShot_SetGraphic(obj, WHITE02);
ObjShot_SetDelay(obj, 60+t);
ObjLaser_SetWidth(obj, 20);
ObjLaser_SetLength(obj, 500);

let destx;
let desty;

let atemp1=atan2((GetClipMinY - Obj_GetY(obj)), (GetClipMinX - Obj_GetX(obj)))+360;
let atemp2=atan2((GetClipMinY - Obj_GetY(obj)), (GetClipMaxX - Obj_GetX(obj)))+360;

loop(t){


if(Obj_GetAngle(obj)<atemp1){
destx=GetClipMinX;
desty=Obj_GetY(obj)+(destx-Obj_GetX(obj))*tan(Obj_GetAngle(obj)-180);
} else{ if(Obj_GetAngle(obj)>atemp2){
destx=GetClipMaxX;
desty=Obj_GetY(obj)+(destx-Obj_GetX(obj))*tan(Obj_GetAngle(obj)-180);
} else{
desty=GetClipMinY;
destx=Obj_GetX(obj)-(desty-Obj_GetY(obj))*tan(Obj_GetAngle(obj)-90);
} }

astart+=adiff;
Obj_SetAngle(obj, astart);

ascent(i in 0..3){
CreateShotA(1, destx, desty, 5);
SetShotDataA_XY(1, 0, rand(-1, 1), rand(-0.5, 0.5), 0, 0.03, 0, 4, colour3[i]);
FireShot(1);
}
yield;
}
Obj_Delete(obj);
    }
This is part of the boss battle I'm currently working on. You can take it as a reference.

For the creation of the bullets, first you check which of the borders of the playing field the laser points at. You do this by comparing the angle of the laser to the angle from the laser source to the corners of the playing field. Keep in mind that Obj_GetAngle gives an angle between 0? and 360? while atan2 gives an angle between -180? and 180?. Danmakufu is really a bitch here.

Then pythagoras is applied according to the border the laser is currently touching to determine the spawning point of the bullets.
« Last Edit: February 08, 2010, 08:00:13 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."

DarkOverord

  • Damn Red Dragons
  • Aaaaaaaaaaaaaaaaargh
    • Lol YouTube
Re: Danmakufu Q&A/Problem Thread v3
« Reply #134 on: February 08, 2010, 08:40:43 PM »
*cough cough*

Code: [Select]
    task DestructionLaser(x, y, t, type){


let obj = Obj_Create(OBJ_LASER);
Obj_SetPosition(obj, x, y);

let astart;
let aend;

if(type==1){
astart=atan2((GetClipMaxY - Obj_GetY(obj)), (GetClipMinX - Obj_GetX(obj)));
aend=atan2((GetClipMaxY - Obj_GetY(obj)), (GetClipMaxX - Obj_GetX(obj)))+360;
} else{
astart=atan2((GetClipMaxY - Obj_GetY(obj)), (GetClipMaxX - Obj_GetX(obj)))+360;
aend=atan2((GetClipMaxY - Obj_GetY(obj)), (GetClipMinX - Obj_GetX(obj)));
}

let adiff=(aend-astart)/t;

Obj_SetAngle(obj, astart);

ObjShot_SetGraphic(obj, WHITE02);
ObjShot_SetDelay(obj, 60+t);
ObjLaser_SetWidth(obj, 20);
ObjLaser_SetLength(obj, 500);

let destx;
let desty;

let atemp1=atan2((GetClipMinY - Obj_GetY(obj)), (GetClipMinX - Obj_GetX(obj)))+360;
let atemp2=atan2((GetClipMinY - Obj_GetY(obj)), (GetClipMaxX - Obj_GetX(obj)))+360;

loop(t){


if(Obj_GetAngle(obj)<atemp1){
destx=GetClipMinX;
desty=Obj_GetY(obj)+(destx-Obj_GetX(obj))*tan(Obj_GetAngle(obj)-180);
} else{ if(Obj_GetAngle(obj)>atemp2){
destx=GetClipMaxX;
desty=Obj_GetY(obj)+(destx-Obj_GetX(obj))*tan(Obj_GetAngle(obj)-180);
} else{
desty=GetClipMinY;
destx=Obj_GetX(obj)-(desty-Obj_GetY(obj))*tan(Obj_GetAngle(obj)-90);
} }

astart+=adiff;
Obj_SetAngle(obj, astart);

ascent(i in 0..3){
CreateShotA(1, destx, desty, 5);
SetShotDataA_XY(1, 0, rand(-1, 1), rand(-0.5, 0.5), 0, 0.03, 0, 4, colour3[i]);
FireShot(1);
}
yield;
}
Obj_Delete(obj);
    }
This is part of the boss battle I'm currently working on. You can take it as a reference.

For the creation of the bullets, first you check which of the borders of the playing field the laser points at. You do this by comparing the angle of the laser to the angle from the laser source to the corners of the playing field. Keep in mind that Obj_GetAngle gives an angle between 0? and 360? while atan2 gives an angle between -180? and 180?. Danmakufu is really a bitch here.

Then pythagoras is applied according to the border the laser is currently touching to determine the spawning point of the bullets.
Oh thanks. And it's nice to see I had the right idea using Pythag, I was sort of on the right trac I see, just no idea how to code it XD. and I figured atan2 would've done that. Most computers using Trig functions normally return values like that (Remembers Pascal argh).

I'll have a lil mess round and see what I manage. But thank you very much Iryan :D
http://www.youtube.com/user/DarkOverord <-- its wat cool ddes do rite :V

KrackoCloud

  • I don't mean to be greedy...
  • ... but white rice is my favorite food.
Re: Danmakufu Q&A/Problem Thread v3
« Reply #135 on: February 08, 2010, 09:15:56 PM »
I'm having my troubles in getting backgrounds to work.
Well, since I'm new at this concept, spellcard backgrounds in particular.

It seems I can't get it to show up in the @Background loop. If I move the code to @DrawLoop, it works, but then no boss graphic appears.

Iryan

  • Ph?nglui mglw?nafh
  • Cat R?lyeh wgah?nagl fhtagn.
Re: Danmakufu Q&A/Problem Thread v3
« Reply #136 on: February 08, 2010, 09:45:58 PM »
I don't know that much about backgrounds, but I'm fairly certain that @Background only works on stages and spellcards, that is boss enemies that call the SetScore function.

If you have a single (still or linear scrolling) picture for your background image, you can simply use the #BackGround[] block in the top of the script. It will be ignored on any boss attack that has an @Background part, so you can have a simple background for all non-cards and script a special background for your spell cards.
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."

DarkOverord

  • Damn Red Dragons
  • Aaaaaaaaaaaaaaaaargh
    • Lol YouTube
Re: Danmakufu Q&A/Problem Thread v3
« Reply #137 on: February 08, 2010, 10:18:16 PM »
http://www.youtube.com/watch?v=LNToeEMZz1I

I found this was pretty useful for learning BG's =D. Helepolis explains how to do it rather well
http://www.youtube.com/user/DarkOverord <-- its wat cool ddes do rite :V

Gc

  • youtu.be/pRZpjlrKM8A
Re: Danmakufu Q&A/Problem Thread v3
« Reply #138 on: February 08, 2010, 10:54:29 PM »
How about some more tokenizer error ?

Code: [Select]
#UserShotData
ShotImage = ".\shot.png"

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// 01                                                                                                            //
ShotData {id = 1    rect = (0,0,16,16)        render = ALPHA  delay_color = (255,255,255)  angular_velocity = 0} //White
ShotData {id = 2    rect = (128,0,144,16)     render = ALPHA  delay_color = (255,127,127)  angular_velocity = 0} //Red
ShotData {id = 3    rect = (256,0,272,16)     render = ALPHA  delay_color = (255,191,127)  angular_velocity = 0} //Orange
ShotData {id = 4    rect = (384,0,400,16)     render = ALPHA  delay_color = (255,255,127)  angular_velocity = 0} //Yellow
ShotData {id = 5    rect = (0,128,16,144)     render = ALPHA  delay_color = (191,255,127)  angular_velocity = 0} //Lime
ShotData {id = 6    rect = (128,128,144,144)  render = ALPHA  delay_color = (127,255,127)  angular_velocity = 0} //Green
ShotData {id = 7    rect = (256,128,272,144)  render = ALPHA  delay_color = (127,255,191)  angular_velocity = 0} //Teal
ShotData {id = 8    rect = (384,128,400,144)  render = ALPHA  delay_color = (127,255,255)  angular_velocity = 0} //Cyan
ShotData {id = 9    rect = (0,256,16,272)     render = ALPHA  delay_color = (127,191,255)  angular_velocity = 0} //Aqua
ShotData {id = 10   rect = (128,256,144,272)  render = ALPHA  delay_color = (127,127,255)  angular_velocity = 0} //Blue
ShotData {id = 11   rect = (256,256,272,272)  render = ALPHA  delay_color = (191,127,255)  angular_velocity = 0} //Purple
ShotData {id = 12   rect = (384,256,400,272)  render = ALPHA  delay_color = (255,127,255)  angular_velocity = 0} //Magenta
ShotData {id = 13   rect = (0,384,16,400)     render = ALPHA  delay_color = (255,127,191)  angular_velocity = 0} //Pink
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// 02                                                                                                            //
ShotData {id = 14   rect = (0,32,24,56)       render = ALPHA  delay_color = (255,255,255)  angular_velocity = 0} //White
ShotData {id = 15   rect = (128,32,152,56)    render = ALPHA  delay_color = (255,127,127)  angular_velocity = 0} //Red
ShotData {id = 16   rect = (256,32,280,56)    render = ALPHA  delay_color = (255,191,127)  angular_velocity = 0} //Orange
ShotData {id = 17   rect = (384,32,408,56)    render = ALPHA  delay_color = (255,255,127)  angular_velocity = 0} //Yellow
ShotData {id = 18   rect = (0,160,24,184)     render = ALPHA  delay_color = (191,255,127)  angular_velocity = 0} //Lime
ShotData {id = 19   rect = (128,160,152,184)  render = ALPHA  delay_color = (127,255,127)  angular_velocity = 0} //Green
ShotData {id = 20   rect = (256,160,280,184)  render = ALPHA  delay_color = (127,255,191)  angular_velocity = 0} //Teal
ShotData {id = 21   rect = (384,160,408,184)  render = ALPHA  delay_color = (127,255,255)  angular_velocity = 0} //Cyan
ShotData {id = 22   rect = (0,288,24,312)     render = ALPHA  delay_color = (127,191,255)  angular_velocity = 0} //Aqua
ShotData {id = 23   rect = (128,288,152,312)  render = ALPHA  delay_color = (127,127,255)  angular_velocity = 0} //Blue
ShotData {id = 24   rect = (256,288,280,312)  render = ALPHA  delay_color = (191,127,255)  angular_velocity = 0} //Purple
ShotData {id = 25   rect = (384,288,408,312)  render = ALPHA  delay_color = (255,127,255)  angular_velocity = 0} //Magenta
ShotData {id = 26   rect = (0,416,24,440)     render = ALPHA  delay_color = (255,127,191)  angular_velocity = 0} //Pink
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// 03                                                                                                            //
ShotData {id = 27   rect = (0,64,32,96)       render = ALPHA  delay_color = (255,255,255)  angular_velocity = 0} //White
ShotData {id = 28   rect = (128,64,160,96)    render = ALPHA  delay_color = (255,127,127)  angular_velocity = 0} //Red
ShotData {id = 29   rect = (256,64,288,96)    render = ALPHA  delay_color = (255,191,127)  angular_velocity = 0} //Orange
ShotData {id = 30   rect = (384,64,416,96)    render = ALPHA  delay_color = (255,255,127)  angular_velocity = 0} //Yellow
ShotData {id = 31   rect = (0,192,32,224)     render = ALPHA  delay_color = (191,255,127)  angular_velocity = 0} //Lime
ShotData {id = 32   rect = (128,192,160,224)  render = ALPHA  delay_color = (127,255,127)  angular_velocity = 0} //Green
ShotData {id = 33   rect = (256,192,288,224)  render = ALPHA  delay_color = (127,255,191)  angular_velocity = 0} //Teal
ShotData {id = 34   rect = (384,192,416,224)  render = ALPHA  delay_color = (127,255,255)  angular_velocity = 0} //Cyan
ShotData {id = 35   rect = (0,320,32,352)     render = ALPHA  delay_color = (127,191,255)  angular_velocity = 0} //Aqua
ShotData {id = 36   rect = (128,320,160,352)  render = ALPHA  delay_color = (127,127,255)  angular_velocity = 0} //Blue
ShotData {id = 37   rect = (256,320,288,352)  render = ALPHA  delay_color = (191,127,255)  angular_velocity = 0} //Purple
ShotData {id = 38   rect = (384,320,416,352)  render = ALPHA  delay_color = (255,127,255)  angular_velocity = 0} //Magenta
ShotData {id = 39   rect = (0,448,32,480)     render = ALPHA  delay_color = (255,127,191)  angular_velocity = 0} //Pink
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// 04                                                                                                            //
ShotData {id = 40   rect = (0,96,16,128)      render = ALPHA  delay_color = (255,255,255)  angular_velocity = 0} //White
ShotData {id = 41   rect = (128,96,144,128)   render = ALPHA  delay_color = (255,127,127)  angular_velocity = 0} //Red
ShotData {id = 42   rect = (256,96,272,128)   render = ALPHA  delay_color = (255,191,127)  angular_velocity = 0} //Orange
ShotData {id = 43   rect = (384,96,400,128)   render = ALPHA  delay_color = (255,255,127)  angular_velocity = 0} //Yellow
ShotData {id = 44   rect = (0,224,16,256)     render = ALPHA  delay_color = (191,255,127)  angular_velocity = 0} //Lime
ShotData {id = 45   rect = (128,224,144,256)  render = ALPHA  delay_color = (127,255,127)  angular_velocity = 0} //Green
ShotData {id = 46   rect = (256,224,272,256)  render = ALPHA  delay_color = (127,255,191)  angular_velocity = 0} //Teal
ShotData {id = 47   rect = (384,224,400,256)  render = ALPHA  delay_color = (127,255,255)  angular_velocity = 0} //Cyan
ShotData {id = 48   rect = (0,352,16,384)     render = ALPHA  delay_color = (127,191,255)  angular_velocity = 0} //Aqua
ShotData {id = 49   rect = (128,352,144,384)  render = ALPHA  delay_color = (127,127,255)  angular_velocity = 0} //Blue
ShotData {id = 50   rect = (256,352,272,384)  render = ALPHA  delay_color = (191,127,255)  angular_velocity = 0} //Purple
ShotData {id = 51   rect = (384,352,400,384)  render = ALPHA  delay_color = (255,127,255)  angular_velocity = 0} //Magenta
ShotData {id = 52   rect = (0,480,16,512)     render = ALPHA  delay_color = (255,127,191)  angular_velocity = 0} //Pink
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// 05                                                                                                            //
ShotData {id = 53   rect = (16,16,32,32)      render = ALPHA  delay_color = (255,255,255)  angular_velocity = 0} //White
ShotData {id = 54   rect = (144,16,160,32)    render = ALPHA  delay_color = (255,127,127)  angular_velocity = 0} //Red
ShotData {id = 55   rect = (272,16,288,32)    render = ALPHA  delay_color = (255,191,127)  angular_velocity = 0} //Orange
ShotData {id = 56   rect = (400,16,416,32)    render = ALPHA  delay_color = (255,255,127)  angular_velocity = 0} //Yellow
ShotData {id = 57   rect = (16,144,32,160)    render = ALPHA  delay_color = (191,255,127)  angular_velocity = 0} //Lime
ShotData {id = 58   rect = (144,144,160,160)  render = ALPHA  delay_color = (127,255,127)  angular_velocity = 0} //Green
ShotData {id = 59   rect = (272,144,288,160)  render = ALPHA  delay_color = (127,255,191)  angular_velocity = 0} //Teal
ShotData {id = 60   rect = (400,144,416,160)  render = ALPHA  delay_color = (127,255,255)  angular_velocity = 0} //Cyan
ShotData {id = 61   rect = (16,272,32,288)    render = ALPHA  delay_color = (127,191,255)  angular_velocity = 0} //Aqua
ShotData {id = 62   rect = (144,272,160,288)  render = ALPHA  delay_color = (127,127,255)  angular_velocity = 0} //Blue
ShotData {id = 63   rect = (272,272,288,288)  render = ALPHA  delay_color = (191,127,255)  angular_velocity = 0} //Purple
ShotData {id = 64   rect = (400,272,416,288)  render = ALPHA  delay_color = (255,127,255)  angular_velocity = 0} //Magenta
ShotData {id = 65   rect = (16,400,32,416)    render = ALPHA  delay_color = (255,127,191)  angular_velocity = 0} //Pink
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// 06                                                                                                            //
ShotData {id = 66   rect = (64,0,128,64)      render = ALPHA  delay_color = (255,255,255)  angular_velocity = 0} //White
ShotData {id = 67   rect = (192,0,256,64)     render = ALPHA  delay_color = (255,127,127)  angular_velocity = 0} //Red
ShotData {id = 68   rect = (320,0,384,64)     render = ALPHA  delay_color = (255,191,127)  angular_velocity = 0} //Orange
ShotData {id = 69   rect = (448,0,512,64)     render = ALPHA  delay_color = (255,255,127)  angular_velocity = 0} //Yellow
ShotData {id = 70   rect = (64,128,128,192)   render = ALPHA  delay_color = (191,255,127)  angular_velocity = 0} //Lime
ShotData {id = 71   rect = (192,128,256,192)  render = ALPHA  delay_color = (127,255,127)  angular_velocity = 0} //Green
ShotData {id = 72   rect = (320,128,384,192)  render = ALPHA  delay_color = (127,255,191)  angular_velocity = 0} //Teal
ShotData {id = 73   rect = (448,128,512,192)  render = ALPHA  delay_color = (127,255,255)  angular_velocity = 0} //Cyan
ShotData {id = 74   rect = (64,256,128,320)   render = ALPHA  delay_color = (127,191,255)  angular_velocity = 0} //Aqua
ShotData {id = 75   rect = (192,256,256,320)  render = ALPHA  delay_color = (127,127,255)  angular_velocity = 0} //Blue
ShotData {id = 76   rect = (320,256,384,320)  render = ALPHA  delay_color = (191,127,255)  angular_velocity = 0} //Purple
ShotData {id = 77   rect = (448,256,512,320)  render = ALPHA  delay_color = (255,127,255)  angular_velocity = 0} //Magenta
ShotData {id = 78   rect = (64,384,128,448)   render = ALPHA  delay_color = (255,127,191)  angular_velocity = 0} //Pink
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// 11                                                                                                            //
ShotData {id = 79   rect = (32,0,48,16)       render = ALPHA  delay_color = (255,255,255)  angular_velocity = 0} //White
ShotData {id = 80   rect = (160,0,176,16)     render = ALPHA  delay_color = (255,127,127)  angular_velocity = 0} //Red
ShotData {id = 81   rect = (288,0,304,16)     render = ALPHA  delay_color = (255,191,127)  angular_velocity = 0} //Orange
ShotData {id = 82   rect = (416,0,432,16)     render = ALPHA  delay_color = (255,255,127)  angular_velocity = 0} //Yellow
ShotData {id = 83   rect = (32,128,48,144)    render = ALPHA  delay_color = (191,255,127)  angular_velocity = 0} //Lime
ShotData {id = 84   rect = (160,128,176,144)  render = ALPHA  delay_color = (127,255,127)  angular_velocity = 0} //Green
ShotData {id = 85   rect = (288,128,304,144)  render = ALPHA  delay_color = (127,255,191)  angular_velocity = 0} //Teal
ShotData {id = 86   rect = (416,128,432,144)  render = ALPHA  delay_color = (127,255,255)  angular_velocity = 0} //Cyan
ShotData {id = 87   rect = (32,256,48,272)    render = ALPHA  delay_color = (127,191,255)  angular_velocity = 0} //Aqua
ShotData {id = 88   rect = (160,256,176,272)  render = ALPHA  delay_color = (127,127,255)  angular_velocity = 0} //Blue
ShotData {id = 89   rect = (288,256,304,272)  render = ALPHA  delay_color = (191,127,255)  angular_velocity = 0} //Purple
ShotData {id = 90   rect = (416,256,432,272)  render = ALPHA  delay_color = (255,127,255)  angular_velocity = 0} //Magenta
ShotData {id = 91   rect = (32,384,48,400)    render = ALPHA  delay_color = (255,127,191)  angular_velocity = 0} //Pink
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// 12                                                                                                            //
ShotData {id = 92   rect = (32,32,56,56)      render = ALPHA  delay_color = (255,255,255)  angular_velocity = 0} //White
ShotData {id = 93   rect = (160,32,184,56)    render = ALPHA  delay_color = (255,127,127)  angular_velocity = 0} //Red
ShotData {id = 94   rect = (288,32,312,56)    render = ALPHA  delay_color = (255,191,127)  angular_velocity = 0} //Orange
ShotData {id = 95   rect = (416,32,440,56)    render = ALPHA  delay_color = (255,255,127)  angular_velocity = 0} //Yellow
ShotData {id = 96   rect = (32,160,56,184)    render = ALPHA  delay_color = (191,255,127)  angular_velocity = 0} //Lime
ShotData {id = 97   rect = (160,160,184,184)  render = ALPHA  delay_color = (127,255,127)  angular_velocity = 0} //Green
ShotData {id = 98   rect = (288,160,312,184)  render = ALPHA  delay_color = (127,255,191)  angular_velocity = 0} //Teal
ShotData {id = 99   rect = (416,160,440,184)  render = ALPHA  delay_color = (127,255,255)  angular_velocity = 0} //Cyan
ShotData {id = 100  rect = (32,288,56,312)    render = ALPHA  delay_color = (127,191,255)  angular_velocity = 0} //Aqua
ShotData {id = 101  rect = (160,288,184,312)  render = ALPHA  delay_color = (127,127,255)  angular_velocity = 0} //Blue
ShotData {id = 102  rect = (288,288,312,312)  render = ALPHA  delay_color = (191,127,255)  angular_velocity = 0} //Purple
ShotData {id = 103  rect = (416,288,440,312)  render = ALPHA  delay_color = (255,127,255)  angular_velocity = 0} //Magenta
ShotData {id = 104  rect = (32,416,56,440)    render = ALPHA  delay_color = (255,127,191)  angular_velocity = 0} //Pink
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// 13                                                                                                            //
ShotData {id = 105  rect = (32,64,64,96)      render = ALPHA  delay_color = (255,255,255)  angular_velocity = 0} //White
ShotData {id = 106  rect = (160,64,192,96)    render = ALPHA  delay_color = (255,127,127)  angular_velocity = 0} //Red
ShotData {id = 107  rect = (288,64,320,96)    render = ALPHA  delay_color = (255,191,127)  angular_velocity = 0} //Orange
ShotData {id = 108  rect = (416,64,448,96)    render = ALPHA  delay_color = (255,255,127)  angular_velocity = 0} //Yellow
ShotData {id = 109  rect = (32,192,64,224)    render = ALPHA  delay_color = (191,255,127)  angular_velocity = 0} //Lime
ShotData {id = 110  rect = (160,192,192,224)  render = ALPHA  delay_color = (127,255,127)  angular_velocity = 0} //Green
ShotData {id = 111  rect = (288,192,320,224)  render = ALPHA  delay_color = (127,255,191)  angular_velocity = 0} //Teal
ShotData {id = 112  rect = (416,192,448,224)  render = ALPHA  delay_color = (127,255,255)  angular_velocity = 0} //Cyan
ShotData {id = 113  rect = (32,320,64,352)    render = ALPHA  delay_color = (127,191,255)  angular_velocity = 0} //Aqua
ShotData {id = 114  rect = (160,320,192,352)  render = ALPHA  delay_color = (127,127,255)  angular_velocity = 0} //Blue
ShotData {id = 115  rect = (288,320,320,352)  render = ALPHA  delay_color = (191,127,255)  angular_velocity = 0} //Purple
ShotData {id = 116  rect = (416,320,448,352)  render = ALPHA  delay_color = (255,127,255)  angular_velocity = 0} //Magenta
ShotData {id = 117  rect = (32,448,64,480)    render = ALPHA  delay_color = (255,127,191)  angular_velocity = 0} //Pink
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// 14                                                                                                            //
ShotData {id = 118  rect = (032,96,048,128)   render = ALPHA  delay_color = (255,255,255)  angular_velocity = 0} //White
ShotData {id = 119  rect = (160,96,176,128)   render = ALPHA  delay_color = (255,127,127)  angular_velocity = 0} //Red
ShotData {id = 120  rect = (288,96,304,128)   render = ALPHA  delay_color = (255,191,127)  angular_velocity = 0} //Orange
ShotData {id = 121  rect = (416,96,432,128)   render = ALPHA  delay_color = (255,255,127)  angular_velocity = 0} //Yellow
ShotData {id = 122  rect = (32,224,48,256)    render = ALPHA  delay_color = (191,255,127)  angular_velocity = 0} //Lime
ShotData {id = 123  rect = (160,224,176,256)  render = ALPHA  delay_color = (127,255,127)  angular_velocity = 0} //Green
ShotData {id = 124  rect = (288,224,304,256)  render = ALPHA  delay_color = (127,255,191)  angular_velocity = 0} //Teal
ShotData {id = 125  rect = (416,224,432,256)  render = ALPHA  delay_color = (127,255,255)  angular_velocity = 0} //Cyan
ShotData {id = 126  rect = (32,352,48,384)    render = ALPHA  delay_color = (127,191,255)  angular_velocity = 0} //Aqua
ShotData {id = 127  rect = (160,352,176,384)  render = ALPHA  delay_color = (127,127,255)  angular_velocity = 0} //Blue
ShotData {id = 128  rect = (288,352,304,384)  render = ALPHA  delay_color = (191,127,255)  angular_velocity = 0} //Purple
ShotData {id = 129  rect = (416,352,432,384)  render = ALPHA  delay_color = (255,127,255)  angular_velocity = 0} //Magenta
ShotData {id = 130  rect = (32,480,48,512)    render = ALPHA  delay_color = (255,127,191)  angular_velocity = 0} //Pink
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// 15                                                                                                            //
ShotData {id = 131  rect = (48,16,64,32)      render = ALPHA  delay_color = (255,255,255)  angular_velocity = 0} //White
ShotData {id = 132  rect = (176,16,192,32)    render = ALPHA  delay_color = (255,127,127)  angular_velocity = 0} //Red
ShotData {id = 133  rect = (304,16,320,32)    render = ALPHA  delay_color = (255,191,127)  angular_velocity = 0} //Orange
ShotData {id = 134  rect = (432,16,448,32)    render = ALPHA  delay_color = (255,255,127)  angular_velocity = 0} //Yellow
ShotData {id = 135  rect = (48,144,64,160)    render = ALPHA  delay_color = (191,255,127)  angular_velocity = 0} //Lime
ShotData {id = 136  rect = (176,144,192,160)  render = ALPHA  delay_color = (127,255,127)  angular_velocity = 0} //Green
ShotData {id = 137  rect = (304,144,320,160)  render = ALPHA  delay_color = (127,255,191)  angular_velocity = 0} //Teal
ShotData {id = 138  rect = (432,144,448,160)  render = ALPHA  delay_color = (127,255,255)  angular_velocity = 0} //Cyan
ShotData {id = 139  rect = (48,272,064,288)   render = ALPHA  delay_color = (127,191,255)  angular_velocity = 0} //Aqua
ShotData {id = 140  rect = (176,272,192,288)  render = ALPHA  delay_color = (127,127,255)  angular_velocity = 0} //Blue
ShotData {id = 141  rect = (304,272,320,288)  render = ALPHA  delay_color = (191,127,255)  angular_velocity = 0} //Purple
ShotData {id = 142  rect = (432,272,448,288)  render = ALPHA  delay_color = (255,127,255)  angular_velocity = 0} //Magenta
ShotData {id = 143  rect = (48,400,64,416)    render = ALPHA  delay_color = (255,127,191)  angular_velocity = 0} //Pink
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// 16                                                                                                            //
ShotData {id = 144  rect = (64,64,128,128)    render = ALPHA  delay_color = (255,255,255)  angular_velocity = 0} //White
ShotData {id = 145  rect = (192,64,256,128)   render = ALPHA  delay_color = (255,127,127)  angular_velocity = 0} //Red
ShotData {id = 146  rect = (320,64,384,128)   render = ALPHA  delay_color = (255,191,127)  angular_velocity = 0} //Orange
ShotData {id = 147  rect = (448,64,512,128)   render = ALPHA  delay_color = (255,255,127)  angular_velocity = 0} //Yellow
ShotData {id = 148  rect = (64,192,128,256)   render = ALPHA  delay_color = (191,255,127)  angular_velocity = 0} //Lime
ShotData {id = 149  rect = (192,192,256,256)  render = ALPHA  delay_color = (127,255,127)  angular_velocity = 0} //Green
ShotData {id = 150  rect = (320,192,384,256)  render = ALPHA  delay_color = (127,255,191)  angular_velocity = 0} //Teal
ShotData {id = 151  rect = (448,192,512,256)  render = ALPHA  delay_color = (127,255,255)  angular_velocity = 0} //Cyan
ShotData {id = 152  rect = (64,320,128,384)   render = ALPHA  delay_color = (127,191,255)  angular_velocity = 0} //Aqua
ShotData {id = 153  rect = (192,320,256,384)  render = ALPHA  delay_color = (127,127,255)  angular_velocity = 0} //Blue
ShotData {id = 154  rect = (320,320,384,384)  render = ALPHA  delay_color = (191,127,255)  angular_velocity = 0} //Purple
ShotData {id = 155  rect = (448,320,512,384)  render = ALPHA  delay_color = (255,127,255)  angular_velocity = 0} //Magenta
ShotData {id = 156  rect = (64,448,128,512)   render = ALPHA  delay_color = (255,127,191)  angular_velocity = 0} //Pink
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
« Last Edit: February 08, 2010, 10:56:08 PM by Gamecubic »

Areylie

  • Cirno's Sister
    • Lymia's Website
Re: Danmakufu Q&A/Problem Thread v3
« Reply #139 on: February 08, 2010, 11:10:08 PM »
Curses. That's what I wanted to do :V Just how complicated are we talking or should I just scrap that idea and use an object bullet for now :V?
How complicated? Depends on weather you want to use complicated trigonometry or complicated OBJ_LASER hax.
[Geek code (3.12): GCS/H/M d+(-) s+:->--:- a--->? C+(++++)>$ UL++@ P+(++) L+++ E- W++ N o K? w-@ O- M- V? PS++@ PE>- Y+ PGP++ t- 5? X? R+@ tv- b+(++) DI D-- G? e>+++(++++) h! r++ x-]
[Furry code (1.3): FFm1r A !C D? H+++ M? P++++ R-- T W !Z Sf! RLCT a- cl+~++++>$ d--- e>+++ f? h* i++/+++ j+ p+ sf!]

KrackoCloud

  • I don't mean to be greedy...
  • ... but white rice is my favorite food.
Re: Danmakufu Q&A/Problem Thread v3
« Reply #140 on: February 08, 2010, 11:23:19 PM »
http://www.youtube.com/watch?v=LNToeEMZz1I

I found this was pretty useful for learning BG's =D. Helepolis explains how to do it rather well
Yeah, I already watched it some time ago. But I still couldn't figure out what was wrong, so I'm back here.

I guess maybe I'll try to be a bit more specific.
I'm trying to use a static background atm for some spellcard attacks.
The problem is that nothing appears. I still see the default spellcard background - The one that's all shiny and purple and stuffs.
I've tried using #Background and @Background, but nothing ever seems to show up.
As I said before, I can make it appear through @DrawLoop, but that would make the boss sprite disappear.

Areylie

  • Cirno's Sister
    • Lymia's Website
Re: Danmakufu Q&A/Problem Thread v3
« Reply #141 on: February 08, 2010, 11:31:28 PM »
As I said before, I can make it appear through @DrawLoop, but that would make the boss sprite disappear.
Place the code for drawing the sprite after the code for drawing the background.
[Geek code (3.12): GCS/H/M d+(-) s+:->--:- a--->? C+(++++)>$ UL++@ P+(++) L+++ E- W++ N o K? w-@ O- M- V? PS++@ PE>- Y+ PGP++ t- 5? X? R+@ tv- b+(++) DI D-- G? e>+++(++++) h! r++ x-]
[Furry code (1.3): FFm1r A !C D? H+++ M? P++++ R-- T W !Z Sf! RLCT a- cl+~++++>$ d--- e>+++ f? h* i++/+++ j+ p+ sf!]

Re: Danmakufu Q&A/Problem Thread v3
« Reply #142 on: February 08, 2010, 11:32:49 PM »

I'm trying to use a static background atm for some spellcard attacks.
The problem is that nothing appears. I still see the default spellcard background - The one that's all shiny and purple and stuffs.
I've tried using #Background and @Background, but nothing ever seems to show up.
Do you have a SetScore in your Initalize?

KrackoCloud

  • I don't mean to be greedy...
  • ... but white rice is my favorite food.
Re: Danmakufu Q&A/Problem Thread v3
« Reply #143 on: February 09, 2010, 12:03:11 AM »
Yep, and the spellcards themselves work perfectly fine.
Maybe I'll post up one of the codes if this problems persists.

DarkOverord

  • Damn Red Dragons
  • Aaaaaaaaaaaaaaaaargh
    • Lol YouTube
Re: Danmakufu Q&A/Problem Thread v3
« Reply #144 on: February 09, 2010, 12:23:19 AM »
How complicated? Depends on weather you want to use complicated trigonometry or complicated OBJ_LASER hax.
Actually thanks to Iryan it runs almost perfect. I've just gont one Trig that doesn't seem to work. Guys.

Just because I want to double check I'm not messing this up (I probably am). What angle is that Red laser pointing at? 180 I think?
http://www.youtube.com/user/DarkOverord <-- its wat cool ddes do rite :V

Re: Danmakufu Q&A/Problem Thread v3
« Reply #145 on: February 09, 2010, 12:30:04 AM »
90?

Where did you learn Danmakufu, just out of curiousity?

DarkOverord

  • Damn Red Dragons
  • Aaaaaaaaaaaaaaaaargh
    • Lol YouTube
Re: Danmakufu Q&A/Problem Thread v3
« Reply #146 on: February 09, 2010, 12:38:00 AM »
90?

Where did you learn Danmakufu, just out of curiousity?
Helepolis' YouTube Tutorials and Touhou wiki.

About 5 days ago :B And I just looked up the vid where angles are mentioned :V I forgot and my mind reset to 0 is at the top not to the right >.< I'll keep that in mind as I try and troubleshoot it again. I wanna make sure I'm not being really stupid before I ask again :V
http://www.youtube.com/user/DarkOverord <-- its wat cool ddes do rite :V

Re: Danmakufu Q&A/Problem Thread v3
« Reply #147 on: February 09, 2010, 12:42:19 AM »
No no no, I just wanted to make sure everything was getting covered in the tutorials that are available. If you don't know something, then it's not a stupid question.

DarkOverord

  • Damn Red Dragons
  • Aaaaaaaaaaaaaaaaargh
    • Lol YouTube
Re: Danmakufu Q&A/Problem Thread v3
« Reply #148 on: February 09, 2010, 12:44:46 AM »
No no no, I just wanted to make sure everything was getting covered in the tutorials that are available. If you don't know something, then it's not a stupid question.
I dunno. Forgetting Danmakufu's angle setup is a bit silly. And yeah. I'm pretty much trying to do stuff that I haven't seen in a tutorial (Getting a laser to spawn bullets, unless there is one and I missed it)
http://www.youtube.com/user/DarkOverord <-- its wat cool ddes do rite :V

Re: Danmakufu Q&A/Problem Thread v3
« Reply #149 on: February 09, 2010, 12:48:26 AM »
Heh, we have a basic tutorial if you're really interested in danmakufu. Some of it will be refresher from the videos, but I guarentee you'll have a much deeper understanding if you read through the basic tutorial, rather than if you just go by a ten minute video...

And yes, it covers spawning bullets from other bullets and lasers.

Tutorial thread index is stickied by the way, when you're ready to learn a new topic.