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

DarkOverord

  • Damn Red Dragons
  • Aaaaaaaaaaaaaaaaargh
    • Lol YouTube
Re: Danmakufu Q&A/Problem Thread v3
« Reply #150 on: February 09, 2010, 01:02:43 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.
Aye I've got that down. From what I can tell, this is a coding mess up on my end XD. I think it's down to how I have the lasers aimed which is causing this problem :V Or something to that effect

http://www.majhost.com/gallery/DarkOverord/Other/SS2/Toehoes/ohyoucrazylasers.png

Because as seen in this picture, in the default starting position it's only spawning 3/4, whereas in the right side, all 4 are spawning (Ignoring the red laser) I'll post my (Very messy) code though, or at least the relevant part, as I doubt you need all the BG stuff. Maybe someone will see how I've messed this up.

Code: [Select]
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,g,20);

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


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


}
wait(200);
yield;
}
}

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

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

let bulletx;
let bullety;

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

if(dir<a1){
bulletx=GetClipMinX;
bullety=Obj_GetY(obj)+(bulletx-Obj_GetX(obj))*tan(Obj_GetAngle(obj)-180);
} else{ if(dir>a2){
bulletx=GetClipMaxX;
bullety=Obj_GetY(obj)+(bulletx-Obj_GetX(obj))*tan(Obj_GetAngle(obj)-180);
} else{
bullety=GetClipMinY;
bulletx=Obj_GetX(obj)-(bullety-Obj_GetY(obj))*tan(Obj_GetAngle(obj)-90);
}
}

let j = 0;
let dir2 = 0;
while(j<6){
CreateShotA(5, bulletx, bullety, 5);
SetShotDataA(5, 0, 2, dir2, 0.5, 0.1, 3, g-2+209);
FireShot(5);
j++;
dir2+=360/6;
}

wait(180);
ObjShot_FadeDelete(obj);



}

function wait(w){
loop(w){yield;}
}
}
http://www.youtube.com/user/DarkOverord <-- its wat cool ddes do rite :V

Blargel

  • RAWR!
  • I'M AN ANGRY LOLI!
Re: Danmakufu Q&A/Problem Thread v3
« Reply #151 on: February 09, 2010, 08:48:38 AM »
KrakoCloud: It's @BackGround, not @Background. Remember that Danmakufu is case-sensitive and also written by Japanese people so some things may not make sense and just require memorization. (ClearByteCodeCash lololol)
<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.

KrackoCloud

  • I don't mean to be greedy...
  • ... but white rice is my favorite food.
Re: Danmakufu Q&A/Problem Thread v3
« Reply #152 on: February 09, 2010, 11:31:39 PM »
KrakoCloud: It's @BackGround, not @Background. Remember that Danmakufu is case-sensitive and also written by Japanese people so some things may not make sense and just require memorization. (ClearByteCodeCash lololol)

Pffft. It works now.

Thank you. >_>"

Kinzo the Astro Curious

  • One small step for Desu; One giant leap for touhou-kind!
Re: Danmakufu Q&A/Problem Thread v3
« Reply #153 on: February 10, 2010, 02:14:11 AM »
Hmm... watched a few tutorials on danmakufu and had a go, and seem to be having trouble with a particular command.

GetCenterX
and GetCenterY

just cause an error and it conks out. No idea whats going on, I'm just entering what i think is the centre value manually now  ???

Fetch()tirade

  • serial time-waster
Re: Danmakufu Q&A/Problem Thread v3
« Reply #154 on: February 10, 2010, 02:23:29 AM »
I thought GetCenterX and GetCenterY were constant values and that they were just put into Danmakufu so that you didn't have to calculate the values yourself. Like if you were making a command that involved putting in x and y values, those would work.

Re: Danmakufu Q&A/Problem Thread v3
« Reply #155 on: February 10, 2010, 02:36:34 AM »
They're there so people can clearly read code. It's easy to tell what's going on when you see those methods used in place of arbitrary numbers. It's not so easy to tell when all you see is numbers left, right and center, since many people don't recognize 224 as GetCenterX, or 240 as GetCenterY. Which, by the way, are those values.

