Author Topic: ※ Dnh Q&A/Problem ※ for Danmakufu ph3 (locked)  (Read 268539 times)

Miplouf Saigyouki

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #120 on: December 11, 2011, 12:57:26 PM »
I would like to learn about tasks and familiars...
Because the truth is that i NEVER use tasks and I'd like to start now...
I know there's already a tutorial about this,but it don't seem to work in ph3... :ohdear:

So,please,can someone show me a very simple task of familiar spawning  around the boss and shooting bullets in a code?
Pwease?

(I don't really know if it's in here or in the danmaku request thread that I should post,but since it's about ph3.. might as well get it in here.)
Thanks!

fondue

  • excuse me
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #121 on: December 11, 2011, 05:59:26 PM »
Hi. Just to say I'm new-ish to Dnh and I would like to know how to script certain things (mostly about bullet patterns).

1. I've been trying to script to make a spiral of bullets, like the beginning of Hina Kagiyama's last spell card on MoF. I suppose it has something to do wit 'ascent'? Or 'descent'?  I'm such a ⑨. I mean, something like the enemy fires 1 bullet down, the next one right after (at about 10 degrees to the right/left, and over and over).

2. For me, it's impossible to to make something fire at say like 30 frames, and have something else fire at 45 frames. I've been doing something like this:
Code: [Select]
@MainLoop
{
let px = GetPlayerX();
let py = GetPlayerY();
let ex = ObjMove_GetX(objEnemy);
let ey = ObjMove_GetY(objEnemy);
let angleToPlayer = atan2(py - ey, px - ex);

if(frame == 30){
let obj = CreateLooseLaserA1(ex, ey, 2, angleToPlayer, 20, 10, DS_ICE_PURPLE, 10);
}
        if(frame == 45){
        let obj2 = CreateLooseLaserA1(ex, ey, 5, angleToPlayer, 200, 50, DS_ICE_RED, 10);

}
frame = 0;
}

If I do something like that, it just comes up with errors and all that stuff.

3. How the hell do you create tasks? Or external scripts? I've always been confused by them. What I'm interested in more is external scripts where you can load bullet patterns and spellcards and all that stuff, right?

4. Could someone please provide me with greater explanation for mathematical and syntax functions. They are very WTH. Never fully understandable.

Thanks in advance.
fonduemaster

Yukari-Chan

  • Excuse me while I prepare /your/ demise. <3 TSO
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #122 on: December 11, 2011, 08:02:30 PM »
Hi. Just to say I'm new-ish to Dnh and I would like to know how to script certain things (mostly about bullet patterns).

1. I've been trying to script to make a spiral of bullets, like the beginning of Hina Kagiyama's last spell card on MoF. I suppose it has something to do wit 'ascent'? Or 'descent'?  I'm such a ⑨. I mean, something like the enemy fires 1 bullet down, the next one right after (at about 10 degrees to the right/left, and over and over).

2. For me, it's impossible to to make something fire at say like 30 frames, and have something else fire at 45 frames. I've been doing something like this:
Code: [Select]
@MainLoop
{
let px = GetPlayerX();
let py = GetPlayerY();
let ex = ObjMove_GetX(objEnemy);
let ey = ObjMove_GetY(objEnemy);
let angleToPlayer = atan2(py - ey, px - ex);

if(frame == 30){
let obj = CreateLooseLaserA1(ex, ey, 2, angleToPlayer, 20, 10, DS_ICE_PURPLE, 10);
}
        if(frame == 45){
        let obj2 = CreateLooseLaserA1(ex, ey, 5, angleToPlayer, 200, 50, DS_ICE_RED, 10);

}
frame = 0;
}

If I do something like that, it just comes up with errors and all that stuff.

3. How the hell do you create tasks? Or external scripts? I've always been confused by them. What I'm interested in more is external scripts where you can load bullet patterns and spellcards and all that stuff, right?

4. Could someone please provide me with greater explanation for mathematical and syntax functions. They are very WTH. Never fully understandable.

Thanks in advance.
fonduemaster

I think you need to start with th_dnh0.12m~. Tasking is easier there and most us already understand all of 0.12m~. To answer your question, since there is no page on the new wiki about functions, I'll explain what I know. You can make bullets, customize angle, and some stuff at CreateShot(A\B)1.  Tasking, I think it is done at finalize like 0.12m~. Mathematically, It depends on the angles, velocity, direction, and delay. Other mathematical functions are Obj_(Whatever you call it) and (maybe) SetMovePosition(I don't know the number).  Oh yeah, next time Pastebin you codes.
« Last Edit: December 11, 2011, 08:04:36 PM by Marisa X Reimu »
" Borders are Borders. They were meant to be manipulated and mistreated. "

