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

Lunarethic

  • Local Trashy Edgelord
  • *
  • I can cut people with all this edge
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #420 on: October 25, 2013, 11:42:47 AM »
Quote
Because what this does is start all tasks and just loop them forever during the spell card. There is no control and this isn't what you want. What we want is one loop that controls everything while the rest being single time functions/tasks called inside this loop. That is why I had suggested you to call fire inside the movement task, but you didn't do this. So I am showing it to you again.

is this what you meant i should do?

http://pastebin.com/eB8smJMn

its not perfect but it works and the spell works how i wanted it to be  :D

but i need one last help to make it look more like at touhou spell card,
you see that barrage task? what that is doing is firing circular bullets with no acceleration on a straight line
how do you make that shoot RANDOM bullets with random color assignments?
like Shizuha Aki's "Falling Leaves of Madness" Spell card from touhou 10

EDIT :
can anyone help me because
after creating a spell card i want to connect it to a non spell card attack but i dont know how i am gonna do that? o.O

I put your code in pastebin =) otherwise it is too large. --Hele
« Last Edit: October 25, 2013, 02:55:46 PM by Helepolis »
いつもニコニコあなたの隣に這いよる!生放送!は好き。月です~す。略してニコニャル
Learned how to use a custom shotsheet : 12/28/13 *clapclapclap*
東方謎佚光 ~ Dimensional Light Abscence Work In Progress Touhou Fangame

KuroArashi100

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #421 on: October 25, 2013, 02:03:00 PM »
I think there are two ways to change the bullet color:
1. Use a custom shotsheet and use rand_int() to make Danmakufu randomly choose an bullet ID between the bounds you specified.

2. Also usable with the default Danmakufu bullets (I think). Make an array of all the bullets you want to use and randomly choose one with rand_int.
If you want different bullets, just include them in the array.
Something like:
Code: [Select]
task barrage{
let x = 0;
                let dir = 0;
                let color = [RED31,BLUE31,YELLOW31];
                wait(1);
loop(5){
                        PlaySE(sfx2);
                        while(x<36){
                                CreateShotA(1,GetEnemyX,GetEnemyY,1);
                                SetShotDataA(1,0,1,dir,0,-0.5,8,color[rand_int(0,2)]); //Arrays start at 0.
                                FireShot(1);
                               
                                dir+=360/36;
                                x++;
                        }
                        x = 0;
                        dir = 0;
                        wait(5);
yield;

}
}

Shooting bullets in random directions is simple, just set the angle to rand(something,something).

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #422 on: October 25, 2013, 05:37:24 PM »
but i need one last help to make it look more like at touhou spell card,
you see that barrage task? what that is doing is firing circular bullets with no acceleration on a straight line
how do you make that shoot RANDOM bullets with random color assignments?
like Shizuha Aki's "Falling Leaves of Madness" Spell card from touhou 10

EDIT :
can anyone help me because
after creating a spell card i want to connect it to a non spell card attack but i dont know how i am gonna do that? o.O

Random bullet colors: depends on if you use a shotsheet or default bullets
Spell-nonspell:

Read the tutorials. Please. It's located in the sticky for RaNGE. If you do not know about Plural scripts, I highly suggest that you read the tutorials. There are many of them, so if one does not answer your questions, another may.

The answer to many of your questions may lie in some of the tutorials. You can also ask via IRC.

K+ ~ Bake-Danuki

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #423 on: October 30, 2013, 10:48:35 PM »
Can stages call other stages? (Recursion of sorts?)
Can stages use arrays for other stages?

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #424 on: October 31, 2013, 06:47:08 AM »
Can stages call other stages? (Recursion of sorts?)
Can stages use arrays for other stages?
I have no idea what you mean with "call", however you can only have one stage file. There is no stage loading function similar to loading external files for enemy scripts, so that is a no. If you mean swapping stages: you need to call functions/tasks that shape that particular stage.

The second question leaves me confused.

Would be useful if you would also tell us what you are exactly trying to achieve.
« Last Edit: October 31, 2013, 06:49:43 AM by Helepolis »

