Author Topic: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m [Closed, read last post!]  (Read 172298 times)

K+ ~ Bake-Danuki

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #300 on: September 04, 2013, 08:30:58 PM »
How do you use the StartConfetti?

Drake

  • *
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #301 on: September 04, 2013, 11:57:05 PM »
You're supposed to make it yourself, I was just outlining the general structure. You run a task that loops and calls a function every few frames. That function only makes one particle and moves it around and whatever.

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

K+ ~ Bake-Danuki

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #302 on: September 05, 2013, 12:33:35 AM »
Oh derp.  :blush:  But thank you.

KuroArashi100

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #303 on: September 06, 2013, 03:10:02 PM »
The code I made won't run correctly. I can't really say for sure, but the laser seems to spawn just like I want, and does what I want, but it keeps spawning in the top-left corner. (0,0?)
Could somebody please check it out and help me find the error?
http://pastebin.com/bfpY9U7R

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #304 on: September 06, 2013, 03:16:05 PM »
Actually I never tried to write scripts for Danmakufu but... why do you try to use x,y patemeters for task sword() but make them equal to zero at 14-15 lines?
Would be glad to get help with Touhou Doumeiju ~ Mystical Power Plant Translation Project spellcard comments' translation.

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #305 on: September 06, 2013, 03:31:57 PM »
Actually I never tried to write scripts for Danmakufu but... why do you try to use x,y patemeters for task sword() but make them equal to zero at 14-15 lines?