Drake

  • *
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #123 on: December 11, 2011, 10:29:48 PM »
Quote
I think you need to start with th_dnh0.12m~. Tasking is easier there and most us already understand all of 0.12m~. To answer your question, since there is no page on the new wiki about functions, I'll explain what I know. You can make bullets, customize angle, and some stuff at CreateShot(A\B)1.  Tasking, I think it is done at finalize like 0.12m~. Mathematically, It depends on the angles, velocity, direction, and delay. Other mathematical functions are Obj_(Whatever you call it) and (maybe) SetMovePosition(I don't know the number).
What. There is no possible way he could have understood that, I barely did myself.


Anyways fonduemaster, you'd be much better off having people explain things to you in real time rather than, from the looks of it, explaining nearly everything about danmakufu. When you have the time, please head over to the #danmakufu IRC channel.

1. Would be easier to do using tasks unless you want MainLoop to get a bit complicated. You can do it with MainLoop, it's just much easier if you learn tasks first.

2. You should be linking a screenshot of the error, or copying the contents of the error. From the looks of it, frame might not be predefined, and even if it was there isn't anything increasing frame in your code so it won't go anywhere. Really it just looks like you don't yet understand program flow at all.

3. Tasks you should read tutorials for and ask questions in the IRC chat for. External scripts you shouldn't be thinking about whatsoever at this point.

4. Again, ask those kinds of questions in the IRC chat. That's less of being confusing than you just not understanding how anything works.

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

Yukari-Chan

  • Excuse me while I prepare /your/ demise. <3 TSO
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #124 on: December 12, 2011, 01:02:28 AM »
What. There is no possible way he could have understood that, I barely did myself.


Anyways fonduemaster, you'd be much better off having people explain things to you in real time rather than, from the looks of it, explaining nearly everything about danmakufu. When you have the time, please head over to the #danmakufu IRC channel.

1. Would be easier to do using tasks unless you want MainLoop to get a bit complicated. You can do it with MainLoop, it's just much easier if you learn tasks first.

2. You should be linking a screenshot of the error, or copying the contents of the error. From the looks of it, frame might not be predefined, and even if it was there isn't anything increasing frame in your code so it won't go anywhere. Really it just looks like you don't yet understand program flow at all.

3. Tasks you should read tutorials for and ask questions in the IRC chat for. External scripts you shouldn't be thinking about whatsoever at this point.

4. Again, ask those kinds of questions in the IRC chat. That's less of being confusing than you just not understanding how anything works.

I'm a bad at explaining stuff. Well I'll let you explain stuff more clear.

" Borders are Borders. They were meant to be manipulated and mistreated. "

fondue

  • excuse me
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #125 on: December 12, 2011, 04:36:25 PM »
Thank you lots Drake and marisa x reimu, this will come in handy.

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #126 on: December 15, 2011, 04:40:26 AM »
I'm a newbie and I have some questions  :D

1. I know how to make a straight laser, but how can I make it permanently?
2. How can I "move" the laser angularly (like Tewi from Touhou 8, but keep on moving...)
3. So I make "a round of bullet" like:

Code: [Select]
let ex = ObjMove_GetX(objEnemy);
let ey = ObjMove_GetY(objEnemy);
let angle=o;
while(angle<360)
{
                  let obj = CreateShotA1(ex, ey, 2, 90, DS_BALL_BS_RED, 10);
                  ObjMove_AddPatternA4(obj,  60,  3,  0,  0,  0,  3, objPlayer, NO_CHANGE);
                  angle+=15;
}