Here are the contants, if you want. It's sometimes useful to know them so:

GetCenterX = 224;
GetCenterY = 240;
GetClipMinX = 32;
GetClipMinY = 16;
GetClipMaxX = 416;
GetClipMaxY = 464;

Uh, don't try to impress people or save your time by just using these numbers in your script. It's much easier to read if you use the method names rather than the values they hold.

Also, Torpedo, you probably just used them incorrectly. You may post your code and we can troubleshoot it for you, if you like.

Kinzo the Astro Curious

  • One small step for Desu; One giant leap for touhou-kind!
Re: Danmakufu Q&A/Problem Thread v3
« Reply #156 on: February 10, 2010, 03:52:45 AM »
Odd, I didnt have the original file anymore but I had modified it with the actual values as I found them on the the touhou wiki, so I thought I would test it with the GetCenterX and GetCenterY values instead and see if it should be working then realised what I've been doing lol.

Been typing "GetCentre" instead of "GetCenter" though im sure the first spelling is the right one, but I guess not in danmakufu lol.

Tricky to get used to this ;, and == business, I program in basic language usually lol. Though matlab and thyme have their similarities.

Still, Ive used the alternative command to make a spinning colour wheel that cycles all 7 (as I saw this on a youtube video and wanted to try and copy it lol) so I'm pleased so far. But im miles off touhou dance contest!

EDIT : one wikipedia later and I've found the problem. God damned american english! I was right - for my country lol
« Last Edit: February 10, 2010, 03:56:08 AM by Torpedo »

Re: Danmakufu Q&A/Problem Thread v3
« Reply #157 on: February 10, 2010, 04:01:51 AM »
God damned american english!

Haha, this is the least of your worries. Wait until you start encountering the blatant spelling errors, like SetIntersecrionLine, COODINATE or ClearByteCodeCash.

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: Danmakufu Q&A/Problem Thread v3
« Reply #158 on: February 10, 2010, 09:48:03 AM »
Haha, this is the least of your worries. Wait until you start encountering the blatant spelling errors, like SetIntersecrionLine, COODINATE or ClearByteCodeCash.

This. 

I damn my British-English often because when using codes like 'SetColour' which will very quickly throw an error at you =|

Kinzo the Astro Curious

  • One small step for Desu; One giant leap for touhou-kind!
Re: Danmakufu Q&A/Problem Thread v3
« Reply #159 on: February 12, 2010, 01:25:46 AM »
Can you make a bullet retreive its own angle, or would you always have to calculate the angle it will now be at, relative to the angle you spawned it from?

Drake

  • *
Re: Danmakufu Q&A/Problem Thread v3
« Reply #160 on: February 12, 2010, 01:31:38 AM »
Either a constantly adjusting variable or Obj_GetAngle(obj).

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

Kinzo the Astro Curious

  • One small step for Desu; One giant leap for touhou-kind!
Re: Danmakufu Q&A/Problem Thread v3
« Reply #161 on: February 12, 2010, 02:42:58 AM »
How do I reference the bullet with that command? would I need to set up the bullet specially?

I'm guessing what I'm asking for definately isnt something covered by the basics tutorial here. Still I got something that worked in the end by calculation.

Re: Danmakufu Q&A/Problem Thread v3
« Reply #162 on: February 12, 2010, 03:43:17 AM »
Yes, you would need to make an object bullet, otherwise you're stuck using calculations to determine where your bullet will end up.

Not that "angular velocity * frames" is a hard calculation to do but.... Yeah.

Kinzo the Astro Curious

  • One small step for Desu; One giant leap for touhou-kind!
Re: Danmakufu Q&A/Problem Thread v3
« Reply #163 on: February 12, 2010, 03:55:02 AM »
its only going to be that simple if you only tell the bullet to only turn consistantly up to that point... and thats boring  :V (hence hoping for an easier way)

I'll get the basics down before I start faffing around with object scripting though.

Fetch()tirade

  • serial time-waster
