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

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #660 on: February 06, 2014, 09:33:45 AM »
So do you have any recommendations (links) since I can't select anything for The Last Comer in "Stages" or in "Directory"  on Danmakufu? (Yes, I'm using AppLocal like usual)
What did you download anyway? I downloaded the http://www1.axfc.net/uploader/so/3013625?key=mrkn (1.00a) it is a 200+ mb download. I have extracted this into my script folder and it functioned.

This is what you should see (3 options for the game). Then you can apply the patch updates I think.

SilentYukiro

  • Silent Soul of the Electronic Skies
  • Clearly a Satori lover :3
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #661 on: February 06, 2014, 11:25:31 AM »
Don't see the reason for the dummy scripts. You can write the collision code inside the effect object while(!Be_Deleted) { } and be done with it in my opinion. And why 2 dummy scripts? The suns have 2 effect objects in ZUN's example because the "brighter" part is the actual hitbox, so you can graze them a little. (Bit comparable to the bullet bubbles).

Well, at the moment that was my plan, now I feel like an idiot for that idea xDDD. Sorry about that.

Using SetCollisionB()

Well that worked perfectly, thanks!
At first I thought SetCollisionA and SetCollisionB will only work for enemy scripts, guess I was wrong. Thanks for the solution :)
"UNYUUU?"

Music is the essence of my soul.
Planned Fan-game: Touhou: Mad Tengu ~ Hellic Memories

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #662 on: February 06, 2014, 02:53:20 PM »
There is a reason why you define x and y for SetCollisionB :V So if you can define it for a boss, you can also define it for objects.

The more you know, right?  :D