How can I keep the round of bullet aiming at the player without "dis-round" it? (like Aya non-spell form Touhou 10)

That's all, sorry for my English because i'm Asian ???

Rosen

  • Cry moar desu!
  • Hyu~ dorodorodoro!
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #127 on: December 15, 2011, 10:18:08 AM »
If you want something like that, i can help you.
http://www.youtube.com/watch?v=r3_EDoE4kWg

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #128 on: December 15, 2011, 02:58:52 PM »
That's great! Can you give me the script? :D

Rosen

  • Cry moar desu!
  • Hyu~ dorodorodoro!
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #129 on: December 16, 2011, 05:31:51 AM »
No, i won't give it to you, but i can help you in making one. You must learn scripting, not  just Ctrl+C/Ctrl+V-ing.

KrackoCloud

  • I don't mean to be greedy...
  • ... but white rice is my favorite food.
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #130 on: December 16, 2011, 06:11:09 AM »
3. So I make "a round of bullet" like:
Code: [Select]
let ex = ObjMove_GetX(objEnemy);
let ey = ObjMove_GetY(objEnemy);
let angle=o;
while(angle<360)
{
                  let obj = CreateShotA1(ex, ey, 2, 90, DS_BALL_BS_RED, 10);
                  ObjMove_AddPatternA4(obj,  60,  3,  0,  0,  0,  3, objPlayer, NO_CHANGE);
                  angle+=15;
}

How can I keep the round of bullet aiming at the player without "dis-round" it? (like Aya non-spell form Touhou 10)
I think what you might be looking for is this.
Please tell me if it something's wrong.
Code: [Select]
let ex = ObjMove_GetX(objEnemy);
let ey = ObjMove_GetY(objEnemy);
let angle=0;
while(angle<360){
                let obj = CreateShotA1(ex, ey, 2, angle, DS_BALL_BS_RED, 10);
ObjMove_AddPatternA1(obj, 60, 3, GetAngleToPlayer(objEnemy));
                angle+=15;
}

You want all of the bullets to go in the same direction, right?
For this, you want to know the function GetAngleToPlayer(). This will be the new angle for the bullets.
When you put "objEnemy" in the "()", you are saying that this new angle will be the direction from the boss to the player.

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #131 on: December 17, 2011, 06:29:08 PM »
Hum hum hi every one.

I bought an Asus PC for Christmas with windows 7 system.
I want to know if danmakufu can be run on windows 7....

Yukari-Chan

  • Excuse me while I prepare /your/ demise. <3 TSO
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #132 on: December 17, 2011, 07:46:53 PM »
Hum hum hi every one.

I bought an Asus PC for Christmas with windows 7 system.
I want to know if danmakufu can be run on windows 7....

Of Course it Can Duh!

Here are the steps TO FREEDOM!:

1. Download Touhou Danmakufu ( 0.12m~ or ph3. Whichever one you prefer )

2. Download AppLocale and install.

3. As you see, Applocale isn't running. Configure CMD ( Type in CMD or Command Prompt ). Then, run it in admin

4. It gives you a file location. Place Applocale ( apploc ) into that location, folder, file, etc.

5. type in CMD "apploc.msi"

6. YOU HAVE APPLOCALE! SELECT JAPANESE AND RUN TH_DNH!

Video

