Author Topic: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)  (Read 269311 times)

I have no name

  • Dodge ALL the bullets
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #120 on: July 27, 2012, 07:15:20 PM »
So I'm trying to get curvy lasers to shoot bullets to generate a pattern. I know my code is kind of inefficient at the moment, but right now I just want it to work.
Code: [Select]
//example loop in case the problem lies there
while(i<12){
laser1(1,0,5,dir,4,0,5);
i++;
dir+=30;
}

//laser1
task laser1(id,frame,speed,angle,turn,accel,g){
CreateLaserC(id,GetX,GetY,12,50,108,0);
SetLaserDataC(id,frame,speed,angle,turn,accel,g);
SetLaserDataC(id,90,1.5*speed,angle,0,0,g);
CreateShotA(8,Obj_GetX(id),Obj_GetY(id),15);
SetShotDataA(8,0,1.5,Obj_GetAngle(id)+90,0,0,1.5,109);
CreateShotA(9,Obj_GetX(id),Obj_GetY(id),15);
SetShotDataA(9,0,1.5,Obj_GetAngle(id)-90,0,0,1.5,109);
AddShot(0,id,8,0);                 //inefficient but it's a test
AddShot(0,id,9,0);
AddShot(15,id,8,0);
AddShot(15,id,9,0);
AddShot(30,id,8,0);
AddShot(30,id,9,0);
AddShot(45,id,8,0);
AddShot(45,id,9,0);
AddShot(60,id,8,0);
AddShot(60,id,9,0);
AddShot(75,id,8,0);
AddShot(75,id,9,0);
AddShot(90,id,8,0);
AddShot(90,id,9,0);
AddShot(105,id,8,0);
AddShot(105,id,9,0);
FireShot(id);
}

Blargel

  • RAWR!
  • I'M AN ANGRY LOLI!
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #121 on: July 27, 2012, 08:08:27 PM »
Hi all, i have a problem...

First of all, let's say that i have a shootsheet (txt file and png file).

1- Where should i put them in the script (CSD) folder?

2- Ok, i have them in the folder. Now what should i write in script_enemy_main, initialize etc etc to make the shootsheet works?

3- Once the shootsheet works, here is my second question: i want to make nice looking lasers like Nue in UFO or in general lasers like the ones in the late games. What shootsheet should i download? What bullets in the shootsheet should i call? (as, for examples black amulets are number 95...nice lasers are number...? )

That said, thank you for your help. Post here a reply or even a PM if you want.

1. Technically you can place them anywhere you want but obviously it'd be better if you organize things. For the sake of simplicity, let's say your script is at script/stuff/MyScript.txt. If it's just a simple script, you can put the shotsheet image and script in script/stuff as well so you'll have script/stuff/shotsheet.png and script/stuff/shotsheet.txt.

2. In @Intialize, you need to put LoadUserShotData("path/to/the/shotsheet.txt");. You can do something like this and it should work.
Code: [Select]
let shotsheet = GetCurrentScriptDirectory ~ "shotsheet.txt";
LoadUserShotData(shotsheet);
I can't remember if LoadUserShotData actually loads the graphic automatically or not, but if it doesn't, you'll have to add LoadGraphic somewhere in @Initialize as well.

3. Sorry, I don't know about this one.



So I'm trying to get curvy lasers to shoot bullets to generate a pattern. I know my code is kind of inefficient at the moment, but right now I just want it to work.

code removed

I can't run Danmakufu anymore so you'll have to describe what's wrong (or someone else can run the code and answer I guess lol). I don't use AddShot in the same way that you do, but to my understanding what you have should work. Can you describe what you're expecting to happen and what's really happening?
<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.

I have no name

  • Dodge ALL the bullets
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #122 on: July 27, 2012, 08:11:52 PM »
I can't run Danmakufu anymore so you'll have to describe what's wrong (or someone else can run the code and answer I guess lol). I don't use AddShot in the same way that you do, but to my understanding what you have should work. Can you describe what you're expecting to happen and what's really happening?
I'm expecting the lasers to fire bullets off in opposite directions perpendicular to the current direction of the laser.  What is happening is bullets are aiming straight up and down from the center of the pattern (the addshot at 0, setting this to 1 made a larger "ring" aimed up and down)

LadyScarlet

  • Too lazy to make this a gif right now
  • Still scumming for a good pull
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #123 on: July 27, 2012, 09:11:57 PM »
Okay, so my very first Danmakufu script is almost done. Here's how it looks so far:
http://i45.tinypic.com/npoydx.png

