Author Topic: ※ Danmakufu Q&A/Problem thread 3 ※  (Read 468863 times)

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1320 on: May 31, 2018, 01:22:34 PM »
Does anyone have a complete list of ph3 functions, because https://dmf.shrinemaiden.org/wiki/Functions_(ph3) isn't working for me

Alternatives:
http://www.geocities.co.jp/SiliconValley-Oakland/9951/pre/th_dnh_help_v3.html (official Japanese docs)
https://web.archive.org/web/20170621193842/http://dmf.shrinemaiden.org:80/wiki/Functions_(ph3)
https://sparen.github.io/ph3tutorials/docs.html (work in progress; incomplete)

I literally just linked the webarchive version of the wiki four posts ago :|


Hele: Not to mention I even answered another member about it too :V
« Last Edit: May 31, 2018, 05:41:08 PM by Helepolis »

Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1321 on: June 01, 2018, 03:20:00 AM »
I literally just linked the webarchive version of the wiki four posts ago :|


Hele: Not to mention I even answered another member about it too :V

Sorry about that I didn't see the previous posts.

Kinedyme

  • Dream Magic - Duplex Spark!
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1322 on: June 02, 2018, 03:04:41 AM »
A few questions:
Assuming it's not being looked after by the script, how far can a shot go off the playing field before it gets automatically deleted?

Does this happen immediately if a shot spawns/is teleported outside of this range?

Would there be a way to change this value without altering the size of the playing field?

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1323 on: June 02, 2018, 03:26:50 AM »
A few questions:
Assuming it's not being looked after by the script, how far can a shot go off the playing field before it gets automatically deleted?

Does this happen immediately if a shot spawns/is teleported outside of this range?

Would there be a way to change this value without altering the size of the playing field?