Monkeypro257

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #663 on: February 07, 2014, 03:56:18 AM »
Thanks I can play it now. :) (Weird. I downloaded from the same website, but those options weren't there before . . .)

EDIT: Every time the boss casts a spellcard, my computer drivers crash(then tries to recover sometimes) and my computer shutsdown. I know this isn't suppose to happen.
« Last Edit: February 07, 2014, 04:23:48 AM by Hard-To-Destroy-Reptile »

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #664 on: February 07, 2014, 09:43:59 AM »
Time to check your drivers for your GPU.

Monkeypro257

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #665 on: February 07, 2014, 10:52:28 PM »
Time to check your drivers for your GPU.

I checked my drivers and their up-to-date. I first just encountered this by playing the Last Comer, but nothing else.

SilentYukiro

  • Silent Soul of the Electronic Skies
  • Clearly a Satori lover :3
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #666 on: February 10, 2014, 06:12:11 AM »
There is a reason why you define x and y for SetCollisionB :V So if you can define it for a boss, you can also define it for objects.

The more you know, right?  :D

Thanks to this Hele-san xDD




Now, back to the task at hand. I'm now doing a second trial on the Nuclear Fireballs.....USING THEM AS GRAPHICS FOR A BULLET PATTERN.

Here's the code.

And here is the spellcard script. Yes, I also implemented the 1st trial of the fireballs here.

Now, I want to use the effect objects as graphics for the fire task in the spell script. But, somehow Danmakufu crashes instantly when it's about the run the fire task. No errors being pointed out, it just immediately crashes. I even tried on just spawning the effect object first, but it also crashes (even without using the fire task and changing the task into a normal one, instead of having parameters next to the task name) .

Can anyone help me on this one? :ohdear:
« Last Edit: February 10, 2014, 06:24:29 AM by SilentYukiro »
"UNYUUU?"

Music is the essence of my soul.
Planned Fan-game: Touhou: Mad Tengu ~ Hellic Memories

KuroArashi100

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #667 on: February 10, 2014, 06:28:16 AM »
It seems you forgot to yield; the firing task. while loops will keep looping until the statement between brackets becomes false, which in this case never happens.
Danmakufu tries to loop it an infinite amount of times, and will crash as a result.

SilentYukiro

  • Silent Soul of the Electronic Skies
  • Clearly a Satori lover :3
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #668 on: February 10, 2014, 06:54:29 AM »
forgot to yield; the firing task

Yeah, after reading the code for about multiple times, I totally forgot the:

Code: [Select]
yield;
frame++;
spin+=2;

I think I'm having my 'senior moments' now xDDD

Now that one problem is done, all I need to know now is how to implement the effect objects into a bullet pattern (example for this one is one of Utsuho's  spellcards where the effect objects are in a ring pattern).

Any idea how to do this?

EDIT1:
I let the whole script to end by itself (letting the time to count down to 0), somehow the pattern executes after the boss dies. I mean literally...when the boss died, the pattern executed itself. Weird, is that some glitch or just bad coding one the script that I don't seem to know? ???
« Last Edit: February 10, 2014, 10:34:49 AM by SilentYukiro »
"UNYUUU?"

Music is the essence of my soul.
Planned Fan-game: Touhou: Mad Tengu ~ Hellic Memories

TheTeff007

  • Best Touhou 2015!
  • So much cuteness...!
    • Youtube Channel
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #669 on: February 13, 2014, 12:03:46 AM »
So this piece of code works perfectly, but there is a aesthetic change I want to add, and that is the TBOrb object to rotate, which I cannot accomplish. Can someone help me with it?

http://pastebin.com/vCqYMhQt
Small Teaser of my upcoming project~

No need to call me Teff007. Teff will do just as well~

Drake

  • *
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #670 on: February 13, 2014, 12:51:59 AM »
You can't just use ObjEffect_SetAngle()?

I would also like to ask what you're doing with your XY vertex mappings. You're doing scaling on one and some odd trig on the other, and scaling at least is totally unnecessary to do there and just overcomplicates things. There is ObjEffect_SetScale() for a reason.

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

TheTeff007

  • Best Touhou 2015!
  • So much cuteness...!
    • Youtube Channel
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #671 on: February 13, 2014, 01:35:48 AM »
I was given the code, so I am not entirely sure of how it works.  And I have tried with SetAngle and it works. I am quite rusty with my danmakufu knowledge...
Small Teaser of my upcoming project~

No need to call me Teff007. Teff will do just as well~

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #672 on: February 16, 2014, 08:34:00 PM »
=_=...

I'm trying to run danmakufu on windows 8 and it crashes. I tried running it with applocale, but it still crashes. Why does it keep crashing, even with applocale? What am I doing wrong? Please help! Thanks...

 :ohdear:

Sage Ω (Ultima)

  • CEO at Team Eternal Desire
  • ??? X
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #673 on: February 16, 2014, 11:16:25 PM »
you need compatibility mode for 12m to work on Win8. The japanese scripts won't work without applocale iirc, so make sure your scripts don't have any japanese text in them to prevent crashing.

Gusano Wornis

  • Member of Team Mystique
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #674 on: February 17, 2014, 06:29:44 PM »
open config.exe, go to "option" , and change the option where it says #Player (various symbols or ????)
and that should be the solution, i can play japanese scripts fine on win8 :P
carrying dead weight since 2015~

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #675 on: February 24, 2014, 09:49:28 PM »
Excellent tutorial, I am learning a lot!!! But I have a problem with the last tutorial (the "Player Script with Bomb" Tutorial).
I did it as similar as you did on the video, but when I press the BOMB-BUTTON, Marisa doesn't do anything and instead I lose a Bomb Counter
Here is my script, I CAN?T SEE THE ERROR!!! can you help me pleases???

http://pastebin.com/j9eqvQMS

...Please save me.

Hello and welcome Facundo, next time please post in the correct thread your questions and use pastebin when your code is too large to show. Thanks =) -Hele
« Last Edit: February 25, 2014, 06:51:40 AM by Helepolis »

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #676 on: February 25, 2014, 02:49:41 PM »
Excellent tutorial, I am learning a lot!!! But I have a problem with the last tutorial (the "Player Script with Bomb" Tutorial).
I did it as similar as you did on the video, but when I press the BOMB-BUTTON, Marisa doesn't do anything and instead I lose a Bomb Counter
Here is my script, I CAN?T SEE THE ERROR!!! can you help me pleases???

What you are saying here is not helpful. If the invincibility circle loading? Are you invincible? Did you check all of your brackets? Are there any errors? Are your file paths correct?  Is the cut in text showing?

I tested it and yes, it's not working. In a case like this, calm down and think, step by step, what the program is doing when you hit the bomb button. It calls @Spellcard, then...

Whoops! There's your error!

You need   @SpellCard {

Note the Capital C. Problem solved.

(You have bugs in the spell code, btw.)

K+ ~ Bake-Danuki

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #677 on: March 05, 2014, 01:03:34 AM »
Hey!  Haven't been on here in a while and I have a question about objects (namely effects), is there anyway to check if an object has collided with the boss or an enemy?

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #678 on: March 05, 2014, 03:37:23 AM »
Hey!  Haven't been on here in a while and I have a question about objects (namely effects), is there anyway to check if an object has collided with the boss or an enemy?

I assume that Collision_Line_Circle and Collision_Obj_Obj will not work well for you, the former being unusable in your case (most likely) and the latter being a royal pain.

The latter involves EnumEnemyBegin, EnumEnemyEnd, EnumEnemyGetID and GetEnemyInfo. It's definitely possible, but it would cause an unnecessarily painful time trying to implement (in ph3, this is MUCH easier to do).

Unfortunately, I don't have a solution. You can check the list of helpful functions here on MotK if that helps.

Drake

  • *
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #679 on: March 05, 2014, 06:44:47 AM »
What are you trying to accomplish with this in the first place? If we could have some context on why you want to check this, there might be a better way to accomplish it.

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 #680 on: March 07, 2014, 02:21:31 AM »
I assume that Collision_Line_Circle and Collision_Obj_Obj will not work well for you, the former being unusable in your case (most likely) and the latter being a royal pain.

The latter involves EnumEnemyBegin, EnumEnemyEnd, EnumEnemyGetID and GetEnemyInfo. It's definitely possible, but it would cause an unnecessarily painful time trying to implement (in ph3, this is MUCH easier to do).

Unfortunately, I don't have a solution. You can check the list of helpful functions here on MotK if that helps.
Thanks for the help :D

What are you trying to accomplish with this in the first place? If we could have some context on why you want to check this, there might be a better way to accomplish it.

I'm messing with a Reimu A player replica from UFO, i made it so the shots spin (new gimmicks!) but they delete and cause this shoteffect:
http://pastebin.com/m4VJ2SN3
I want it to show the shot effect when it hits an enemy, instead of being deleted.  (if it's possible)

Drake

  • *
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #681 on: March 07, 2014, 04:06:23 AM »
Is it supposed to do anything after hitting the enemy? Normally this is already how the flow goes. Fire shot, hits things, deals damage and gets deleted (by engine), ends the !Deleted loop, then triggers some effect or whatever. So unless you don't want the shot to stop, I'm not sure what you're trying to do.

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

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #682 on: March 07, 2014, 02:36:56 PM »
Solution (from gtbot's code):

When it hits an enemy (while(!Obj_BeDeleted(objShot))), run a task that creates the effect graphic at the location of the short object.

Basically, that's all you need to do. I have code for use in ph3, but it shouldn't be too hard to do in 0.12m if you're comfortable with Effect Objects and tasking.

K+ ~ Bake-Danuki

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #683 on: March 08, 2014, 02:55:28 AM »
Solution (from gtbot's code):

When it hits an enemy (while(!Obj_BeDeleted(objShot))), run a task that creates the effect graphic at the location of the short object.

Basically, that's all you need to do. I have code for use in ph3, but it shouldn't be too hard to do in 0.12m if you're comfortable with Effect Objects and tasking.

Awesome!  Thanks ^-^

SilentYukiro

  • Silent Soul of the Electronic Skies
  • Clearly a Satori lover :3
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #684 on: March 10, 2014, 10:59:19 AM »
This maybe seems kind of newbie-ish to ask or whatnot but, what are the basic fundamental needs in making or creating 3D Stage Backgrounds?

I kind of need to rush it, since my game's deadline is getting near....still, a lot of things to be done. And this might be one of the aspects that might take most of my remaining time. So, can anyone shed a light on this simple question? :ohdear:
"UNYUUU?"

Music is the essence of my soul.
Planned Fan-game: Touhou: Mad Tengu ~ Hellic Memories

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #685 on: March 10, 2014, 12:52:53 PM »
This maybe seems kind of newbie-ish to ask or whatnot but, what are the basic fundamental needs in making or creating 3D Stage Backgrounds?

I kind of need to rush it, since my game's deadline is getting near....still, a lot of things to be done. And this might be one of the aspects that might take most of my remaining time. So, can anyone shed a light on this simple question? :ohdear:
Since you said you need to rush it, you need to minimum understand the following fundamentals.

- Understanding the @BackGround Loop (as all the code from the stage is put here).
- Understanding how 3D space works in danmakufu and how to interpret.
- Decide which dimensions you want to use for the axis (x = horizontal, y = vertical, z = depth by default, but some people prefer to swap y and z).
- Understanding how you can summon sprites in 3D space http://dmf.shrinemaiden.org/wiki/Stage_Script_Functions_%280.12m%29#Drawing_Functions
- Understanding how to scroll the stage (texture scrolling / sprite moving)
- Understanding how fog is set up to "blur" the "end of the stage"
- Understanding the Zbuffer

Basically, 3D sprites are defined the same as 2D ones for spell cards. You load the texture, define the scale, rect, drawtype, colour, etc), but instead of using DrawGraphic on the x,y you use  DrawGraphic3D on the three parameters (x,y,z). Your texture is automatically placed in 3D space (rectangle). You then build up your stage like lego.

What are you even trying to make? Is it a simple stage with just a floor and 2d sprite trees/bamboo or is it an indoor location?

K+ ~ Bake-Danuki

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #686 on: March 10, 2014, 11:02:13 PM »
Hey!  I was wondering if there is a function (or if someone could write one  :blush: ) for deleting shots in a rectangle with the defined top bottom left and right.
(I'm editing Blargel's StB Aya player to work in normal scripts)
-Thanks ahead of time

Drake

  • *
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #687 on: March 11, 2014, 12:44:39 AM »
Not in a normal way. You'd have to do some crappy hack where you use DeleteShotInCircle() by fractally filling the rectangle with circles or something, since you can't just enumerate or access the bullet objects.

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 #688 on: March 11, 2014, 01:24:40 AM »
Not in a normal way. You'd have to do some crappy hack where you use DeleteShotInCircle() by fractally filling the rectangle with circles or something, since you can't just enumerate or access the bullet objects.
Wait... I could have it start and the left top and have it place a circle with radius of 1 at each point until it hits bottom right...
like...
Code: [Select]
int x = left;
int y = top;
while (x<=right){
x++;
DeleteEnemyShotInCircle(x,*ZZZ*,1);
}
but i dont know what to put for ZZZ since it should be the Y point... or should i just have it run a loop in there to wait for it to go all the way down the Y and then move to the right?

Drake

  • *
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #689 on: March 11, 2014, 02:11:23 AM »
You could do that, but it would be incredibly inefficient. Computers aren't magic.



See how only a few circles gets rid of most of the area? If the aspect ratio (width versus height) of your camera rectangle isn't ever going to change you could really just hardcode the circles used. (Rather than calculate what the "best" fill is)

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