I mainly want to know how to get the indigo bullets (which I will change to purple for the final release) to spin around so there are no ⑨ blindspots (they're in abundance right now.) Like the large circle bullets in this video. or Yukari's Border of Wave and Particle. I'll make it go slower than those examples, of course, but the examples are to give you an idea what I'm talking about.
« Last Edit: July 31, 2012, 04:12:24 PM by Helepolis »
My Youtube Channel. I mostly upload Hisoutensoku videos.

Blargel

  • RAWR!
  • I'M AN ANGRY LOLI!
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #124 on: July 27, 2012, 11:05:39 PM »
I'm expecting the lasers to fire bullets off in opposite directions perpendicular to the current direction of the laser.  What is happening is bullets are aiming straight up and down from the center of the pattern (the addshot at 0, setting this to 1 made a larger "ring" aimed up and down)

One thing I noticed was that in CreateShotA(8,Obj_GetX(id),Obj_GetY(id),15); you're using Obj_GetX(id) and Obj_GetY(id). That's not doing what you expect it to do, but it's still working because of a funny coincidence. You're supposed to put 0 for both x and y if you plan to use AddShot because it adds the x and y that you specify to the target bullet's x and y at the time. Obj_GetX and Obj_GetY is used for objects created with Obj_Create which you didn't use. If you pass in an unknown id into those functions, they happen to just return 0.

Likewise, Obj_GetAngle(id)+90 will actually return 0+90, so that's why it's shooting straight down. I'm not sure if there's a way to do what you want to do, but SetShotDirectionType may have some sort of application that you can use. Otherwise, you'll need to use object sinuate lasers, or perhaps someone else knows a way to do what you want.
<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.

I have no name

  • Dodge ALL the bullets
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #125 on: July 27, 2012, 11:32:48 PM »
I see, I suppose I could do it with a series of carefully placed familiars and carefully timed bullets that shoot bullets, but I was hoping to do it with just the lasers.
Or object lasers.

edit
Why doesn't the following code make the boss move in an infinity sign (technical term leminscante I believe)
Code: [Select]
loop{
SetMovePositionHermite(GetX,GetY,0,330,2,90,180);
wait(180);
SetMovePositionHermite(GetX,GetY,0,90,2,210,180);
wait(180);
SetMovePositionHermite(GetX,GetY,0,210,2,90,180);
wait(180);
SetMovePositionHermite(GetX,GetY,0,90,2,330,180);
wait(180);
}

LadyScarlet

  • Too lazy to make this a gif right now
  • Still scumming for a good pull
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #126 on: July 28, 2012, 05:29:04 AM »
Sorry for my annoyance, but I'm now trying to get Helepolis' Custom Cutin script to work on my script. I keep getting an error with some faulty code, yet I do not know what's wrong:

http://pastebin.com/C8AcKGsS

Oh, here's the error:

If someone could please help me, that would be great. Thanks.
« Last Edit: July 31, 2012, 04:11:56 PM by Helepolis »
My Youtube Channel. I mostly upload Hisoutensoku videos.

Ozzy

  • Veteran Danmakufu Scripter
  • Currently working on a full Touhou fangame!
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #127 on: July 28, 2012, 05:33:17 AM »
Sorry for my annoyance, but I'm now trying to get Helepolis' Custom Cutin script to work on my script. I keep getting an error with some faulty code, yet I do not know what's wrong:
Code: [Select]
*Huge Block of Code*Oh, here's the error:

If someone could please help me, that would be great. Thanks.
I think you guys may be forgetting the "large blocks of code in pastebin" rule.

Anyway, you're not doing the syntax for #include_function right. Remove the brackets and write it like this: #include_function ".\function_cutin.txt";

I have no name

  • Dodge ALL the bullets
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #128 on: July 28, 2012, 05:58:27 AM »
I think you guys may be forgetting the "large blocks of code in pastebin" rule.
Didn't realize that was a rule, didn't think my block of code was that large.  I'll keep that in mind for the future though.

Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #129 on: August 01, 2012, 11:33:09 PM »
I have a quick question, is it possible to change the default font seen on the title screen and on the side bar during game?

Lunasa Prismriver

  • Poltergeist Violinist
  • Himorogi, Burn in Violet
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #130 on: August 04, 2012, 09:40:27 AM »
You can't change the font directly but you can change the font of the frame with objects effects.

Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #131 on: August 05, 2012, 09:58:42 PM »
trying to do my first script. why the hell won't my graphics show up in danmakufu? I set the rect to the correct coordinates, and no matter how I even set it where images are, nothing will show. what is going on?! ;n;

Ozzy

  • Veteran Danmakufu Scripter
  • Currently working on a full Touhou fangame!
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #132 on: August 05, 2012, 10:05:34 PM »
trying to do my first script. why the hell won't my graphics show up in danmakufu? I set the rect to the correct coordinates, and no matter how I even set it where images are, nothing will show. what is going on?! ;n;
Are you loading the graphics? That's often the problem.

Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #133 on: August 05, 2012, 10:13:35 PM »
Are you loading the graphics? That's often the problem.

 
well, I've got this...

script_enemy_main {
    let imgBoss = "script\img\komachidot.png";
    let angle = 90;
    let frame = 0;
    @Initialize {
        SetX(GetCenterX);
        SetY(GetClipMinY + 120);
        SetLife(2000);

        LoadGraphic(imgBoss);
        SetTexture(imgBoss);
        SetGraphicRect(0, 0, 103, 161);
    }

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

    @DrawLoop {
        DrawGraphic(GetX, GetY);
    }

    @Finalize {
        DeleteGraphic(imgBoss);
    }
}

anything wrong here?     

Drake

  • *
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #134 on: August 05, 2012, 10:19:02 PM »
SetTexture and SetGraphicRect go in the DrawLoop.

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

Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #135 on: August 05, 2012, 10:31:45 PM »
I did that, no image still shows...

these are the images, btw.

Drake

  • *
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #136 on: August 05, 2012, 10:51:48 PM »
Oops your MainLoop has no closing bracket.

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

Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #137 on: August 05, 2012, 10:57:19 PM »
oops, sorry about that. that's fixed, but how come the image isn't showing if everything is correct? ;n;

Ozzy

  • Veteran Danmakufu Scripter
  • Currently working on a full Touhou fangame!
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #138 on: August 06, 2012, 12:52:44 AM »
oops, sorry about that. that's fixed, but how come the image isn't showing if everything is correct? ;n;
Taking those corrections into account, I'm able to get the image to show up. Check that the file path to the image is correct.

Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #139 on: August 06, 2012, 01:16:57 AM »
is it? because I tried with exrumia.png as a test in the folder earlier, and she showed up though..

Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #140 on: August 24, 2012, 07:36:24 PM »
 Hi everyone!

I'm having a bit of trouble running the fangame The Last Comer on my danmakufu. 

I downloaded and moved the bgm files to the game's folder, but whenever I tried to play it the game crashes when the stage 1 boss appears for the boss battle.  Has anybody here downloaded the game and got it running properly, or knows how to fix the event script so it works?  Thanks in advance. 

LadyScarlet

  • Too lazy to make this a gif right now
  • Still scumming for a good pull
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #141 on: August 26, 2012, 03:02:43 AM »
I'm having trouble trying to get my script to work (AGAIN. Whenever I try to edit one single thing, it crashes and I have to change it back >.<) This time, I've got an error at the DrawLoop section. However, I can't figure out what it is, so I've posted it and a few lines above to hopefully ring a bell (that reminds me; I really need to get over my loss and start playing ToV PS3 again) :
Code: [Select]
count = 0;

count++;
            }

    @DrawLoop {
SetTexture(yukari);
SetRenderState(ALPHA);
SetAlpha(255);
SetGraphicRect(0,0,80,96);
SetGraphicScale(1,1);
SetGraphicAngle(0,0,0);
        DrawGraphic(GetX, GetY);

    }
