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

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #870 on: December 09, 2014, 06:28:28 PM »
in other words, i must remove yield from bullet...
...but the result is the same :v
http://pastebin.com/5F8CdKU2
any other mistake? :T
(i tried taking out the yield inside mainloop, and the spell card is declared properly, name cutin and all, but when the invincibility wears off i can't trigger any more bombs, not even after dying, what's with this? :T)

Drake

  • *
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #871 on: December 09, 2014, 10:15:21 PM »
The point is that you go through bullet(), it ends, and then the next statement is executed, which is End(). Look at bullet(): You do stuff to the bomb object, set UVs, maybe spawn another task, set XYs, then end. Once that happens, End() hits, which ends the spell script. It doesn't matter that you run other tasks. You have to rethink when you want to call End().

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

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #872 on: January 23, 2015, 06:37:03 AM »
How works ALPHA in OBJ_EFFECT?
I want to make picture to appear slowly
Obj_SetAlpha(obj,x);
x++;
Danmakufu doesn't find any mistake, but picture papers suddenly.
How does it works?

Uruwi

  • Nightmare of Torrential Precipitation
  • 478 million goober
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #873 on: January 23, 2015, 06:52:14 AM »
How works ALPHA in OBJ_EFFECT?
I want to make picture to appear slowly
Obj_SetAlpha(obj,x);
x++;
Danmakufu doesn't find any mistake, but picture papers suddenly.
How does it works?

I don't really 0.12m but did you yield; inside the loop?
foo = foldl $ flip ($)
Highest difficulty 1CCed for each game, by shot type in the original order. (-: never 1CCed on any difficulty, or never used; E: easy, N: normal, H: hard, L / U: lunatic / unreal.)
EoSD [NNNE] PCB [EE--N-] IN [NEEE + Ex Border] PoFV [Mystia N, Mystia E no charge] MoF [EN--H- + Ex Marisa B] SA [N-----] UFO [----EN] TD [NENE] DDC [EE-EHE + Ex Marisa B & Sakuya A] LoLK [PD --N- Legacy ---N] EE [N- + Ex Yabusame] EMS [N-- + Ex Yabusame] RMI [NHN + Ex YaoSuku]
Avelantis (demo) Easy YuukiB 426,077,200

Drake

  • *
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #874 on: January 23, 2015, 06:58:44 AM »
Obj_SetAlpha() isn't a provided function, neither is ObjEffect_SetAlpha(). You need to do something like
ascent(i in 0..4){ ObjEffect_SetVertexColor(obj, i, alpha, 255, 255, 255); }

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

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #875 on: January 23, 2015, 07:56:18 AM »
I don't really 0.12m but did you yield; inside the loop?

yeeees?

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #876 on: January 23, 2015, 08:00:16 AM »
Obj_SetAlpha() isn't a provided function, neither is ObjEffect_SetAlpha(). You need to do something like
ascent(i in 0..4){ ObjEffect_SetVertexColor(obj, i, alpha, 255, 255, 255); }

That I forgot this function O_O
I will try this, it must works
Thanks for helping^_^
(sorry my English is not so good)

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #877 on: January 23, 2015, 11:38:00 AM »
sorry please? but I forgot to ask one more little thing,  could be on 0.12m two script_enemy_main at the same time? :wat:

Drake

  • *
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #878 on: January 23, 2015, 12:09:18 PM »
Nope.

If you want to have two "bosses" on screen at the same time, you need to have one be the actual boss. For the other, you have two options:
- Make the other be a regular enemy (with script_enemy) and use SetDamageRateEx() to make the boss take damage when hitting the other enemy. This is the easiest method.
- Or, keep track of a dummy position to represent the location of the "second" boss, add another hitbox there using SetCollisionA(), and draw the second boss there as an effect object.

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

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #879 on: February 12, 2015, 06:33:36 PM »
Trolling. Yeah.

I always was curious, can ZUN edit it's danmaku without restarting the game? In interview with him he shown how he edits code at his right monitor and see changes on the left monitor, I wonder how it really works.

Danmakufu can do runtime code change, right? It's scripting language, right?

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #880 on: February 12, 2015, 07:01:12 PM »
Trolling. Yeah.

