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

Drake

  • *
Re: Danmakufu Q&A/Problem Thread II
« Reply #480 on: December 01, 2009, 09:41:15 PM »
Oh. Your syntax is wrong. Just get rid of the semicolon at the end of include_function.

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

Chronojet ⚙ Dragon

  • The Oddity
  • 今コソ輝ケ、我ガ未来、ソノ可能性!!
Re: Danmakufu Q&A/Problem Thread II
« Reply #481 on: December 01, 2009, 09:47:44 PM »
"#include_function(で(two kanji)するフ(more katakana)[file path](more japanese text)".

Can't find any of the other characters...
Just screenshot it and we'll see.

AweStriker Nova

  • Star Sign "Thunder Constellation"
Re: Danmakufu Q&A/Problem Thread II
« Reply #482 on: December 01, 2009, 10:00:53 PM »
Fixed the syntax.

(Epic fail on my part)

This still occurs, though.
« Last Edit: December 01, 2009, 10:20:22 PM by AweStriker Nova »

Drake

  • *
Re: Danmakufu Q&A/Problem Thread II
« Reply #483 on: December 01, 2009, 10:15:14 PM »
nice job covering the actual error lol

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

AweStriker Nova

  • Star Sign "Thunder Constellation"
Re: Danmakufu Q&A/Problem Thread II
« Reply #484 on: December 01, 2009, 10:19:46 PM »
Let's try this again.



There.

...Perchance I should have veiled up my name there.
« Last Edit: December 01, 2009, 10:28:16 PM by AweStriker Nova »

Chronojet ⚙ Dragon

  • The Oddity
  • 今コソ輝ケ、我ガ未来、ソノ可能性!!
Re: Danmakufu Q&A/Problem Thread II
« Reply #485 on: December 01, 2009, 10:45:16 PM »
Let's try this again.



There.

...Perchance I should have veiled up my name there.
Touhou Danmakufu can't find the "shot_replace.dnh" in libExpandedShotData folder. (Did I say that properly?)

AweStriker Nova

  • Star Sign "Thunder Constellation"
Re: Danmakufu Q&A/Problem Thread II
« Reply #486 on: December 01, 2009, 10:53:45 PM »
OH, THAT'S IT?

I had Expanded Shot Replace outside of lib.

Figures, except it's only firing one set of stars...

And I should probably change the stars to something less... jerky.

Drake

  • *
Re: Danmakufu Q&A/Problem Thread II
« Reply #487 on: December 01, 2009, 11:27:04 PM »
It only fires one set because
-On Initialize, mainTask is run
-mainTask waits a frame and tells fire to run
-fire shoots bullets
And that's it. Make a loop in mainTask like

Code: [Select]
   task mainTask{
      loop{
         loop(20){yield;}
         fire;
      }
   }
or something. Also remember to reset xmax, or after a while it'll start shitting stars like IaMP.

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

AweStriker Nova

  • Star Sign "Thunder Constellation"
Re: Danmakufu Q&A/Problem Thread II
« Reply #488 on: December 01, 2009, 11:50:56 PM »
It's a survival card (hence the lack of hitbox), so it's supposed to get more aggressive over time.

But I think I'll scrap the idea...

How would I get bullets to move sort of like the white squares always floating around bosses?

ChaoStar

  • Dark History Boy
Re: Danmakufu Q&A/Problem Thread II
« Reply #489 on: December 02, 2009, 03:14:33 AM »
MY BOMB IT DOES NOT ACTIVATE. Help me Onii-sama  :'(

Code: [Select]
#TouhouDanmakufu[Player]
#ScriptVersion[2]
#Menu[Kaguya Houraisan]
#Text[Lunatic Princess. Designed by ChaoStar.]
#Image[.\KaguyaProfile.png]
#ReplayName[Short player name]