1) 64 pixels on all sides (See: http://www.geocities.co.jp/SiliconValley-Oakland/9951/pre/th_dnh_help_v3.html )
2) For regular shots, you must set them to not auto delete via ObjShot_SetAutoDelete(obj, false);
3) Refer to SetShotAutoDeleteClip ( https://sparen.github.io/ph3tutorials/docs.html#fxn_SetShotAutoDeleteClip )
« Last Edit: June 02, 2018, 03:55:16 AM by Sparen »

Kinedyme

  • Dream Magic - Duplex Spark!
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1324 on: June 02, 2018, 03:36:14 AM »
1) 64 pixels on all sides (See: http://www.geocities.co.jp/SiliconValley-Oakland/9951/pre/th_dnh_help_v3.html )
2) For regular shots, you must set them to not auto delete via ObjShot_SetAutoDelete(obj, false);
3) Refer to SetShotAutoDeleteClip ( https://web.archive.org/web/20170522220913/http://dmf.shrinemaiden.org:80/wiki/Shot_Functions#SetShotAutoDeleteClip )


Thank you, and can this apply for all objects, not just shots?

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1325 on: June 02, 2018, 03:54:28 AM »

Thank you, and can this apply for all objects, not just shots?

I had trouble getting it working with Curvy Lasers, but it definitely works for all ObjShot instances.

If you're thinking about ObjRender, etc, then no, it will not work.

Note: I hastily threw together a new feature on my website, so the link to the webarchive has been replaced

Drake

  • *
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1326 on: June 02, 2018, 05:06:58 AM »
If you really need it for other kinds of Move objects you could do something like this:

EDIT: use below
« Last Edit: June 02, 2018, 06:46:22 AM by Drake »

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

Kinedyme

  • Dream Magic - Duplex Spark!
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1327 on: June 02, 2018, 05:39:17 AM »
Please excuse me being confused: For the top and left values, do you have to enter a negative value to create the off-screen buffer? Or is it the magnitude?

Drake

  • *
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1328 on: June 02, 2018, 06:46:03 AM »
Negative value, yes. Except now I realize this is inconsistent with SetShotAutoDeleteClip and stuff, so let me make this better:

Code: [Select]
task ObjMove_SetAutoDeleteClip(obj, left, top, right, bottom){
let l = -left;
let t = -top;
let r = GetStgFrameWidth() + right;
let b = GetStgFrameHeight() + bottom;

let x;
let y;
while(!Obj_IsDeleted(obj)){
x = ObjMove_GetX(obj);
y = ObjMove_GetY(obj);
if(x < l || x > r || y < t || y > b){
Obj_Delete(obj);
}
yield;
}
}

This one you could put in (64, 64, 64, 64).

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

HumanReploidJP

  • The Scripter with Something of Common Sense
  • "Start the life of an idol! Let's get STAR~ted!"
    • HumanReploidJP's Youtube Channel
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1329 on: June 03, 2018, 12:20:48 PM »

In the example, I have an image of a white pixel I use for a canvas, and a 256x256 image of a white circle on black background. I stretch the white pixel to 1024x512 (the render target size), and then repeatedly add copies of the circle texture with subtract blending. So the render target becomes a texture that is mostly white with a bunch of random black circles. Meanwhile, some background is drawn on layers 26 to 28. The Shader object applies the masking shader technique, using the render target as the applied texture, to the layers 26 to 28, which results in the background appearing as though there are holes in it that scroll across the screen.

I tried it, but it shows the black circles on a white background instead... what just happened? Also, what is that text "example_mask" as seen on the example you posted?
[attach=1]
Can someone tell me...on the masking shader? I have no sense after I follow this example... Please Respond...
« Last Edit: June 03, 2018, 12:32:41 PM by HumanReploidJP »
MiraikeiBudoukan (Futuristic Vineyard) Game Concepts (WIP)
(Non-Touhou, yet bullet-hell-Inspirable (Like JynX). Don't get serious.)

Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1330 on: June 03, 2018, 01:23:40 PM »
I tried it, but it shows the black circles on a white background instead... what just happened? Also, what is that text "example_mask" as seen on the example you posted?

Can someone tell me...on the masking shader? I have no sense after I follow this example... Please Respond...
To make the mask always transparent you need to remove Obj_SetVisible(contents, true); from the code below, so it won't be only black circles(atleast that's what I did and it works completely fine)
Code: [Select]
ascent(i in 0..length(contents)){
// Make visible when drawing to render target
Obj_SetVisible(contents[i], true);
RenderToTextureB1(texture_name, contents[i], (i==0));
// Otherwise invisible
Obj_SetVisible(contents[i], false);
}

As for "example_mask" it is just a name for a mask, you don't have to worry about it.
« Last Edit: June 03, 2018, 01:25:33 PM by IIe4eNiIIIe »

HumanReploidJP

  • The Scripter with Something of Common Sense
  • "Start the life of an idol! Let's get STAR~ted!"
    • HumanReploidJP's Youtube Channel
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1331 on: June 04, 2018, 05:02:14 AM »
To make the mask always transparent you need to remove Obj_SetVisible(contents, true); from the code below, so it won't be only black circles(atleast that's what I did and it works completely fine)
Code: [Select]
ascent(i in 0..length(contents)){
// Make visible when drawing to render target
Obj_SetVisible(contents[i], true);
RenderToTextureB1(texture_name, contents[i], (i==0));
// Otherwise invisible
Obj_SetVisible(contents[i], false);
}

As for "example_mask" it is just a name for a mask, you don't have to worry about it.

I tried removing it, but still looks like this:
[attach=2]