I always was curious, can ZUN edit it's danmaku without restarting the game? In interview with him he shown how he edits code at his right monitor and see changes on the left monitor, I wonder how it really works.

Danmakufu can do runtime code change, right? It's scripting language, right?

Not really. You have to stop execution of the current script and restart it for the changes to be in place.

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #881 on: February 12, 2015, 08:15:34 PM »
It isn't like modern Unreal Engine where you develop and play at the same time. His dual screen just means he is putting his output result on another screen and his code on another screen so he has more overview.

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #882 on: February 17, 2015, 06:29:35 PM »
So...

Code: [Select]
       let dir = 46;

loop {
loop(20) {
let player = GetAngleToPlayer;

CreateShot01(GetEnemyX+50*cos(dir), GetEnemyY+50*sin(dir), 3, player, BLUE01, 0);
dir+=90/20;
wait(5);
}
dir = 46;
wait(127);
yield;
}

This one task spawns 20 bullets in a 90? arc and aims every bullet towards the enemy, but GetAngleToPlayer is never perfect, is it necessary to use an object bullet and atan2(etc) to direct bullets properly? what other ways are there to make this?

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #883 on: February 17, 2015, 07:49:16 PM »
So...

Code: [Select]
       let dir = 46;

loop {
loop(20) {
let player = GetAngleToPlayer;

CreateShot01(GetEnemyX+50*cos(dir), GetEnemyY+50*sin(dir), 3, player, BLUE01, 0);
dir+=90/20;
wait(5);
}
dir = 46;
wait(127);
yield;
}

This one task spawns 20 bullets in a 90? arc and aims every bullet towards the enemy, but GetAngleToPlayer is never perfect, is it necessary to use an object bullet and atan2(etc) to direct bullets properly? what other ways are there to make this?

Well, in ph3, it's very easy. :)

But in 0.12m, you will have to use atan, since the bullet is spawning at a location other than the boss.

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #884 on: February 17, 2015, 08:09:31 PM »
Okay so...

Code: [Select]
       task fire1 {
let dir = 46;

loop {
loop(20) {
bullet(GetEnemyX+50*cos(dir), GetEnemyY+50*sin(dir), 3, atan2(Obj_GetY(shot) - GetPlayerY, Obj_GetX(shot) - GetPlayerX), BLUE01, 0);
dir+=90/20;
wait(5);
}
dir = 46;
wait(127);
yield;
}
}

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

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

}

I'm not getting how to tidy up this...
Of course, this doesn't work because i'm calling "shot" object in a place it doesn't exist...
Should task bullet be inside task fire1?
I've tried 2 or 3 other methods i thought of but didn't work...

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #885 on: February 17, 2015, 10:32:47 PM »
Okay so...

Code: [Select]
       task fire1 {
let dir = 46;

loop {
loop(20) {
bullet(GetEnemyX+50*cos(dir), GetEnemyY+50*sin(dir), 3, atan2(Obj_GetY(shot) - GetPlayerY, Obj_GetX(shot) - GetPlayerX), BLUE01, 0);
dir+=90/20;
wait(5);
}
dir = 46;
wait(127);
yield;
}
}

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

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

}

I'm not getting how to tidy up this...
Of course, this doesn't work because i'm calling "shot" object in a place it doesn't exist...
Should task bullet be inside task fire1?
I've tried 2 or 3 other methods i thought of but didn't work...
As far as I can see. You're trying to fire a "fan" of bullets which all aim on the player, right? If so:

 Just move atan2(Obj_GetY(shot) - GetPlayerY, Obj_GetX(shot) - GetPlayerX)  into the task bullet and set the angle.

dir = atan2(Obj_GetY(shot) - GetPlayerY, Obj_GetX(shot) - GetPlayerX);