Re: Danmakufu Q&A/Problem Thread v3
« Reply #164 on: February 12, 2010, 03:58:23 AM »
I am having trouble with certain part of an experimental script. There's only one part that really matters, so I'll post that

Quote

   task root(x,y,v,dir,graphic,delay){
      let obj = Obj_Create(OBJ_SHOT);

      Obj_SetPosition(obj,x,y);
      Obj_SetSpeed(obj,v);
      Obj_SetAngle(obj,dir);
      ObjShot_SetGraphic(obj,graphic);
      ObjShot_SetDelay(obj,delay);
      ObjShot_SetBombResist(obj,false);

      if(!Obj_BeDeleted(obj)){
         loop{
            if(((Obj_GetX(obj)-GetEnemyX)^2+(Obj_GetY(obj)-GetEnemyY)^2)^0.5>rand_int(60,120)){
               ObjShot_FadeDelete(obj);
            }
            Obj_SetAngle(obj,Obj_GetAngle(obj)+rand_int(-35,35));
            CreateShotA(1,Obj_GetX(obj),Obj_GetY(obj),20);
            SetShotDataA(1,0,0.08,rand_int(0,359),0,0,0.04,GREEN05);
            SetShotKillTime(1,240);
            FireShot(1);

            wait(12);
            yield;

         }
      }
   }


As you can see, it's an object bullet. It works fine rignt now, but I've been trying to make it do something when it gets deleted.
I've tried using if(Obj_BeDeleted(obj)==true) in several spots, but for some reason whatever I put in there either 1. starts even when the shot isn't deleted and happens even when the shot doesn't exist (i.e. they spawn out of the top-left corner, or 2. doesn't happen.

Re: Danmakufu Q&A/Problem Thread v3
« Reply #165 on: February 12, 2010, 04:12:28 AM »
  task root(x,y,v,dir,graphic,delay){
      let obj = Obj_Create(OBJ_SHOT);

      Obj_SetPosition(obj,x,y);
      Obj_SetSpeed(obj,v);
      Obj_SetAngle(obj,dir);
      ObjShot_SetGraphic(obj,graphic);
      ObjShot_SetDelay(obj,delay);
      ObjShot_SetBombResist(obj,false);

      //"while the bullet is not deleted, do the following"
      while(!Obj_BeDeleted(obj)){
            if(((Obj_GetX(obj)-GetEnemyX)^2+(Obj_GetY(obj)-GetEnemyY)^2)^0.5>rand_int(60,120)){
               ObjShot_FadeDelete(obj);
            }
            //this is going to make the bullet's almost completely random, which you probably don't want to do.
            Obj_SetAngle(obj,Obj_GetAngle(obj)+rand_int(-35,35));
            //this is going to create bullets every frame, I dont think you want to do that either.
            CreateShotA(1,Obj_GetX(obj),Obj_GetY(obj),20);
            SetShotDataA(1,0,0.08,rand_int(0,359),0,0,0.04,GREEN05);
            SetShotKillTime(1,240);
            FireShot(1);
            //If you want the angle changing and bullet spawning to happen every thirteen frames (Wait(12) + yield, like you had before), you could say "if(frame%13==0){ SpawnBulletChangeAngle; }" inside this while loop, and say frame++; at the beginning of the loop. This way, everything you've put inside there will occur every thirteen frames. Obviously, declare the variable "frame".

            //Since while statements will repeat during the one frame, we'll need to yield to postpone the check till the next frame.
            yield;
      }
   //So this is outside of the while loop, meaning after the bullet is deleted, since the loop will only occur if the bullet isn't alive. Insert whatever you want to happen upon death here.
   dostuff;
   }

Fetch()tirade

  • serial time-waster
Re: Danmakufu Q&A/Problem Thread v3
« Reply #166 on: February 12, 2010, 05:21:38 PM »
Actually, I did want it to randomly change angles. But that's besides the point.
I solved the problem with your suggestion of using an if statement and creating a variable (named count instead of frame 'cuz I'm cool like that).