K+ ~ Bake-Danuki

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #425 on: October 31, 2013, 08:41:24 PM »
forget the second question, that doesn't make sense.
by "call" i mean run other stage scripts
but I figured out how to do this using clears and stage tasks
Another Question: How do you set separate backgrounds for Spells?
When I use @BG in a single script and run the stage, it doesn't change.

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #426 on: October 31, 2013, 09:19:27 PM »
That is odd, because only @Background thread in non-spell cards are ignored and overruled by @Background thread in the stage script. If you want backgrounds for non-spell cards, you need to do like ZUN: Create the proper background within the stage script.

Spell card @Background should not be ignored. That is if it is a spell card.

« Last Edit: October 31, 2013, 09:37:54 PM by Helepolis »

K+ ~ Bake-Danuki

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #427 on: October 31, 2013, 10:27:18 PM »
This is my BG code and Initialize for reference.
I may have forgotten something...
Code: [Select]
@Initialize{
LoadGraphic(imgBoss);
LoadGraphic(cutin);
LoadGraphic(BG);
SetLife(5000);
SetTimer(120);
CutIn(YOUMU,"Lel Sign 'Murica Circles'",cutin,0,0,250,400);
MagicCircle(false);
SetMovePosition02(GetCenterX, GetCenterY - 100, 120);
}
//mainloop and stuff
@BackGround{
Y3++;
Y2--;
SetTexture(BG);
SetAlpha(128);
SetGraphicRect(0,0,100*512,100*512);
DrawGraphic(0,Y3);
SetTexture(BG);
SetAlpha(128);
SetGraphicRect(0,0,100*512,100*512);
DrawGraphic(0,Y2);
}

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #428 on: October 31, 2013, 10:47:07 PM »
SetScore(); .  :V

K+ ~ Bake-Danuki

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #429 on: October 31, 2013, 11:01:10 PM »
Now I just feel stupid  :V
Thank you!   ;)

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #430 on: October 31, 2013, 11:05:31 PM »
A classic mistake a lot of us make/made.  :3