Code: [Select]
        task sword(x,y,angle,length,width,graphic,delay){
                let obj = Obj_Create(OBJ_LASER);
                let x = 0;
                let y = 0;
               
                Obj_SetPosition(obj,x,y);
He is right. The laser will always be at 0,0 because of this:
 
Code: [Select]
               let x = 0;
                let y = 0;

X and Y are already defined as arguments that the tasks take. Delete those two lines.

KuroArashi100

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #306 on: September 06, 2013, 05:20:50 PM »
That idea never occurred to me. Looking back on it, it seems pretty stupid, but when I wrote it I wasn't even thinking about those variables.
The variables having the same name is a coincidence; they were used for some calculations for something I tried before.
I completely forgot about the variables having the same name. Thanks for helping!

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #307 on: September 06, 2013, 05:55:26 PM »
That idea never occurred to me. Looking back on it, it seems pretty stupid, but when I wrote it I wasn't even thinking about those variables.
The variables having the same name is a coincidence; they were used for some calculations for something I tried before.
I completely forgot about the variables having the same name. Thanks for helping!

You're welcome.

Sage Ω (Ultima)

  • CEO at Team Eternal Desire
  • ??? X
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #308 on: September 06, 2013, 11:54:27 PM »
I need some help with this little effect script.

Difficulty Display
Stage Script

This will create a difficulty mode display on the screen just like in official Touhous. Works fine in single scripts, but when I apply it to a stage script the game crashes.

Don't know why.

K+ ~ Bake-Danuki

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #309 on: September 07, 2013, 12:08:44 AM »
Can you make an enemy (like a fairy) share the same health with the boss?
(working on the Touhou Medley & Seiga needs her zombie)

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #310 on: September 07, 2013, 12:58:23 AM »
Can you make an enemy (like a fairy) share the same health with the boss?
(working on the Touhou Medley & Seiga needs her zombie)

Yes. If you call it as an enemy, then you use SetLife.

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #311 on: September 07, 2013, 01:16:23 AM »
Yes. If you call it as an enemy, then you use SetLife.
I think he meant that the damage done to the fairy is also done to the boss and vice versa (and I guess the defeat one of them would do the same to the other one). SetLife() sets only specific value and you can't make a "reference", right? Or you meant to make a check for both of them to copy other's health?
« Last Edit: September 07, 2013, 01:18:11 AM by Vectorfish »
Would be glad to get help with Touhou Doumeiju ~ Mystical Power Plant Translation Project spellcard comments' translation.

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #312 on: September 07, 2013, 01:24:48 AM »
I think he meant that the damage done to the fairy is also done to the boss and vice versa (and I guess the defeat one of them would do the same to the other one). SetLife() sets only specific value and you can't make a "reference", right? Or you meant to make a check for both of them to copy other's health?

Yes.

There is GetLife and GetEnemyLife, as well as SetDamageRateEx. Look these up on the Wiki.

Qwertyzxcv

  • yas
  • k!
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #313 on: September 07, 2013, 03:32:35 AM »
How do I make an effectobject start straight and the gradually bend so it's curved?

Drake

  • *
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #314 on: September 07, 2013, 03:46:14 AM »
You'd have to use trigonometry to calculate vertex positions and move them around, and also either adding new vertices as it bends, or just starting the object with a lot of vertices. In any case it's a rather big pain.

Depending on the effect you want, there is probably an easier way to go about it.

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

Sage Ω (Ultima)

  • CEO at Team Eternal Desire
  • ??? X
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #315 on: September 07, 2013, 08:21:40 PM »
Is there way to disable the life bar and timer? I've found a function to disable the HUD but it doesn't count for those two.

This is probably a exe mod( more than likely).

ExPorygon

  • Veteran Danmakufu Scripter
  • Currently working on a full Touhou fangame!
    • Ephemeral Entertainment
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #316 on: September 07, 2013, 08:53:03 PM »
Is there way to disable the life bar and timer? I've found a function to disable the HUD but it doesn't count for those two.

This is probably a exe mod( more than likely).
There is no way to outright remove them. You can only cover them up. If you look at other scripts that have custom HUD effects, you'll see that they usually either cover up the lifebar with their own or just leave it in addition to their own.

Darkness1

  • Nothing to see here.
  • Enigmatic, isn't it?
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #317 on: September 07, 2013, 09:03:11 PM »
The best thing I could get on my latest 0.12m script is to:
1. Make a folder next to your 0.12m files (like the exe file) and name it "img".
2. Use the danmakufu archiver to unpack the images from the "th_dnh.dat" file.
3. Put the unpacked images in the "img" folder.
4. Go to the unpacked image named "System.png".
5. Delete the line graphics which makes up the lifebar in 0.12m.
6. Done! While the lifebar will still be drawn, it will be completely invisible. This however, forces you to upload the entire 0.12m package folder if you want to share your modified script.

Other than that, it remains if it is possible to make a boss fight in 0.12m by chaining together regular enemy files with common data to act like a boss script, which would kind of fix it.
« Last Edit: September 07, 2013, 09:05:22 PM by Darkness1 »

Sage Ω (Ultima)

  • CEO at Team Eternal Desire
  • ??? X
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #318 on: September 08, 2013, 12:06:55 AM »
Ah ok. I'll remember to do that.

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #319 on: September 08, 2013, 12:35:39 AM »
Other than that, it remains if it is possible to make a boss fight in 0.12m by chaining together regular enemy files with common data to act like a boss script, which would kind of fix it.

You will most likely need to contact Mewkyuu/Miransu if you decide to do this. Or you can wait for RaNGE 10 Sakuya to come out/get his Hatate/Giratina/Grovyle from Bulletforge. That's his scripting style.

KuroArashi100

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #320 on: September 08, 2013, 02:42:13 PM »
I'm trying to make a custom concentration effect for a script, but currently the image I'm trying to use doesn't appear.
The image is loaded into memory, and the coordinates are okay too. Does anybody know what could be the problem?

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #321 on: September 08, 2013, 02:54:32 PM »
I'm trying to make a custom concentration effect for a script, but currently the image I'm trying to use doesn't appear.
The image is loaded into memory, and the coordinates are okay too. Does anybody know what could be the problem?

Firstly:
                Obj_SetAlpha(obj,128);
does not work.

You should use
ascent(i in 0..4){ObjEffect_SetVertexColor(obj,i,128,255,255,255);}

Drake

  • *
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #322 on: September 08, 2013, 10:10:13 PM »
Putting LoadGraphic() outside of a script block won't run it. You have to put it in a routine like @Initialize or @MainLoop, or in any other routine called from such.

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

KuroArashi100

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #323 on: September 09, 2013, 06:35:23 AM »
So it has to be loaded using some sort of task?
Like the shot replace script?

Drake

  • *
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #324 on: September 09, 2013, 07:16:25 AM »
I'm saying that these
Code: [Select]
script_enemy_main{
   LoadGraphic()
   @Initialize{}
   LoadGraphic()
   @MainLoop{}
   LoadGraphic()
   function{}
   LoadGraphic()
   task{}
   LoadGraphic()
}
don't work,
these
Code: [Select]
script_enemy_main{
   @Initialize{LoadGraphic()}
   @MainLoop{LoadGraphic()}
   function{LoadGraphic()}
   task{LoadGraphic()}
}
will

Just put LoadGraphic() at the start of Concentration03().
« Last Edit: September 09, 2013, 07:18:12 AM by Drake »

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

BobTheTanuki

  • Ph3?
  • What is it?
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #325 on: September 10, 2013, 02:32:25 PM »
Hi,hi everybody c: how can i make a main menu for my game in danmakufu 0.12 ? and how can i make a stage appear after another stage immidiatley?Thanks for the halp!sorry bad english.. :derp:

KuroArashi100


Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #327 on: September 10, 2013, 08:53:52 PM »
How can I know when the boss have the current X and Y coordinates as the player?
I mean, like when the boss is chasing the player and when he reaches it triggers something

And, is there a way to change the default buttons of danmakufu?
I tried using config.exe but didn't work.

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #328 on: September 10, 2013, 09:10:02 PM »
How can I know when the boss have the current X and Y coordinates as the player?
I mean, like when the boss is chasing the player and when he reaches it triggers something

And, is there a way to change the default buttons of danmakufu?
I tried using config.exe but didn't work.

Code: [Select]
if(((|GetX-GetPlayerX|)^2+(|GetY-GetPlayerY|)^2)^0.5 < 60){
//Stuff
}
This code will only run if the distance between the enemy and the player is 60 pixels or less.

Never use this code:
Code: [Select]
if(GetEnemyX==GetPlayerX && GetEnemyY==GetPlayerY){/*stuff*/}It will never trigger.

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #329 on: September 10, 2013, 10:42:16 PM »
Code: [Select]
if(((|GetX-GetPlayerX|)^2+(|GetY-GetPlayerY|)^2)^0.5 < 60){
//Stuff
}
This code will only run if the distance between the enemy and the player is 60 pixels or less.
Just what I needed. Thank you very much!

Never use this code:
Code: [Select]
if(GetEnemyX==GetPlayerX && GetEnemyY==GetPlayerY){/*stuff*/}It will never trigger.
I feel stupid right now  :V