What is the error? Thanks. :)
My Youtube Channel. I mostly upload Hisoutensoku videos.

I have no name

  • Dodge ALL the bullets
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #142 on: August 26, 2012, 03:06:58 AM »
The loop itself looks fine, the first thing I can think of would be a bracket error somewhere in the code (probably up with the count stuff) but that's impossible to tell without seeing the rest.

LadyScarlet

  • Too lazy to make this a gif right now
  • Still scumming for a good pull
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #143 on: August 26, 2012, 03:55:02 AM »
Well, I have a pastebin link to the entire code right here:
http://pastebin.com/A6ybRELj
If you want me to post the entire script folder on Mediafire, I can do that, too. Just ask.
My Youtube Channel. I mostly upload Hisoutensoku videos.

I have no name

  • Dodge ALL the bullets
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #144 on: August 26, 2012, 04:02:33 AM »
Yep, if you look carefully at MainLoop, you need another bracket at the end.

Code: [Select]
count++;
            }
}   <---this wasn't there before

    @DrawLoop {
That should work.
One other thing I noticed is there's no yield statements, so if Danmakufu crashes when you try to run the script (no errors) that's why.  Not sure if MainLoop scripting needs those though.

LadyScarlet

  • Too lazy to make this a gif right now
  • Still scumming for a good pull
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #145 on: August 26, 2012, 05:26:02 AM »
So that's fixed, but now I can't get anything other than the purple bullets to fire. Did I put in the wrong things?
My Youtube Channel. I mostly upload Hisoutensoku videos.

I have no name

  • Dodge ALL the bullets
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #146 on: August 26, 2012, 05:49:35 AM »
I decided to take a closer look at your script and found a few other things.  I have no idea if my changes are correct or not, as I've been using a shotsheet (and task scripting instead of MainLoop scripting)

I've helpfully added comments to what I changed explaining why I changed it.  If you're not clear on anything, ask, and I or someone else will answer by tomorrow afternoon.  For now though, sleep.

LadyScarlet

  • Too lazy to make this a gif right now
  • Still scumming for a good pull
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #147 on: August 26, 2012, 05:17:18 PM »
Maintask is invalid for some reason. When trying to boot up the script, I get this error:

Thanks for the revision, by the way.
My Youtube Channel. I mostly upload Hisoutensoku videos.

I have no name

  • Dodge ALL the bullets
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #148 on: August 26, 2012, 06:38:10 PM »
The only difference from what I have working (aside from parameters and such) is I don't have shotinit-what exactly does that do/what happens if you comment it out?

Fujiwara no Mokou

  • Hourai Incarnate
  • Oh, so this trial of guts is for ME?
    • Profile
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #149 on: August 26, 2012, 09:49:23 PM »
maintask and @Finalize  are prematurely omitted because of the two '}'.
You may want to get rid of it.