K+ ~ Bake-Danuki

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #431 on: November 01, 2013, 02:29:30 AM »
I already have another question: is there a way to tell the engine not to delete/explode the boss after the timer goes to 0 or it's defeated
I really want the bosses to do what they do in the real games (take Sekibanki's midboss exit for example) -- stall for a second with no hitbox and then fly away

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #432 on: November 01, 2013, 02:33:01 AM »
I already have another question: is there a way to tell the engine not to delete/explode the boss after the timer goes to 0 or it's defeated
I really want the bosses to do what they do in the real games (take Sekibanki's midboss exit for example) -- stall for a second with no hitbox and then fly away

I did this the really stupid way and added a separate file with 1 HP and a DamageRate of (0,0). In this file, I basically made the boss go offscreen before using VanishEnemy, which does NOT have the explosion effect.

To do it without the roundabout method, you'd need to check HP and then VanishEnemy, I think. I'm not completely sure about its practicality (don't use my method above because it's a really stupid 0.12m workaround), so you will probably want input from others.

K+ ~ Bake-Danuki

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #433 on: November 01, 2013, 02:51:46 AM »
I was considering having it check for 1HP and then spawn an enemy while vanishing the boss

Drake

  • *
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #434 on: November 01, 2013, 03:01:43 AM »
K: That doesn't work; the enemy will be considered a familiar and will be deleted on @Finalize.

I've concluded that the best method in 0.12 is just to have a dummy attack after the last pattern for everything to finish. However, if you intend to use this in a stage where the stage continues during that period, you have to tell it to wait for a different flag to continue, and not wait while IsBossExisting(), since obviously the boss will still exist.

The other usual methods are (in brief, because each requires several additional workarounds)
- checking if HP is under a threshold, then running your stuff in the boss script within the final pattern and calling VanishEnemy() at the end
- setting boss coordinates in commondata and passing it (in some way) to a stage function to do things with
Both of these are terrible ugly messy buggy kludgy garbage piles that I have personally implemented and seriously used as solutions before. Don't be me.

Sparen: Why damage rate and not just y'know not setting a hitbox.

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 #435 on: November 01, 2013, 03:08:55 AM »
Couldn't I have it WaitForZeroEnemy; and then spawn it at GetEnemyX & GetEnemy Y?

Drake

  • *
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #436 on: November 01, 2013, 04:02:12 AM »
If you wait for no enemies then GetEnemyX/Y has nothing to look at. It defaults to 224 and 240 i.e. center screen.

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 #437 on: November 01, 2013, 10:25:25 PM »
Sparen: Why damage rate and not just y'know not setting a hitbox.

...That's a better solution. I just can't remember which hitbox function is which. XD. Hooray for ph3.

K+ ~ Bake-Danuki

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #438 on: November 02, 2013, 12:57:34 AM »
If you wait for no enemies then GetEnemyX/Y has nothing to look at. It defaults to 224 and 240 i.e. center screen.
That's pretty much where my boss is...

Drake

  • *
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #439 on: November 02, 2013, 02:01:15 AM »
If you figured that was a good enough "solution" then you might as well just write a function that draws the enemy graphic the same way at the same place every time without even bothering with knowing the enemy location at all. Sure it may "work", but it's a hacky kludge solution that can't be expanded or changed whatsoever; particularly bad even if you were to just move the boss around a bit during the pattern.

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 #440 on: November 02, 2013, 03:01:57 AM »
The pattern is designed to not move the boss or else it would make it impossible

Drake

  • *
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #441 on: November 02, 2013, 03:54:21 AM »
holy crap just do it if you want, i'm just saying it isn't a very good solution

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 #442 on: November 03, 2013, 08:46:50 AM »
I'm confused, I made the whole document and did everything it says to, but no bullets'll show up, my little sprite just can move around but can't shoot or be hit...

(@Readers: Regarding the Player scripting tutorial. @Author: I moved your post to the proper thread -Helepolis)
« Last Edit: November 03, 2013, 05:52:39 PM by Helepolis »

K+ ~ Bake-Danuki

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #443 on: November 05, 2013, 10:09:19 PM »
Hey is there a way to spawn a second player?   ???

If there is, my Phantasmagoria engine is almost complete!   :)

PhantomSong

  • The Ghost Living through Everyday Life.
  • Eh, it doesn't matter.
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #444 on: November 05, 2013, 11:36:55 PM »
Hey is there a way to spawn a second player?   ???

If there is, my Phantasmagoria engine is almost complete!   :)
If it's almost complete and you ask for a vital thing... never mind... this should of been asked a lot earlier.

I believe you can't do it on .12m, nor PH3, sorry.

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #445 on: November 05, 2013, 11:54:40 PM »
If it's almost complete and you ask for a vital thing... never mind... this should of been asked a lot earlier.

I believe you can't do it on .12m, nor PH3, sorry.

I believe that Blargel made an auto-dodging player. Is that the kind of thing you are referring to, K+?

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #446 on: November 06, 2013, 10:02:46 PM »
I believe that Blargel made an auto-dodging player. Is that the kind of thing you are referring to, K+?
I think what he means is if he can make another player appear on the screen, like in PoDD and PoFV. I don't think that's possible. I've seen Trick or Treat Night Extra stage have some sort of second "player", but I think that's different.

K+ ~ Bake-Danuki

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #447 on: November 07, 2013, 02:57:25 AM »
Actually I just came up with a great idea... couldn't I use Objects to create a second player?  (Forget shooting from that player for now/dodging)
I could have it check and reset the player if it comes in contact with bullets!
Unfortunately that means everything must be done in Obj. shots but it could work.

Sage Ω (Ultima)

  • CEO at Team Eternal Desire
  • ??? X
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #448 on: November 07, 2013, 03:27:54 AM »
Sorry to tell you this, but a Phantasmagoria game in 0.12m isn't possible. If anything you should've tried your luck with ph3.

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #449 on: November 07, 2013, 07:50:34 AM »
but it could work.
No it would not.

- 0.12m has no netplay.
- 0.12m has no other keyboard input listening functionality.

These two are most essential for PoFV / PoDD type game.