script_player_main{

let CSD = GetCurrentScriptDirectory;

let imgPlayer = CSD ~ "KaguyaSheet.png";

let frodo = 0; //frodo is for frames.

let kirk = 0; //kirk is for count.

let ImpossibleRequest = 1;


  @Initialize{
LoadPlayerShotData(GetCurrentScriptDirectory~"Kaguya_shotdata.txt");
LoadGraphic(imgPlayer);
SetPlayerLifeImage(imgPlayer,45,34,59,47);
SetItemCollectLine(128);
SetSpeed(4.6, 1.8);
mainTask;

}

@MainLoop{
SetIntersectionCircle(GetPlayerX,GetPlayerY,0);
if(GetKeyState(VK_USER)==KEY_PUSH){ImpossibleRequest++; if(ImpossibleRequest==6){ImpossibleRequest=1;}}
yield;


}

@Missed{
}

@Spellcard{
    UseSpellCard("EternityManipulation", 0);
}

@DrawLoop{
  SetTexture(imgPlayer);
SetGraphicRect(24,54,64,95);
  DrawGraphic(GetPlayerX(), GetPlayerY());
}

@Finalize{
}



task mainTask{
loop{
if(ImpossibleRequest==1){JewelBranch;} else if(ImpossibleRequest==2){FireCape;} else if(ImpossibleRequest==3){DragonNecklace;} else if(ImpossibleRequest==4){StoneBowl}else if(ImpossibleRequest==5){CowryShell;}
yield;
}
}

task dostuff{
loop{
yield;
}
}



task JewelBranch{
if((GetKeyState(VK_SHOT) == KEY_PUSH || GetKeyState(VK_SHOT) == KEY_HOLD) && frodo%1==0) {CreatePlayerShot01(GetPlayerX,GetPlayerY-10,6,sin(kirk)*3+270,2.6,1,1); CreatePlayerShot01(GetPlayerX,GetPlayerY-10,6,sin(kirk)*10+270,2.6,1,3); CreatePlayerShot01(GetPlayerX,GetPlayerY-5,6,sin(kirk)*30+270,2.6,1,2); CreatePlayerShot01(GetPlayerX,GetPlayerY-10,6,sin(kirk)*90+270,2.6,1,4); CreatePlayerShot01(GetPlayerX,GetPlayerY-10,3,sin(kirk)*60+270,2.6,1,5); kirk += 13;}frodo++;
}


task FireCape{
if((GetKeyState(VK_SHOT) == KEY_PUSH || GetKeyState(VK_SHOT) == KEY_HOLD) && frodo%3==0) {CreatePlayerShot01(GetPlayerX,GetPlayerY-5,8,rand_int(250,290),10,3,6); CreatePlayerShot01(GetPlayerX,GetPlayerY-5,6,sin(kirk)*20+250,4.5,1,7); CreatePlayerShot01(GetPlayerX,GetPlayerY-5,6,sin(kirk)*30+290,4.5,1,7); CreatePlayerShot01(GetPlayerX+rand_int(-30,30),GetPlayerY+rand_int(-30,30),1,270+rand_int(-10,10),4.5,1,6); kirk += 13;} frodo++;
}

task DragonNecklace{
if((GetKeyState(VK_SHOT) == KEY_PUSH || GetKeyState(VK_SHOT) == KEY_HOLD) && frodo%3==0) {CreatePlayerShot01(GetPlayerX,GetPlayerY,7,sin(kirk)*30+250,2.8,5,8); CreatePlayerShot01(GetPlayerX,GetPlayerY,7,sin(kirk)*30+290,2.8,5,11); CreatePlayerShot01(GetPlayerX,GetPlayerY,9,atan2(GetEnemyY-GetPlayerY, GetEnemyX-GetPlayerX),1.5,1,9); CreatePlayerShot01(GetPlayerX,GetPlayerY,7,sin(kirk)*30+rand_int(200,340),2.8,5,10); kirk += 13;} frodo++;
}

task StoneBowl{
if((GetKeyState(VK_SHOT) == KEY_PUSH || GetKeyState(VK_SHOT) == KEY_HOLD) && frodo%3==0) {CreatePlayerShot01(GetPlayerX,GetPlayerY,2.5,135+kirk,1,255,13); CreatePlayerShot01(GetPlayerX,GetPlayerY,2.5,180+kirk,1,255,13); CreatePlayerShot01(GetPlayerX,GetPlayerY,2.5,225+kirk,1,255,13); CreatePlayerShot01(GetPlayerX,GetPlayerY,2.5,270+kirk,1,255,13); CreatePlayerShot01(GetPlayerX,GetPlayerY,2.5,315+kirk,1,255,13); CreatePlayerShot01(GetPlayerX,GetPlayerY,2.5,360+kirk,1,255,13); CreatePlayerShot01(GetPlayerX,GetPlayerY,2.5,405+kirk,1,255,13); CreatePlayerShot01(GetPlayerX,GetPlayerY,2.5,450+kirk,1,255,13); kirk += 13;} frodo++;
}


task CowryShell{
if((GetKeyState(VK_SHOT) == KEY_PUSH || GetKeyState(VK_SHOT) == KEY_HOLD) && frodo%3==0) {CreatePlayerShot01(GetPlayerX,GetPlayerY-5,7,sin(kirk)*10+270,6,1,14); CreatePlayerShot01(GetPlayerX,GetPlayerY-5,7,sin(kirk+180)*10+270,6,1,15); CreatePlayerShot01(GetPlayerX,GetPlayerY-5,7,sin(kirk+180)*30+270,2.5,1,2); CreatePlayerShot01(GetPlayerX,GetPlayerY-5,7,sin(kirk+180)*35+270,2.5,1,2); CreatePlayerShot01(GetPlayerX,GetPlayerY-5,7,sin(kirk+180)*40+270,2.5,1,2); CreatePlayerShot01(GetPlayerX,GetPlayerY-5,7,sin(kirk+180)*45+270,2.5,1,2); CreatePlayerShot01(GetPlayerX,GetPlayerY-5,7,sin(kirk+180)*50+270,2.5,1,2);kirk += 13;} frodo++;
}




}