Quote

         if(count%13==0){
            Obj_SetAngle(obj,Obj_GetAngle(obj)+rand_int(-35,35));
            CreateShotA(1,Obj_GetX(obj),Obj_GetY(obj),20);
            SetShotDataA(1,0,0.08,rand_int(0,359),0,0,0.04,GREEN05);
            SetShotKillTime(1,240);
            FireShot(1);
            wait(12);
         }


But then I created another if statement within the same while loop telling it what to do if it went over a certain value.
I still have no idea about what that percent sign does, but thanks.

But now I've hit another problem: I can't run #BGM without it crashing, and I've no idea why.
My script and music are both in the same folder, but the music is in a sub-folder called bgm.

I've tried putting in #BGM[.\bgm\blah.wav], and it just crashes Danmakufu.

Iryan

  • Ph?nglui mglw?nafh
  • Cat R?lyeh wgah?nagl fhtagn.
Re: Danmakufu Q&A/Problem Thread v3
« Reply #167 on: February 12, 2010, 06:01:31 PM »
Hm, I've encountered this problem too. As far as I can tell, you just have to restart the script several times and it will eventually stop crashing for good. From my experience this can happen when you modify any of the # lines that affect the actual playing of the script, ie. #BGM and #BackGround.

I assume danmakufu stores some data of the script for loading purposes or something like that. When you change the lines, danmakufu will get confused from the differences between the stored data and the actual data and barf. If you attempt to play the script a couple of times more, eventually you will overwrite the old stored information with the new data and danmakufu won't barf anymore until you change the line again.

Hmm, if my theory is correct, then you should also make the crashing disappear by renaming the file or putting it in a different folder. Also, if you then create a different script with the old name of the crashing script, the new script will probably crash a couple of times, too. I should probably test that...



Now a question from me: Could it be that the collision detection for very thin or short lasers is incredibly off?
« Last Edit: February 12, 2010, 06:45:14 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."

Re: Danmakufu Q&A/Problem Thread v3
« Reply #168 on: February 12, 2010, 06:06:32 PM »
I thought you had to put #BGM[User(filepath)]

Chronojet ⚙ Dragon

  • The Oddity
  • 今コソ輝ケ、我ガ未来、ソノ可能性!!
Re: Danmakufu Q&A/Problem Thread v3
« Reply #169 on: February 12, 2010, 06:20:53 PM »
I thought you had to put #BGM[User(filepath)]
That's for #BackGround[User(filepath, horizontal scrolling, vertical scrolling)]

Stuffman

  • *
  • We're having a ball!
Re: Danmakufu Q&A/Problem Thread v3
« Reply #170 on: February 13, 2010, 06:08:16 AM »
Stuffman has a question for once!

Hey, you know how CtC skips the main menu when you play a replay? How does it do that? I get how you could save the player/difficulty choices from the menu with common data and use a IsReplay check to get that, but how do you get it to ignore the input that came in from the menu?

Re: Danmakufu Q&A/Problem Thread v3
« Reply #171 on: February 13, 2010, 06:11:22 AM »
Stuffman has a question for once!

Hey, you know how CtC skips the main menu when you play a replay? How does it do that? I get how you could save the player/difficulty choices from the menu with common data and use a IsReplay check to get that, but how do you get it to ignore the input that came in from the menu?
You mean the custom menu? (With GAME START, PRACTICE MODE, etc)

Perhaps they did something like if not IsReplay then display menu, else it doesn't show up.

Azure Lazuline

  • Looooove!!
  • PM me for free huggles and love!
    • Entanma Project - indie game development
Re: Danmakufu Q&A/Problem Thread v3
« Reply #172 on: February 13, 2010, 06:12:17 AM »
I'm not sure if this is the method that CtC uses, but I set common data, use the Retry; function, then on startup, load and check for that data. Replays go from the beginning of the current run, and Retry; can be used to re-locate that beginning. It's kind of hard to explain, but I think you should be able to figure it out from there.

Stuffman

  • *
  • We're having a ball!
Re: Danmakufu Q&A/Problem Thread v3
« Reply #173 on: February 13, 2010, 06:24:33 AM »
I'm not sure if this is the method that CtC uses, but I set common data, use the Retry; function, then on startup, load and check for that data. Replays go from the beginning of the current run, and Retry; can be used to re-locate that beginning. It's kind of hard to explain, but I think you should be able to figure it out from there.