It's hard to see the code that maybe it's misarranged because of the code. Can you show me an (full) example of it? Please respond.
MiraikeiBudoukan (Futuristic Vineyard) Game Concepts (WIP)
(Non-Touhou, yet bullet-hell-Inspirable (Like JynX). Don't get serious.)

Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1332 on: June 04, 2018, 06:27:16 AM »
I tried removing it, but still looks like this:

It's hard to see the code that maybe it's misarranged because of the code. Can you show me an (full) example of it? Please respond.

So, this is what I'm using. https://pastebin.com/8RNxnMNU There is too much to cover, so just ask me if something is not clear for you. renderStage; and scrollStage; almost don't affect anything but they are involved in couple of things, so I left them in.

Drake

  • *
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1333 on: June 04, 2018, 09:19:28 AM »
why don't you post your own code instead of asking others to post more code that you might not even gain any insight from

p o s t y o u r c o d e

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

Kinedyme

  • Dream Magic - Duplex Spark!
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1334 on: June 05, 2018, 03:06:49 AM »
My computer is warning me that this Forum has a security certificate error. Is this something I should be worried about?

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1335 on: June 05, 2018, 03:45:39 AM »
My computer is warning me that this Forum has a security certificate error. Is this something I should be worried about?

It happens around this time of year. Don't worry - it'll be addressed... eventually.

Tom

  • *
  • Programmer
    • LunarCast Network
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1336 on: June 05, 2018, 08:21:38 PM »
1) 64 pixels on all sides (See: http://www.geocities.co.jp/SiliconValley-Oakland/9951/pre/th_dnh_help_v3.html )
64 pixels from the STG frame set via commands or the screen (set via resolution)?

Drake

  • *
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1337 on: June 05, 2018, 11:23:51 PM »
It's 64 pixels by default but you can set it globally. If you just change the window scale obviously it doesn't matter but if you're changing the resolution as a package then you're responsible for setting appropriate bounds.

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

Enko

  • Spirit flying to anywhere
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1338 on: June 06, 2018, 06:41:06 AM »
When I try to encode the dnh script as UTF-16 LE with BOM (due to Chinese charactors), the another sciript file will cause a crash called "#Include file is not found".
Actually the file is there but, because the #include code use relative path so it crashed.
If I use the original Shift-JIS code Chinese charactors won't show correctly but this error won't spread out either.
How can I deal with this?
(btw,UTF8 with/without BOM & UTF-16 LE without BOM will crash by encoding problem.)
Need help with C# DX developing.

Drake

  • *
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1339 on: June 06, 2018, 08:50:16 AM »
Can you show what your script is like and how each file is encoded? I've seen this issue before but I cannot replicate it and don't really know what's happening.

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

Enko

  • Spirit flying to anywhere
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1340 on: June 06, 2018, 02:55:00 PM »
Maybe it's the same problem. e.g.
I re-encoded the file
Code: [Select]
resource\script\lib\lib_value.dnhas UTF-16 LE with BOM,however:
(Pic)
It shows the crash spread out at the Line 282 in lib_Manual.dnh
But actually,there's only 281 lines in the file.
And the code shown is in fact in another file called lib_PauseScene.dnh,with path
Code: [Select]
resource\script\stage\st_system\lib_PauseScene.dnhthe code line
Code: [Select]
#include "./lib_PauseFps.dnh"the Dot should mean "resource\script\stage\st_system" but misunderstood by engine.
However it can be OK if lib_value.dnh uses Shift-JIS code.
And not only this,the error is also spread out at player script (resource\player) and other script that contains relative path including,
« Last Edit: June 06, 2018, 02:57:50 PM by Enko »
Need help with C# DX developing.

Drake

  • *
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1341 on: June 06, 2018, 10:17:24 PM »
I mostly understand what the problem is, but I do not understand your folder structure or what the scripts look like so I don't know how to test this myself.

If I try to make a simple example like this:
Code: [Select]
// test.dnh

#TouhouDanmakufu[Single]
#ScriptVersion[3]
#Title["test"]

#include "./include.dnh"
#include "./include2.dnh"

@Initialize{}
@MainLoop{}
@Event{
alternative(GetEventType())
case(EV_REQUEST_LIFE){
SetScriptResult(1);
}
}

// include.dnh

function a{
AddScore(1);
RaiseError("东方");
}

// include2.dnh

function b{
AddScore(1);
RaiseError("东方");
}

With everything encoded as UTF-16 LE BOM, it works. So it isn't just the encoding and relative path #includes. Please try to find a way to simply replicate the problem.

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

Enko

  • Spirit flying to anywhere
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1342 on: June 07, 2018, 06:20:41 AM »
Quote
Sorry for long codes,for some reason I cannot access pastebin.
Here's a simple file tree:
Code: [Select]
resource
├bgm                             //BGM
├img                             //Pictures
├player
│├CommonData
│└th12
│  ├pl00                        //Player Script "Reimu"
│  │├pl00_MainShotTask.dnh
│  │├pl00_OptionTask.dnh
│  │├pl00_Player.dnh
│  │├pl00_SpellCard.dnh
│  │└pl00_SubShotTask.dnh
│  ├...
│  ├pl06
│  └CommonBomb.dnh
├script
│├lib
││└lib_value.dnh
│└stage
│  ├bg
│  ├enemy
│  ├scl
│  │└stage1_scl.dnh
│  ├st_system
│  │├lib_PauseScene.dnh
│  │└lib_PauseFps.dnh
│  ├lib_manual.dnh              //Maunal Scene
│  ├lib_MusicRoom.dnh           //MusicRoom Scene
│  └musiccmt.txt                //MusicRoom Comments
└se                             //Sound Effect

All of start is that I encode lib_value.dnh as UTF-16 LE BOM because it contains a string to set the default font of the text drawing in the game,and the name of the font contains chinese words.
Code: [Select]
//  lib_value.dnh, Originally Shift-JIS
let CurrentFont = "飴鞭ゴシック等幅-04";//ゲームの共通フォント(The default font in the game)
let CurrentFontP = "飴鞭ゴシック等幅-04";//スペルカード名の共通フォント(The default font for spellcards' name)
---------->>>
// Saved as UTF-16 LE BOM
let CurrentFont = "黑体";//ゲームの共通フォント(The default font in the game)
let CurrentFontP = "黑体";//スペルカード名の共通フォント(The default font for spellcards' name)

Then I go to MusicRoom and find everything ok,same as SpellPractice Selection scene.(Both contains direct text drawing)
but if I go to Replay Selection the error spread:
Code: [Select]
#Include file is not found[<Game>/resource/script/stage/lib_PauseFps.dnh].
<Game>/resource/script/stage/lib_Manual.dnh
lib_Manual.dnh line(行)=282


#include "./lib_PauseFps.dnh"

lib_Manual.dnh has only 281 lines codes,in fact. The script contains #include "./lib_PauseFps.dnh" is lib_PauseScene.dnh
Code: [Select]
// lib_PauseScene.dnh

#include "resource/script/lib/lib_files.dnh"
#include "resource/script/lib/lib_v0.12m_Effect.dnh"
#include "resource/script/lib/lib_SpellIndex.dnh"
#include "resource/script/stage/lib_SpellResult.dnh"
#include "resource/script/stage/lib_Manual.dnh"
#include "./lib_PauseFps.dnh"
Yeah here cause a problem,it is ok before I encode lib_value.dnh as UTF-16 LE BOM,but crashed after I did it.That's strange.

Sure I can solve by replacing Dot with "resource\script\stage\st_system",turly it works.
However after doing this the game still crashed for another error:
Code: [Select]
#Include file is not found[<Game>/resource/player/CommonData/pl00_MainShotTask.dnh].
<Game>/resource/player/CommonData/GaugeEffectTask.dnh
GaugeEffectTask.dnh line(行)=1588


#include "./pl00_MainShotTask.dnh"
#include "./pl00_OptionTask.dnh"

#include "resource/player/th12/CommonBomb.dnh"
#include "./pl00_SpellCard.dnh"
And the file pl00_Player.dnh
Code: [Select]
// pl00_Player.dnh
#TouhouDanmakufu[Player]
#ScriptVersion[3]
#ID["Reimu"]
#Title["Reimu"]
#ReplayName["Reimu"]

#include "resource/script/lib/lib_usershot_th128.dnh"
#include "resource/script/lib/lib_v0.12m_function.dnh"

#include "resource/script/lib/lib_files.dnh"
#include "resource/script/lib/lib_Event.dnh"
#include "resource/script/lib/lib_ItemConst.dnh"

#include "resource/player/CommonData/LocalData.dnh"
#include "resource/player/CommonData/Spell_back.dnh"
#include "resource/player/CommonData/StatusIrregular.dnh"

#include "resource/player/CommonData/SlowEffectTask.dnh"
#include "resource/player/CommonData/GaugeEffectTask.dnh"

#include "./pl00_MainShotTask.dnh"
#include "./pl00_OptionTask.dnh"

#include "resource/player/th12/CommonBomb.dnh"
#include "./pl00_SpellCard.dnh"

these are just two of the errors.After I solve one by replacing Dot,the another will show up by the same problem of relative path.
And it seems in gaming script(such as background drawing)will cause it,too.
Code: [Select]
#Include file is not found[<Game>/resource/script/bg/bg_st1.dnh].
<Game>/resource/script/stage/lib_StageInclude.dnh
lib_StageInclude.dnh line(行)=270


#include "./../bg/bg_st1.dnh"
#include "./lib_Stage1.dnh"
#include "./../enemy/lib/sp_bg/background_st1.dnh"

Code: [Select]
// stage1_scl.dnh
#TouhouDanmakufu[Stage]
#ScriptVersion[3]
#System["./../st_system/system.dnh"]//ここのシステム呼び出しは必須

#include "./../lib_StageInclude.dnh"
#include "./../bg/bg_st1.dnh"
#include "./lib_Stage1.dnh"
#include "./../enemy/lib/sp_bg/background_st1.dnh"
Here comes interesting thing, lib_StageInclude.dnh is found but bg_st1.dnh cannot found,and just caused by a encoding?
Need help with C# DX developing.

Drake

  • *
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1343 on: June 07, 2018, 08:33:05 AM »
Ok, I'm beginning to understand what's happening. The line numbering is not a problem though. How #includes work is that the included scripts are essentially inserted directly to where the #include is. In the example I gave above, the compiled script would look like:

Code: [Select]
[...]
#Title["test"]

function a{
AddScore(1);
RaiseError("东方");
}
function b{
AddScore(1);
RaiseError("东方");
}

@Initialize{}
[...]

What's happening in your problem, is that lib_PauseScene.dnh is being compiled, it #includes some scripts into it, then #includes lib_Manual.dnh. At the end, for some reason Danmakufu does not think the file lib_Manual.dnh has ended, so it thinks the "current script being compiled" is still lib_Manual.dnh and not lib_PauseScene.dnh. Then it continues to read what comes next and tries to #include lib_PauseFps.dnh, which is the next file to include in lib_PauseScene.dnh, but because Danmakufu thinks it's still handling lib_Manual.dnh, it tries to find the file relative to lib_Manual.dnh, which fails because it isn't in the same directory as lib_PauseScene.dnh.

The same happens in the other examples too: it compiles pl00_Player.dnh, which #includes GaugeEffectTask.dnh, doesn't think that file is finished being read, then tries to #include the next script pl00_MainShotTask.dnh relative to GaugeEffectTask.dnh instead of pl00_Player.dnh.

So I think the problem might come from #including a script encoded as UTF-16 LE BOM into a script encoded as SJIS, or vice-versa.

What I'm not sure of is why changing lib_value.dnh causes these particular changes in different scripts. Is lib_value.dnh included at any point in any of these files?
« Last Edit: June 07, 2018, 08:36:32 AM by Drake »

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

Enko

  • Spirit flying to anywhere
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1344 on: June 07, 2018, 10:38:41 AM »
Yes there is sure a file (also the only file) named lib_files.dnh included lib_value.dnh,the full path is resource\script\lib\lib_files.dnh.
This file define the files path the game(or,script) will use and other constants.
Code: [Select]
// lib_files.dnh

//カレントディレクトリ
let DIR_EXE = GetFileDirectory(GetMainPackageScriptPath);
let DIR = DIR_EXE~"resource/";
let FONT_DAT = DIR ~"img/font.dat";
let SyFontPath = DIR ~"img/font/amemuchigothicmono-b.ttf";
let SyFontBPath = SyFontPath;

#include "./lib_value.dnh"
#include "./lib_juicevalue.dnh"
And lib_files.dnh is included by other scripts that for some system-like using (e.g.players, PauseScene.dnh)
however almost all these scripts use absolute path to include lib_files.dnh.
(Btw,maybe encode all scripts to UTF16 is helpless.)
Need help with C# DX developing.

Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1345 on: June 10, 2018, 01:06:18 AM »
Hello, I'd like some help with something I want to do in Touhou Danmakufu 0.12.

I want to make a row of bullets vary more in angle if the player gets closer to the boss. (Think Touhou 6 Stage 5 before the Sakuya Midboss.)
Is this possible? Or should I upgrade to ph3?

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1346 on: June 10, 2018, 01:59:02 PM »
Hello, I'd like some help with something I want to do in Touhou Danmakufu 0.12.

I want to make a row of bullets vary more in angle if the player gets closer to the boss. (Think Touhou 6 Stage 5 before the Sakuya Midboss.)
Is this possible? Or should I upgrade to ph3?

Is it possible? Yes. Do I remember exactly how to do it and which 0.12m functions to use? Not really. (cough cough please use ph3 - 0.12m is so old that pretty much nobody uses it anymore)

...

Regardless of engine, here's how it would work:

You will need to get the boss's position and the player's position, use the distance formula to calculate the distance between the two, and then utilize that number to control whatever parameters you need. In ph3, that's going to mean GetPlayerX/Y and ObjMove_GetX/Y.

How you scale the angle based on the distance is up to you as a designer.

Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1347 on: June 10, 2018, 03:10:13 PM »
Is it possible? Yes. Do I remember exactly how to do it and which 0.12m functions to use? Not really. (cough cough please use ph3 - 0.12m is so old that pretty much nobody uses it anymore)

...

Regardless of engine, here's how it would work:

You will need to get the boss's position and the player's position, use the distance formula to calculate the distance between the two, and then utilize that number to control whatever parameters you need. In ph3, that's going to mean GetPlayerX/Y and ObjMove_GetX/Y.

How you scale the angle based on the distance is up to you as a designer.

Uh, I'm not much of a Danmakufu expert, but what code would I need for it to do that?

This is the code I used:
Code: [Select]

if(subattack == 1 && count % 1 == 0 && count >= 0 && count % 240 < 20){
let angle = GetX - GetPlayerY;
let speed = 3;
loop(10){
ascent(i in 0..1){
CreateShotA(2, GetX, GetY, i*4);
SetShotDataA(2, 0, speed, angle, 0, 0, 3, BLUE01);
FireShot(2);
}
angle += 360 / 10;
}
}

Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1348 on: June 11, 2018, 12:51:02 AM »
I'm trying to make a spell card based off of Kage Mimeimas first non-spell, but I cannot figure out how to do the danmakufu.

https://www.youtube.com/watch?v=8SaDXRlBSsU

Any help would be appreciated!  :D

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1349 on: June 11, 2018, 04:06:59 AM »
The best person to ask is probably WishMakers (refer to https://www.youtube.com/watch?v=Y-PFoG6FiHg).

Essentially, when you create your bullets, you assign them to a parent dummy object with an ID. After a certain amount of time, they aim for their final spot relative to the parent object, which moves.

I've done some similar things in the past, but those aren't exactly the same. I can provide code, but it's probably better for you to try and get it working on your own since you have a better sense of what you want.