script_spell EternityManipulation{
let img_spell = GetCurrentScriptDirectory()~"KaguyaSheet.png";

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


task run{
SetPlayerInvincibility(540);
ForbidShot(true);
loop(26){
let dir = rand(-180, 180);
ascent(samwise in 0..25){
CreatePlayerShot01(GetPlayerX,GetPlayerY-10,7,dir+(samwise*(360/25)),3.5,255,15);
}
wait(120);
yield;
end();
}
}


@Initialize{
LoadGraphic(img_spell);
run();
}

@MainLoop{
CollectItems();
yield;
}

@Finalize{
DeleteGraphic(img_spell);
}

}

No error, but when I press X, no bombs.
« Last Edit: December 02, 2009, 01:16:36 PM by ChaoStar »

Re: Danmakufu Q&A/Problem Thread II
« Reply #490 on: December 02, 2009, 03:23:39 AM »
Read the damn tutorial.

@Spellcard{
   UseSpellCard("EternityManipulation", 0);
}

Re: Danmakufu Q&A/Problem Thread II
« Reply #491 on: December 02, 2009, 04:34:43 AM »
I wouldn't use 1337 as a number as danmakufu only allows a range from 1 to 255 :V

Sorry for bringing this up so late in the post, but actually I have a bullet id at 300 and it fires.

AweStriker Nova

  • Star Sign "Thunder Constellation"
Re: Danmakufu Q&A/Problem Thread II
« Reply #492 on: December 02, 2009, 05:17:06 AM »
Okay,different question:

If I want to use CutIn without a boss cut-in image (as in Resurrection Butterfly or Cat's Walk), what should CutIn's arguments be?

Re: Danmakufu Q&A/Problem Thread II
« Reply #493 on: December 02, 2009, 05:25:41 AM »
Sorry for bringing this up so late in the post, but actually I have a bullet id at 300 and it fires.
Anything over 255 counts as 255.

So CreateShot(blah blah, 9001); would fire the bullet with id 255.

Re: Danmakufu Q&A/Problem Thread II
« Reply #494 on: December 02, 2009, 05:31:05 AM »
Okay,different question:

If I want to use CutIn without a boss cut-in image (as in Resurrection Butterfly or Cat's Walk), what should CutIn's arguments be?

Code: [Select]
CutIn(YOUMU, "card name here", "", 0, 0, 0, 0);
Leaving the second set of quotations blank will produce no image.

AweStriker Nova

  • Star Sign "Thunder Constellation"
Re: Danmakufu Q&A/Problem Thread II
« Reply #495 on: December 02, 2009, 06:21:12 AM »
I get an error starting at the CutIn line in this script:

Code: [Select]
#TouhouDanmakufu
#Title[Danmaku Upgrade "Alpha Shock"]
#Text[An attack from somewhere else, as a Spell Card!]
#Player[FREE]
#ScriptVersion[2]

script_enemy_main{

let CSD = GetCurrentScriptDirectory;
let imgBoss = CSD ~ "system\PlaceholderBoss.png";
#include_function "lib\ExpandedShotData\shot_replace.dnh";

@Initialize{
SetLife(1000);
SetTimer(40);
SetScore(1000);
SetMovePosition01(GetCenterX,GetCenterY,5);
LoadGraphic(imgBoss);
shotinit;
CutIn(KOAMU,"Danmaku Upgrade "\"Alpha Shock"\","",0,0,0,0);
mainTask;
}

@MainLoop{

yield;
}

@DrawLoop{

SetTexture(imgBoss);
SetRenderState(ALPHA);
SetAlpha(255);
SetGraphicRect(0,0,64,64);
SetGraphicScale(1,1);
SetGraphicAngle(0,0,0);
DrawGraphic(GetX,GetY);

}

@BackGround{



}

@Finalize{

DeleteGraphic(imgBoss);

}
task mainTask{
loop{
yield;
fire;
}
}

task fire{
let n = 0;
let dx = 0;
//YELLOW01 is 16 px tall and the play field is 480 px tall
//create two lightning bolts from 1/3 and 2/3 the width of the screen, starting at the top
while(n<480/16){
//if n is an odd number, the bullet will move to the right; otherwise it moves to the left
if(floor(n/2) < n/2){
lightning(448/3+dx,16*n,0,0,YELLOW01,0);
lightning(448*2/3+dx,16*n,0,0,YELLOW01,0);
}else{
lightning(448/3+dx,16*n,0,180,YELLOW01,0);
lightning(448*2/3+dx,16*n,0,180,YELLOW01,0);
}
wait(5);
dx=rand_int(-8,8)
n++;
}
n = 0;
dx = 0;
wait(45);
//create a lightning bolt starting from the top middle
while(n<480/16){
//bullets in the middle chain will appear to split and move both left and right
lightning(448/2+dx,16*n,0,180,YELLOW01,0);
lightning(448/2+dx,16*n,0,0,YELLOW01,0);
wait(5);
dx=rand_int(-8,8)
n++;
}
n = 0;
dx = 0;
wait(45);
}

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

//generate object bullet
task lightning(x,y,v,dir,graphic,delay){
let shard = Obj_Create(OBJ_SHOT);
Obj_SetPosition(shard,x,y);
Obj_SetAngle(shard,dir);
ObjShot_SetGraphic(shard,graphic);
ObjShot_SetDelay(shard,delay);
ObjShot_SetBombResist(shard,false);
Obj_SetSpeed(shard,v);
wait(10);
Obj_SetSpeed(shard,3);
}

}

Keep in mind, it's woefully unfinished.

Drake

  • *
Re: Danmakufu Q&A/Problem Thread II
« Reply #496 on: December 02, 2009, 06:30:31 AM »
KOUMA, silly.

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

Re: Danmakufu Q&A/Problem Thread II
« Reply #497 on: December 02, 2009, 06:32:01 AM »
I think he's missing a quotation mark just before Alpha, as well.

AweStriker Nova

  • Star Sign "Thunder Constellation"
Re: Danmakufu Q&A/Problem Thread II
« Reply #498 on: December 02, 2009, 06:34:12 AM »
KOUMA, silly.

...oops.
Turns out that wasn't the only thing...

I was missing a quotation mark, but after the Shock rather than before Alpha.Or maybe it WAS supposed to be in that place. Good thing I had Naut's Black Hole card as a reference.
Didn't stop this though.
« Last Edit: December 02, 2009, 07:20:25 AM by AweStriker Nova »

Blargel

  • RAWR!
  • I'M AN ANGRY LOLI!
Re: Danmakufu Q&A/Problem Thread II
« Reply #499 on: December 02, 2009, 07:18:11 AM »
...oops.
Turns out that wasn't the only thing...

error image

Another error the wiki doesn't have... This one has something to do with ).

I think he's missing a quotation mark just before Alpha, as well.
<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.

AweStriker Nova

  • Star Sign "Thunder Constellation"
Re: Danmakufu Q&A/Problem Thread II
« Reply #500 on: December 02, 2009, 07:24:57 AM »
(runs the spell card) Hey, no errors.

What's this?
Straight lines... too many bullets... OH NO (dies)

...Still needs some work.

A little bit of work later...

Code: [Select]
#TouhouDanmakufu
#Title[Danmaku Upgrade "Alpha Shock"]
#Text[An attack from somewhere else, as a Spell Card!]
#Player[FREE]
#ScriptVersion[2]

script_enemy_main{

let CSD = GetCurrentScriptDirectory;
let imgBoss = CSD ~ "system\PlaceholderBoss.png";
#include_function "lib\ExpandedShotData\shot_replace.dnh";

@Initialize{
SetLife(1000);
SetTimer(80);
SetScore(1000000);
SetDamageRate(25,25);
SetMovePosition01(GetCenterX,GetCenterY-60,5);
SetEnemyMarker(true);
SetInvincibility(50);
LoadGraphic(imgBoss);
shotinit;
CutIn(KOUMA,"Danmaku Upgrade "\""Alpha Shock"\","",0,0,0,0);
mainTask;
}

@MainLoop{

yield;
}

@DrawLoop{

SetTexture(imgBoss);
SetRenderState(ALPHA);
SetAlpha(255);
SetGraphicRect(0,0,64,64);
SetGraphicScale(1,1);
SetGraphicAngle(0,0,0);
DrawGraphic(GetX,GetY);

}

@BackGround{



}

@Finalize{

DeleteGraphic(imgBoss);

}
task mainTask{
SetCollisionA(GetX,GetY,32);
SetCollisionB(GetX,GetY,16);
loop{
fire;
wait(240);
}
}

task fire{
let n = 0;
let dx = 0;
let xa = (448/4)+dx;
let xb = (448*3/4)+dx;
let xc = (448/2)+dx;
//YELLOW01 is 16 px tall and the play field is 480 px tall
//create two lightning bolts from 1/3 and 2/3 the width of the screen starting at the top
while(n<480/16){
//if n is an odd number, the bullet will move to the right; otherwise it moves to the left
if(floor(n/2) < n/2){
lightning(xa+dx,16*n,0,0,YELLOW01,0);
lightning(xb+dx,16*n,0,0,YELLOW01,0);
}else{
lightning(xa+dx,16*n,0,180,YELLOW01,0);
lightning(xb+dx,16*n,0,180,YELLOW01,0);
}
wait(5);
dx=rand_int(-8,8);
xa+=dx;
xb+=dx;
n++;
}
n = 0;
dx = 0;
xa = (448/4);
xb = (448*3/4);
wait(90);
//create a lightning bolt starting from the top middle
while(n<480/16){
//bullets in the middle chain will have the opposite system from that above
if(floor(n/2) < n/2){
lightning(xc+dx,16*n,0,180,YELLOW01,0);
}else{
lightning(xc+dx,16*n,0,0,YELLOW01,0);
}
wait(5);
dx=rand_int(-8,8);
n++;
}
n = 0;
dx = 0;
xc = (448/2);
wait(90);
}

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

//generate object bullet
task lightning(x,y,v,dir,graphic,delay){
let shard = Obj_Create(OBJ_SHOT);
Obj_SetPosition(shard,x,y);
Obj_SetAngle(shard,dir);
ObjShot_SetGraphic(shard,graphic);
ObjShot_SetDelay(shard,delay);
ObjShot_SetBombResist(shard,false);
Obj_SetSpeed(shard,v);
wait(45);
Obj_SetSpeed(shard,1);
}

}

Now all I need to do is figure out how to get the center bolt staggered so that it appears halfway in between the two outer bolts. Currently, the middle one starts on the 2nd side bolt iteration and then syncs.
« Last Edit: December 02, 2009, 07:40:56 AM by AweStriker Nova »

ChaoStar

  • Dark History Boy
Re: Danmakufu Q&A/Problem Thread II
« Reply #501 on: December 02, 2009, 12:55:44 PM »
Read the damn tutorial.

@Spellcard{
   UseSpellCard("EternityManipulation", 0);
}

I did. Also, it still does not work.
http://www.shrinemaiden.org/forum/index.php?topic=3218.msg182213#msg182213

Lawence Codye

  • The Nine Tails of Subconscious...
  • Come & your desires shall all become reality...
Re: Danmakufu Q&A/Problem Thread II
« Reply #502 on: December 02, 2009, 02:56:49 PM »
that's cause it's suppose to be typed like this...

@SpellCard{
  UseSpellCard("EternityManipulation", 0);
}
« Last Edit: December 02, 2009, 08:33:41 PM by Lawence Codye »
I am the Nine Tails of Subconscious...

Come & your greatest desires will be reality...

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: Danmakufu Q&A/Problem Thread II
« Reply #503 on: December 02, 2009, 07:22:00 PM »
Seriously people. Danmakufu is CASE SENSETIVE

People should read first instead of hitting the "reply" button rapidly.
« Last Edit: December 02, 2009, 07:40:49 PM by Helepolis »

AweStriker Nova

  • Star Sign "Thunder Constellation"
Re: Danmakufu Q&A/Problem Thread II
« Reply #504 on: December 02, 2009, 07:45:47 PM »
Code: [Select]
#TouhouDanmakufu
#Title[Danmaku Upgrade "Alpha Shock"]
#Text[An attack from somewhere else, as a Spell Card!]
#Player[FREE]
#ScriptVersion[2]

script_enemy_main{

let CSD = GetCurrentScriptDirectory;
let imgBoss = CSD ~ "system\PlaceholderBoss.png";
#include_function "lib\ExpandedShotData\shot_replace.dnh";

@Initialize{
SetLife(1000);
SetTimer(80);
SetScore(1000000);
SetMovePosition01(GetCenterX,GetCenterY-60,5);
SetEnemyMarker(true);
SetInvincibility(5);
LoadGraphic(imgBoss);
shotinit;
CutIn(KOUMA,"Danmaku Upgrade "\""Alpha Shock"\","",0,0,0,0);
SetCollisionA(GetX,GetY,32);
SetCollisionB(GetX,GetY,16);
mainTask;
}

@MainLoop{

yield;
}

@DrawLoop{

SetTexture(imgBoss);
SetRenderState(ALPHA);
SetAlpha(255);
SetGraphicRect(0,0,64,64);
SetGraphicScale(1,1);
SetGraphicAngle(0,0,0);
DrawGraphic(GetX,GetY);

}

@BackGround{



}

@Finalize{

DeleteGraphic(imgBoss);

}
task mainTask{
loop{
fire;
wait(100);
centerbolt;
wait(100);
}
}

task fire{
let n = 0;
let dx = 0;
let xa = (448/4)+dx;
let xb = (448*3/4)+dx;
let xc = (448/2)+dx;
wait(200);
//YELLOW01 is 16 px tall and the play field is 480 px tall, but this leaves safe lines
//create two lightning bolts from 1/3 and 2/3 the width of the screen starting at the top
while(n<480/12){
//if n is an odd number, the bullet will move to the right; otherwise it moves to the left
if(floor(n/2) < n/2){
lightning(xa+dx,12*n,0,0,YELLOW01,n);
lightning(xb+dx,12*n,0,0,YELLOW01,n);
}else{
lightning(xa+dx,12*n,0,180,YELLOW01,n);
lightning(xb+dx,12*n,0,180,YELLOW01,n);
}
wait(1);
dx=rand_int(-8,8);
xa+=dx;
xb+=dx;
n++;
}

n = 0;
dx = 0;
xa = (448/4);
xb = (448*3/4);

}

task centerbolt{
let n = 0;
let dx = 0;
let xc = (448/2)+dx;
wait(200);
//create a lightning bolt starting from the top middle
while(n<480/12){
//bullets in the middle chain will have the opposite system from that above
if(floor(n/2) < n/2){
lightning(xc+dx,12*n,0,180,YELLOW01,n);
}else{
lightning(xc+dx,12*n,0,0,YELLOW01,n);
}
wait(1);
dx=rand_int(-8,8);
n++;
}
n = 0;
dx = 0;
xc = (448/2);
}

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

//generate object bullet
task lightning(x,y,v,dir,graphic,delay){
let shard = Obj_Create(OBJ_SHOT);
Obj_SetPosition(shard,x,y);
Obj_SetAngle(shard,dir);
ObjShot_SetGraphic(shard,graphic);
ObjShot_SetDelay(shard,delay);
ObjShot_SetBombResist(shard,false);
wait(90+delay);
Obj_SetSpeed(shard,1.5);
}

}

Okay, I've made some improvements and it's playable, except for the fact that the boss is invinvicle. For some reason, Sanae A's homeing works but does no damage, but Reimu A's does not.

Is something wrong with the SetInvincibility or the SetCollision?

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: Danmakufu Q&A/Problem Thread II
« Reply #505 on: December 02, 2009, 07:48:45 PM »
Collision goes in the mainloop. And your invincibility is 5 frames ( which is not even half a second ) are you sure with this?

AweStriker Nova

  • Star Sign "Thunder Constellation"
Re: Danmakufu Q&A/Problem Thread II
« Reply #506 on: December 02, 2009, 10:48:45 PM »
I thought it might have been calculating invincibility time in seconds, so I changed it to 5.

Now it is set to 80.

Also, that worked.

Now to figure out how to work in the "critical timer" sound...

Cabble

  • Ask me about my Cat.
  • Not unwilling to shank you.
Re: Danmakufu Q&A/Problem Thread II
« Reply #507 on: December 02, 2009, 11:32:40 PM »
I know you can use GetAngleToPlayer, but is there a GetAngleToEnemy?
I had a teacher who used to play radiohead during class once.

ONCE.

AweStriker Nova

  • Star Sign "Thunder Constellation"
Re: Danmakufu Q&A/Problem Thread II
« Reply #508 on: December 02, 2009, 11:56:39 PM »
From the player to the enemy?

That should just be GetAngleToPlayer+180.  :V

Cabble

  • Ask me about my Cat.
  • Not unwilling to shank you.
Re: Danmakufu Q&A/Problem Thread II
« Reply #509 on: December 03, 2009, 12:30:06 AM »
Nope. I'm doing from the sides t the enemy.
I had a teacher who used to play radiohead during class once.

ONCE.