Applocale Install
" Borders are Borders. They were meant to be manipulated and mistreated. "

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #133 on: December 17, 2011, 10:03:30 PM »
I know what is Applocal (I'm not a danmakufu begginer ?_? ) but it can't run on window 7. And I want to know if ph3 can be run on windows 7 without applocal? I think, there are stuffs to do with unicode...

(Sorry if my english is frenchly bad :P)

Drake

  • *
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #134 on: December 17, 2011, 10:56:19 PM »
AppLocale runs fine on Windows 7 if you can get it to install properly, but the installation does have problems. If you just download the msi file and try to install, it will fail. This is because of a bug with the UAC prompt.

1. Put the apploc.msi into the C:\Windows\system32 folder, (unless you know how to navigate using the command prompt).
2. In the search/run bar in the start menu, type cmd, then press Ctrl, Shift and Enter. The UAC box will pop up and the command line will start in admin mode.
3. Type apploc.msi and hit enter to start installation, (or if can navigate, just CD to the installer).

Alternatively, you can temporarily disable the UAC by going to Start -> Control Panel -> Action Center -> Change User Account Control settings, then set it to "Never notify". Install AppLocale, then turn the UAC setting back to default.

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

Yukari-Chan

  • Excuse me while I prepare /your/ demise. <3 TSO
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #135 on: December 17, 2011, 11:01:33 PM »
I know what is Applocal (I'm not a danmakufu begginer ?_? ) but it can't run on window 7. And I want to know if ph3 can be run on windows 7 without applocal? I think, there are stuffs to do with unicode...

(Sorry if my english is frenchly bad :P)

Unicode? I have ph3 and it runs perfectly fine of Windows 7. Just run it with applocale ( it works in windows 7...)
" Borders are Borders. They were meant to be manipulated and mistreated. "

MMX

  • In Soviet Gensokyo...
  • ...bullets dodge you.
    • LiveJournal blog
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #136 on: December 18, 2011, 02:05:14 AM »
AppLocale runs fine on Windows 7 if you can get it to install properly, but the installation does have problems. If you just download the msi file and try to install, it will fail. This is because of a bug with the UAC prompt.

1. Put the apploc.msi into the C:\Windows\system32 folder, (unless you know how to navigate using the command prompt).
2. In the search/run bar in the start menu, type cmd, then press Ctrl, Shift and Enter. The UAC box will pop up and the command line will start in admin mode.
3. Type apploc.msi and hit enter to start installation, (or if can navigate, just CD to the installer).

Alternatively, you can temporarily disable the UAC by going to Start -> Control Panel -> Action Center -> Change User Account Control settings, then set it to "Never notify". Install AppLocale, then turn the UAC setting back to default.
Hmm i've never experienced such an issues installing applocale on Win 7 :wat: And what is UAC prompt?
« Last Edit: December 18, 2011, 02:07:07 AM by MMX »
My danmakufu thread Most recent - "Kappa Mechanics" (Nitori fight)   My youtube channel Latest update - EoSD extra no bombs clear


Drake

  • *
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #137 on: December 18, 2011, 02:26:09 AM »
User Account Control is that thing that pops up every time you run a program in admin mode or go install a program, asking you if you really want to run the program. It basically hinders things from installing unwanted programs. If you have it turned off then obviously you would have never had problems installing AppLocale, because the UAC is what screws it up.

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

MMX

  • In Soviet Gensokyo...
  • ...bullets dodge you.
    • LiveJournal blog
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #138 on: December 18, 2011, 02:51:19 AM »
User Account Control is that thing that pops up every time you run a program in admin mode or go install a program, asking you if you really want to run the program. It basically hinders things from installing unwanted programs. If you have it turned off then obviously you would have never had problems installing AppLocale, because the UAC is what screws it up.
Ah right than. That's one of the first thing i'm turning off after windows install.
My danmakufu thread Most recent - "Kappa Mechanics" (Nitori fight)   My youtube channel Latest update - EoSD extra no bombs clear


Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #139 on: December 19, 2011, 02:22:57 PM »
No, i won't give it to you, but i can help you in making one. You must learn scripting, not  just Ctrl+C/Ctrl+V-ing.

Then, how can I make the lazers moving? ???

Yukari-Chan

  • Excuse me while I prepare /your/ demise. <3 TSO
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #140 on: December 19, 2011, 06:54:22 PM »
Then, how can I make the lazers moving? ???

Lol, I don't know

Joking aside, just set the speed with Obj_SOMETHING and it moves.
« Last Edit: December 19, 2011, 07:52:54 PM by Tengukami »
" Borders are Borders. They were meant to be manipulated and mistreated. "

KrackoCloud

  • I don't mean to be greedy...
  • ... but white rice is my favorite food.
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #141 on: December 19, 2011, 11:38:29 PM »
Then, how can I make the lazers moving? ???
You might be able to try ObjStLaser_SetAngle.


Besides that, is there a ph3 alternative to CreateShot12? I want bullets that have "gravity."

Drake

  • *
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #142 on: December 19, 2011, 11:47:39 PM »
That would be the CreateShotB series.
CreateShotB1(x, y, xspeed, yspeed, graphic, delay);
CreateShotB2(x, y, xspeed, yspeed, xaccel, yaccel, xmaxspd, ymaxspd, graphic, delay);
CreateShotOB1(obj, xspeed, yspeed, graphic, delay);

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

KrackoCloud

  • I don't mean to be greedy...
  • ... but white rice is my favorite food.
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #143 on: December 20, 2011, 12:34:45 AM »
Are those functions still in development? CreateShotB1 and B2 don't seem to be registering with Danmakufu.

Drake

  • *
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #144 on: December 20, 2011, 03:25:17 AM »
Do you have beta 3? They're only available in the latest beta.
(Although I must admit I haven't actually tested them myself so I can't really help you after that lol)

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

KrackoCloud

  • I don't mean to be greedy...
  • ... but white rice is my favorite food.
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #145 on: December 20, 2011, 05:36:28 AM »
Oh, I thought I had beta 3, but I was actually working with b2+. Thanks.

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #146 on: December 21, 2011, 12:46:55 AM »
I can't seem to be able to play any scripts.
I have no idea how to work Danmakufu and the wiki isn't really helping; it doesn't give me enough information.
The ExRumia script isn't showing up in directory and neither are the other two I've downloaded.

Blargel

  • RAWR!
  • I'M AN ANGRY LOLI!
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #147 on: December 21, 2011, 01:10:08 AM »
I can't seem to be able to play any scripts.
I have no idea how to work Danmakufu and the wiki isn't really helping; it doesn't give me enough information.
The ExRumia script isn't showing up in directory and neither are the other two I've downloaded.

Hope you read the information thread which has a link to the AppLocale tutorial. If you still need help after that, we're going to need more information. Since you're posting in this thread, I'm guessing you're using ph3 instead of 0.12m so I'm not going to be much more help than this. I still haven't touched ph3.
<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.

fondue

  • excuse me
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #148 on: December 23, 2011, 02:02:55 PM »
You might be able to try ObjStLaser_SetAngle.


Besides that, is there a ph3 alternative to CreateShot12? I want bullets that have "gravity."
The Dnh Wiki has no information on that...
nor with some of the other stuff.

NonexistentFlower

  • 悪ノ花(君)
  • Oh... And... I'm a boy.
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #149 on: December 23, 2011, 02:41:18 PM »
Even when I try to create object bullets (By defining all the properties) I still don't manage to change their properties when a certain condition is met (in this case, home on the player when it hits a wall):
(EDIT: Minor spelling mistake corrected)
Code: [Select]
task curvedhomingcrap(x,y,angle,angvel){
let obj = ObjShot_Create(OBJ_SHOT);
ObjMove_SetPosition(obj,x,y);
ObjMove_SetSpeed(obj,2);
ObjMove_SetAngle(obj,angle);
ObjMove_SetAngularVelocity(obj,angvel);
ObjShot_SetGraphic(obj,DS_KNIFE_KOUMA_BLUE);
ObjShot_Regist(obj);
let n=1;
while (!Obj_IsDeleted(obj)){
let sx=ObjMove_GetX(obj);
let sy=ObjMove_GetY(obj);
if (((sx<=0)||(sy<=0)||(sx>=GetStgFrameWidth())||(sy>=GetStgFrameHeight()))&&(n==1)) {
n=0;
ObjMove_SetAngle(obj,GetAngleToPlayer(obj));
ObjMove_SetSpeed(obj,3);
ObjShot_SetGraphic(obj,DS_KNIFE_KOUMA_RED);
}
yield;
}
}
......I said nothing.