Oh that is so fucking clever.

Yeah I think I get how to do this.

Re: Danmakufu Q&A/Problem Thread v3
« Reply #174 on: February 13, 2010, 06:35:04 AM »
Yeah I think I get how to do this.
I don't :x

So you set the start point with commondata and use Retry; during replays to start from that point?

Azure Lazuline

  • Looooove!!
  • PM me for free huggles and love!
    • Entanma Project - indie game development
Re: Danmakufu Q&A/Problem Thread v3
« Reply #175 on: February 13, 2010, 07:30:57 AM »
Retry; restarts the script, of course. It doesn't sound useful, but that's what my trick was for. Basically, it goes like this.

The part in your menus that would otherwise start the stage:
Code: [Select]
SetCommonData("SkipMenu",1);
SaveCommonData;
Retry;

In @Initialize:
Code: [Select]
LoadCommonData;
if(GetCommonDataDefault("SkipMenu",0)==1){
  DeleteCommonData("SkipMenu");
  LoadStage;
}else{
  LoadMenu;
}

When you start the script, it will branch to LoadMenu. When you're done with the menu (it reaches the Retry; code block), it sets the common data and resets the script - but then when it loads, it will branch to LoadStage instead.

This was my secret, but since you asked, I guess I can't hide it anymore, heh.

Kinzo the Astro Curious

  • One small step for Desu; One giant leap for touhou-kind!
Re: Danmakufu Q&A/Problem Thread v3
« Reply #176 on: February 13, 2010, 04:42:55 PM »
I'm stuck lol. I've got a 100x100 image im trying to use to animate (its 4 frames inside that space)