Clean up tips: Also you can delete the yield; after  wait(127) and just turn that into wait(128). Dual yields are redundant (I know they appear in my tutorials but later on I discovered they are actually bad. Because technically (wait) is also a yield on itself. As in wait(1) is same as just yield;

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #886 on: February 17, 2015, 10:55:26 PM »
Yes, the bullets spawn in a 90? fan from right to left, and each one aims to the player independantly.

And, if i got right what you said, it should be something like this...

Code: [Select]
task fire1 {
let dir = 46;

loop {
loop(20) {
bullet(GetEnemyX+50*cos(dir), GetEnemyY+50*sin(dir), 3,  BLUE01, 0);
dir+=90/20;
wait(5);
}
dir = 46;
wait(127);
yield;
}
}

task bullet(x, y, v, graphic, delay) {
let shot = Obj_Create(OBJ_SHOT);
let dir = atan2(Obj_GetY(shot) - GetPlayerY, Obj_GetX(shot) - GetPlayerX);

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

}

Or this...

Code: [Select]
task fire1 {
let dir = 46;

loop {
loop(20) {
bullet(GetEnemyX+50*cos(dir), GetEnemyY+50*sin(dir), 3,  BLUE01, 0);
dir+=90/20;
wait(5);
}
dir = 46;
wait(127);
yield;
}
}

task bullet(x, y, v, graphic, delay) {
let shot = Obj_Create(OBJ_SHOT);

Obj_SetPosition(shot, x, y);
Obj_SetSpeed(shot, v);
Obj_SetAngle(shot, atan2(Obj_GetY(shot) - GetPlayerY, Obj_GetX(shot) - GetPlayerX));
ObjShot_SetGraphic(shot, graphic);
ObjShot_SetDelay(shot, delay);
ObjShot_SetBombResist(shot, true);

}

However, the latter one aims at exactly 180? away from the player :V The former... meh
There's something i'm missing...

Drake

  • *
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #887 on: February 17, 2015, 11:13:15 PM »
The second is more correct because by the time you call Obj_GetX/Y the object's position is actually set. In the first it isn't so it'll mess up. In both cases you could have just used your x and y parameters instead.

The reason it's backwards is because it's aiming from the player to the bullet, not the other way around. You want the destination coordinates minus the source coordinates.

You don't even need a separate function/task for all this, though. (Your second one should work if you flipped the coordinates though)

Code: [Select]
let dir = 46;
loop {
loop(20) {
let x = GetEnemyX+50*cos(dir);
let y = GetEnemyY+50*sin(dir);
CreateShot01(x, y, 3, atan2(GetPlayerY - y, GetPlayerX - x), BLUE01, 0);
dir+=90/20;
wait(5);
}
dir = 46;
wait(128);
}
« Last Edit: February 17, 2015, 11:24:41 PM by Drake »

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

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #888 on: February 17, 2015, 11:28:42 PM »
And so, it finally works, thank you all :v

EDIT: That aside...

http://pastebin.com/uhQFWNyy

There's a lot of cleaning up to do, and i'll eventually do it, but i can't seem to figure out how to change between phases properly...

My idea is that when "phase" CommonData reaches 1, the boss stops all actions and gets to perform whatever needs to be done whenever "phase" reaches 1 and higher, etc...
But since all actions depend on an "if/else if/else" statement, i'm not sure where and how to make this happen.
What should be done?
All this is in the same spell card by the way...

EDIT2: I didn't clarify that the next phase is triggered succesfully... but not inmediately after "phase" reaches 1 :v
« Last Edit: February 18, 2015, 12:44:31 AM by BlazervaniaX »

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #889 on: July 16, 2015, 05:17:21 PM »
After downloading Danmakufu 0.12m and following the instructions on how to access it using Applocale, this occurs.
http://prntscr.com/7tg33h
Help please? How do I open the Danmakufu program??

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #890 on: July 17, 2015, 08:05:44 AM »
Hmmm, we're going to need some more information. What steps did you exactly undertake.

Did you also configure AppLocal to make the exe run with Japanese local?



Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #891 on: July 17, 2015, 10:36:57 AM »
I got the instructions from this thread > https://www.shrinemaiden.org/forum/index.php?topic=6181.0
and this is the step I followed.
Danmakufu is a Japanese application and you probably can't run it correctly as-is; to get around this, you'll want to run it with AppLocale. Once you've got AppLocale, choose the th_dnh.exe file, choose to run it with Japanese settings (it's the very bottom choice in the drop-down box), and you're good to go. You can even choose to make a permanent shortcut for running Danmakufu with AppLocale. As for config.exe, you can get that to run just by putting it in Windows 2000 compatibility mode.
And I don't quite understand about the part where I need to configure Applocale. However, I'm able to access to Mystical Power Plant using Applocale

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #892 on: July 18, 2015, 07:20:09 AM »
Keep in mind that Mystical Power Plant is a Ph3 script and not 0.12m.