Code: [Select]
script_enemy_main{

let CSD = GetCurrentScriptDirectory;
let imgboss = CSD ~ "IMG\BossA.png";


@Initialize{
LoadGraphic(imgboss);
SetLife(1000);
SetMovePosition01(224 ,150 ,5);
let c = 1;
let f = 1;

mainTask;
}

@MainLoop{
       SetCollisionA(GetX, GetY, 32);
       SetCollisionB(GetX, GetY, 24);
yield;
}

@DrawLoop{
SetTexture(imgboss);
SetRenderState(ADD);
SetGraphicScale(2,2);
SetGraphicAngle(0,0,0);
if(f<10){
SetGraphicRect(0,0,50,50);
}
if(f>=10){
SetGraphicRect(50,0,100,50);
}
DrawGraphic(GetX,GetY);
f++;
if(f==20){f = 1;}
}

Its only a snippet of the code, but these are the only relevant parts to what it crashes on. I dont get why its crashing either, but it goes down at the if statement.

Its definately something stupid, but then I haven't exactly been coding in this language type before now lol.

EDIT : forgot to say I've had this run with just the "SetGraphicRect(0,0,50,50);" line and not trying to make it animate, so Its not the image thats the problem.

EDIT AGAIN : Nevermind, got there in the end. nothing was wrong with the if statement, thats what was racking my brain so much. Its that let f = 0 was being defined in the same frame it was called in a different thread, so moving it before initialize solved the problem.
« Last Edit: February 13, 2010, 04:56:25 PM by Torpedo »

Blargel

  • RAWR!
  • I'M AN ANGRY LOLI!
Re: Danmakufu Q&A/Problem Thread v3
« Reply #177 on: February 13, 2010, 05:20:55 PM »
I'm stuck lol. I've got a 100x100 image im trying to use to animate (its 4 frames inside that space)

Code: [Select]
script_enemy_main{

let CSD = GetCurrentScriptDirectory;
let imgboss = CSD ~ "IMG\BossA.png";


@Initialize{
LoadGraphic(imgboss);
SetLife(1000);
SetMovePosition01(224 ,150 ,5);
let c = 1;
let f = 1;

mainTask;
}

@MainLoop{
       SetCollisionA(GetX, GetY, 32);
       SetCollisionB(GetX, GetY, 24);
yield;
}

@DrawLoop{
SetTexture(imgboss);
SetRenderState(ADD);
SetGraphicScale(2,2);
SetGraphicAngle(0,0,0);
if(f<10){
SetGraphicRect(0,0,50,50);
}
if(f>=10){
SetGraphicRect(50,0,100,50);
}
DrawGraphic(GetX,GetY);
f++;
if(f==20){f = 1;}
}

Its only a snippet of the code, but these are the only relevant parts to what it crashes on. I dont get why its crashing either, but it goes down at the if statement.

Its definately something stupid, but then I haven't exactly been coding in this language type before now lol.

EDIT : forgot to say I've had this run with just the "SetGraphicRect(0,0,50,50);" line and not trying to make it animate, so Its not the image thats the problem.

EDIT AGAIN : Nevermind, got there in the end. nothing was wrong with the if statement, thats what was racking my brain so much. Its that let f = 0 was being defined in the same frame it was called in a different thread, so moving it before initialize solved the problem.

Use the Animation Handling Library to save yourself from the headaches of coding animation logic.
[/self-promotion]
<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.

Kinzo the Astro Curious

  • One small step for Desu; One giant leap for touhou-kind!
Re: Danmakufu Q&A/Problem Thread v3
« Reply #178 on: February 13, 2010, 09:37:23 PM »
If im honest, trying to work out how to use it seems more confusing to me than just going along as I am at the moment, now I've figured what that stupid mistake was.  :blush:

Speaking of stupid mistakes

I want this code to fire bullets out randomly in all directions, but then descend downward. (thats the red bullets, I am having no trouble with the yellow ones)

It only fires bullets to the right however, which I'm baffled by :s I even nulled both accelerations to try and counter that.

Code: [Select]
task fire{
wait(120);
loop{
    loop(24){
let velx = rand(0,4);
let vely = rand(0,4);
CreateShotA(1,GetX, GetY, 0);
SetShotDataA_XY(1,0, velx -2,vely - 2,(velx - 2) / 60,0.1,NULL,NULL,RED01);
FireShot(1);
}
wait(20);
loop(20){
CreateShot01(GetX,GetY,2, rand(0,360), YELLOW12 ,0);
}
wait(10);
}
}

modding the code into this let me get SOMEWHERE, but the shots are firing primarily down a diagonal.

(IGNORE THIS CODE BELOW, ITS JUST PROOF IM A 9)
Code: [Select]
task fire{
wait(120);
loop{
    loop(24){
let dir = -1;
loop(2){
let velx = rand(0,4);
let vely = rand(0,4);
CreateShotA(1,GetX, GetY, 0);
SetShotDataA_XY(1,0, velx * dir,vely * dir,(velx * dir) / 60,0.1,dir*5,10,RED01);
FireShot(1);
dir = 1;
}
}
wait(20);
loop(20){
CreateShot01(GetX,GetY,2, rand(0,360), YELLOW12 ,0);
}
wait(10);
}
}
Ends up leaving the top right totally uncovered by the red bullets, and it definately isnt firing into the bottom left (but they descend there anyway from the above ones)

Also yes, I am a flying car.  :V

EDIT : LOL I know why the modded code behaved like it did now. Still, any solution to the original code to get all the random directions?

SetShotDataA_XY's behavior is confusing :/ ... or I'm just not sleeping enough and something daft is wrong in that one too  :V
« Last Edit: February 13, 2010, 09:53:07 PM by Torpedo »

DgBarca

  • Umineko fuck yeah
  • Spoilers ?
Re: Danmakufu Q&A/Problem Thread v3
« Reply #179 on: February 14, 2010, 01:25:33 PM »
So, like I said on IRC, I want to do a custom UFOish life and bomb counter, but I kinda fail to it, I have that :
When getting a item
Array arrange
CreateLifeCount(x,y,num) works properly when used separately but I fail how to fire it proprely...

I really want it to work, it is almost finished
[21:16] <redacted> dgbarca makes great work
[21:16] <redacted> i hope he'll make a full game once