To be honest I am out of ideas why you're crashing. The applocal thing is also described here: https://www.shrinemaiden.org/forum/index.php?topic=4138.0

Uruwi

  • Nightmare of Torrential Precipitation
  • 478 million goober
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #893 on: July 18, 2015, 07:19:00 PM »
I think you need to extract the zip in Japanese locale as some files have Japanese filenames.
foo = foldl $ flip ($)
Highest difficulty 1CCed for each game, by shot type in the original order. (-: never 1CCed on any difficulty, or never used; E: easy, N: normal, H: hard, L / U: lunatic / unreal.)
EoSD [NNNE] PCB [EE--N-] IN [NEEE + Ex Border] PoFV [Mystia N, Mystia E no charge] MoF [EN--H- + Ex Marisa B] SA [N-----] UFO [----EN] TD [NENE] DDC [EE-EHE + Ex Marisa B & Sakuya A] LoLK [PD --N- Legacy ---N] EE [N- + Ex Yabusame] EMS [N-- + Ex Yabusame] RMI [NHN + Ex YaoSuku]
Avelantis (demo) Easy YuukiB 426,077,200

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #894 on: July 19, 2015, 07:32:40 AM »
I'm able to access to Danmakufu 0.12m after running the application, th_dnh as administrator

Lunatic_Reimu

  • No Bomb Enthusiast
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #895 on: July 30, 2015, 01:36:58 PM »
Hello,
I've been trying to run this script in 0.12m called Fantom Fantasm. For some reason the bgm isn't playing, and worst of all my character and the enemy sprites don't show up! The bullets and the bosses do however, and shot sound effects are there :/ My character also pops up during the bosses, but then vanishes again for the stage! I've run plenty of other danmakufu scripts with AppLocal without a problem. In case it makes a difference, my Touhou 6 EoSD does the same thing with the sprites not showing up (making it unplayable on this laptop). Im using Windows XP. Thanks for any help  :]

EDIT: My bgm issue was solved on this topic: https://www.shrinemaiden.org/forum/index.php/topic,18771.0.html
« Last Edit: August 14, 2015, 11:47:59 PM by Lunatic_Reimu »

Nolegs the Cat

  • >Sʜᴇ ᴅᴇᴘᴇɴᴅs ᴏɴ ʏᴏᴜ. >Sʜᴇ ᴅᴇᴘᴇɴᴅs ᴏɴ ʏᴏᴜ.
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #896 on: August 25, 2015, 02:48:08 AM »
So.
I got TLC and 0.12m running, that's great!  :P

How do you unlock stages for practice =_=
« Last Edit: August 25, 2015, 06:16:55 AM by Nolegs the Cat »

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #897 on: August 25, 2015, 12:35:02 PM »
So.
I got TLC and 0.12m running, that's great!  :P

How do you unlock stages for practice =_=
Hello Nolegs the cat, your question is specifically about the game content / game play of a fan made game. Your best choice is to post this at Eirin's section.  :D

This thread is designed for Danmakufu issues related to creating games with the 0.12m engine.

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #898 on: December 31, 2015, 04:00:19 PM »
Hi, I'm new, I tried to use CutIn with own image, it didn't appear. Does it have to be specific size? I used .png as tutorial told me. And why people are talking about AppLocale? I got it working without it on Win7. When I tried to use it, Danmakufu crashed. Thanks in advance.

BobTheTanuki

  • Ph3?
  • What is it?
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #899 on: December 31, 2015, 06:26:07 PM »
Hi, I'm new, I tried to use CutIn with own image, it didn't appear. Does it have to be specific size? I used .png as tutorial told me. And why people are talking about AppLocale? I got it working without it on Win7. When I tried to use it, Danmakufu crashed. Thanks in advance.

You should check the path to the image :u