Author Topic: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)  (Read 140424 times)

Yukari-Chan

  • Excuse me while I prepare /your/ demise. <3 TSO
Re: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #660 on: December 02, 2011, 12:38:16 PM »
Plenty of people use 0.12m. Anyway, if you want to modify Ex-Rumia, go ahead. If you're just making another Rumia, then great. I hope you add sounds.

You should totally make a script/mod topic, and post all of your stuff there so it's easier for people to find  :derp:.
I have one... I have finished translating PR (well almost). I have just begun my complete game Project and I Just want to replace EXrumia for peoples enjoyment to clearer and those shitty bullets. When I'm done, want a link?
" Borders are Borders. They were meant to be manipulated and mistreated. "

Re: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #661 on: December 02, 2011, 12:45:08 PM »
Ah! It doesnt fire because of double SetShotDataA before Fireshot. I've encountered the same mistake.

Multiple SetShotDataA is allowed, so that has nothing to do with it.

Also i've got a question: I wanna make a spellcard for my player character wich is based on it's regular shot. Is there a way to make same task avaliable for both player and spell scripts?

You could just copy to the task and place it in another script.

MMX

  • In Soviet Gensokyo...
  • ...bullets dodge you.
    • LiveJournal blog
Re: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #662 on: December 02, 2011, 01:26:59 PM »
You could just copy to the task and place it in another script.
Thanx Captain! I am about to do this but the task is huge and complicated enough to just a copy it into a spell script. So i wonder if i can.. call it from a library or something? But looks like i found another solution: modify this task so it can process OnBomb flag to change the fire behaviour.
My danmakufu thread Most recent - "Kappa Mechanics" (Nitori fight)   My youtube channel Latest update - EoSD extra no bombs clear


Re: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #663 on: December 02, 2011, 09:07:06 PM »
How do you separate the bullets. For example, making a set of bullets do one task and making a different set of bullets do a different task at different times. Can some one explain to me? Thnx :)

MMX

  • In Soviet Gensokyo...
  • ...bullets dodge you.
    • LiveJournal blog
Re: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #664 on: December 03, 2011, 09:27:46 AM »
How do you separate the bullets. For example, making a set of bullets do one task and making a different set of bullets do a different task at different times. Can some one explain to me? Thnx :)
The best way to program complex bullet patterns is to use object bullets. Read this tutorial and watch this one to learns how it works.
You also may need to learn about tasking in danmakufu from this mustread tutorial.
Good luck ;)
My danmakufu thread Most recent - "Kappa Mechanics" (Nitori fight)   My youtube channel Latest update - EoSD extra no bombs clear


Yukari-Chan

  • Excuse me while I prepare /your/ demise. <3 TSO
Re: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #665 on: December 03, 2011, 10:37:26 PM »
How to do curvy lasers? I'm interested on doing a survival card with curvy lasers.
" Borders are Borders. They were meant to be manipulated and mistreated. "

Chronojet ⚙ Dragon

  • The Oddity
  • 今コソ輝ケ、我ガ未来、ソノ可能性!!
Re: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #666 on: December 03, 2011, 11:21:21 PM »
a survival card with curvy lasers.
why would you do that that's stupid

I'll just paste the code from my own scripts, just a sec.



Basically, it's like CreateShotA, but the bullet trails behind a bit.

Code: [Select]
CreateLaserC(0, GetX, GetY, 10, 150/4, BLUE02, 20);
SetLaserDataC(0, 0, 4, GetAngleToPlayer, 1, 0, 0);
SetLaserDataC(0, 75, NULL, NULL, 0, 0, 0);
FireShot(0);
This makes a curvy laser, width 10, length ~38.5. It aims at the player but moves to the left a bit slightly.
« Last Edit: December 03, 2011, 11:23:40 PM by alt-kyuu-kyuu »

Yukari-Chan

  • Excuse me while I prepare /your/ demise. <3 TSO
Re: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #667 on: December 03, 2011, 11:36:33 PM »
Yay! Now Tenshi will troll reimu with Curvy Lasers! Thanks!

What did I do wrong? It keeps saying ImgBoss is an undefined number and I declared it to it's rightful destination path.

http://pastebin.com/RLmP0eqb

I suck at CreateShot01. I'm more of a CreateShotA person ( Well, I've been using CreateShotA for months so.) I suck at simple non spells.  Why am I so used to making hard ones?
 
« Last Edit: December 04, 2011, 07:27:45 AM by Helepolis »
" Borders are Borders. They were meant to be manipulated and mistreated. "

Schezo

  • en-counse
Re: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #668 on: December 04, 2011, 01:54:20 AM »
Ok.  A few things.
-Use Pastebin for large stripes of code when asking questions please.
-You don't have a frame variable declared.
-You're missing a bracket in your @MainLoop
-You don't have anything counting frame so it won't fire any bullets.  It looks like you are trying to fire that spread once every 60 frames so use something like frame ++;

Your missing bracket is probably what's giving you that error since your drawing seems ok.  Make sure to check and double check these.

Yukari-Chan

  • Excuse me while I prepare /your/ demise. <3 TSO
Re: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #669 on: December 04, 2011, 01:57:01 AM »
Oh, I see. Fixed it now. But ImgBoss is not read. What in damn hell did I do wrong?
« Last Edit: December 04, 2011, 01:59:51 AM by PROJECT_MOKOU »
" Borders are Borders. They were meant to be manipulated and mistreated. "

Kumori

  • BLAAAAAH.
Re: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #670 on: December 04, 2011, 01:52:19 PM »
I fail to understand the concept of 'familiars'. Could someone describe in language simple enough for a child to understand, what a familiar is, how to make one, and how to put one in your stage script?

Thanks to anyone who can help, btw. :)
I cannot think of a good signature, and probably never will.

Yukari-Chan

  • Excuse me while I prepare /your/ demise. <3 TSO
Re: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #671 on: December 04, 2011, 02:07:56 PM »
Familiars are like the one in IN. CtC uses them too. To make a familiar just do it within your script. ( For E.X. Yuyuko's Perfect Fan. And the Bunnies in Stage 5 IN that shoots out red balls. ) That or it's something having to do with for another example, Alice's doll. Atleast thats what my study proves.
" Borders are Borders. They were meant to be manipulated and mistreated. "

Kumori

  • BLAAAAAH.
Re: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #672 on: December 04, 2011, 02:46:23 PM »
Maybe familiar was the wrong word to use; I mean enemies. I'm not used to danmakufu, so I get mixed up at times.  :blush:
I cannot think of a good signature, and probably never will.

MMX

  • In Soviet Gensokyo...
  • ...bullets dodge you.
    • LiveJournal blog
Re: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #673 on: December 04, 2011, 06:33:36 PM »
Maybe familiar was the wrong word to use; I mean enemies. I'm not used to danmakufu, so I get mixed up at times.  :blush:
Y U NO READ FAQ AND TUTORIALS? ლ(ಠ益ಠლ) http://www.shrinemaiden.org/forum/index.php/topic,865.0.html
My danmakufu thread Most recent - "Kappa Mechanics" (Nitori fight)   My youtube channel Latest update - EoSD extra no bombs clear


Kumori

  • BLAAAAAH.
Re: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #674 on: December 04, 2011, 07:23:59 PM »
This is where I need to clarify I know how to find & read tutorials, but what escapes me is understanding that part of the tutorial. I make my familiar, and when I try to stick it in, I get an error. I've since deleted all my familiar scripts, because there was no point trying when all I got was constant failure.

Let me simplify: I do not understand the section about familiars in that tutorial.
I cannot think of a good signature, and probably never will.

Azure Lazuline

  • Looooove!!
  • PM me for free huggles and love!
    • Entanma Project - indie game development
Re: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #675 on: December 04, 2011, 07:45:50 PM »
You'll need to be more specific. What exactly are you trying to do? What error do you get? What code is causing the error?

Yukari-Chan

  • Excuse me while I prepare /your/ demise. <3 TSO
Re: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #676 on: December 04, 2011, 08:53:25 PM »
You can  look at examples from the Default ExRumia Script. Or just simply search "Familiar" in the old danmakufu wiki ( Considering if it's there ).
" Borders are Borders. They were meant to be manipulated and mistreated. "

Drake

  • *
Re: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #677 on: December 04, 2011, 09:30:28 PM »
Code: [Select]
// path/enemy.txt
script_enemy{
@Initialize{}
@MainLoop{}
@DrawLoop{}
@Finalize{}
}

// stage.txt
#headers if needed
script_stage_main{
@Initialize{}
@MainLoop{
//at some point
CreateEnemyFromFile("path/enemy.txt", x, y, s, a, 0);
}
@BackGround{}
@Finalize{}
}
That's basically all enemies are. If you're getting errors and it isn't immediately obvious, then something is going wrong elsewhere. If you want help, please pastebin some sample code.

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

TraceTheKriken

Re: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #678 on: December 09, 2011, 08:31:04 PM »
I'm making a spell card and I have few issues:
1. How to make boss sprite to rotate when the boss moves left or right (Chen and Ran are good examples about what kind of rotation I'm talking about)
2. How to make BG appear properly (It appears sometimes depending on script, I usually copy the part to @Background from script where the bg works and change neccesary things)
3. How to make BGM play properly (same thing as with BG, music plays sometimes depending on script)

Drake

  • *
Re: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #679 on: December 09, 2011, 09:24:14 PM »
1. How to make boss sprite to rotate when the boss moves left or right (Chen and Ran are good examples about what kind of rotation I'm talking about)
//in enemy sprite drawing, where spriteangle and spin are predefined
if( GetSpeedX != 0){ spin = GetSpeedX; }  //GetSpeedX returns 1 if enemy is moving right and -1 is enemy is moving left
if( spriteangle != 0 ){  //needed so when the enemy stops it keeps spinning until upright
    spriteangle += spin;
}
SetGraphicAngle(spriteangle);


2. How to make BG appear properly (It appears sometimes depending on script, I usually copy the part to @Background from script where the bg works and change neccesary things)
3D drawing in @BackGround is only used in stage scripts. You use @DrawLoop in enemy scripts for script-pertinent graphics, and @BackGround for spell card backgrounds. @BackGround does not work during non-cards, which are defined by the use or non-use of SetScore().

3. How to make BGM play properly (same thing as with BG, music plays sometimes depending on script)
That sounds more like you're doing something incredibly wrong. How do you try to make BGM play?

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

MMX

  • In Soviet Gensokyo...
  • ...bullets dodge you.
    • LiveJournal blog
Re: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #680 on: December 09, 2011, 10:28:24 PM »
SetGraphicAngle(spriteangle);[/tt]

SetGraphicAngle(0,0,spriteangle); i think.
My danmakufu thread Most recent - "Kappa Mechanics" (Nitori fight)   My youtube channel Latest update - EoSD extra no bombs clear


TraceTheKriken

Re: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #681 on: December 10, 2011, 08:25:22 AM »
3D drawing in @BackGround is only used in stage scripts. You use @DrawLoop in enemy scripts for script-pertinent graphics, and @BackGround for spell card backgrounds. @BackGround does not work during non-cards, which are defined by the use or non-use of SetScore().

I know that already but for some reason it doesn't appear. Here is what I wrote in @Background

Code: [Select]
@Background {
SetTexture(bg);
SetRenderState(ALPHA);
SetAlpha(255);
SetGraphicRect(0, 0, 255, 255);
SetGraphicScale(2, 2);
SetGraphicAngle(0, 0, 0);
DrawGraphic(GetCenterX, GetCenterY);
}

Because I'm lazy I copied that part from another script where the bg appeared. I didn't need to change anything else exept for GraphicRect, because I always use same names for these "let <name> = <some stuff>" things, file names and always create same directories inside my script directory

That sounds more like you're doing something incredibly wrong. How do you try to make BGM play?

This is how it was instructed in a tutorial

Code: [Select]
#TouhouDanmakufu
#Title[title]
#Text[text]
#Player[FREE]
#ScriptVersion[2]
#BGM[.\bgm\bgmBoss.mp3"]

script_enemy_main {
Some stuff
}

EDIT:

//in enemy sprite drawing, where spriteangle and spin are predefined
if( GetSpeedX != 0){ spin = GetSpeedX; }  //GetSpeedX returns 1 if enemy is moving right and -1 is enemy is moving left
if( spriteangle != 0 ){  //needed so when the enemy stops it keeps spinning until upright
    spriteangle += spin;
}
SetGraphicAngle(spriteangle);

Danmakufu gave an error about the word spin
« Last Edit: December 10, 2011, 08:32:33 AM by TraceTheKriken »

Drake

  • *
Re: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #682 on: December 10, 2011, 09:08:22 AM »
@Background
@BackGround. Capital G.

#BGM[.\bgm\bgmBoss.mp3"]
Well I'm not sure why the random quotation marks are there (everything in the headers are read as strings by default), but that isn't a problem. Try doing it the standard way, which is using PlayMusic("pathtoyourfile"); in @Initialize or during the script sometime. Somehow I don't think it'll help, but eh.


Danmakufu gave an error about the word spin
...That's why I noted that spriteangle and spin have to be predefined. They're variables. Give them both values of 0 or something.

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

TraceTheKriken

Re: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #683 on: December 10, 2011, 10:02:49 AM »
@BackGround. Capital G.
Well I'm not sure why the random quotation marks are there (everything in the headers are read as strings by default), but that isn't a problem. Try doing it the standard way, which is using PlayMusic("pathtoyourfile"); in @Initialize or during the script sometime. Somehow I don't think it'll help, but eh.

...That's why I noted that spriteangle and spin have to be predefined. They're variables. Give them both values of 0 or something.

I created variables "spin" and "spriteangle". But now it gives me error about SetGraphicAngle

Re: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #684 on: December 11, 2011, 01:10:17 AM »
I created variables "spin" and "spriteangle". But now it gives me error about SetGraphicAngle

Look up the function next time. Do not immediately post back after every single error, investigate and try to figure out why. If you really can't figure it out after trying a bunch of things, then post back and we'll see if we can help.

SetGraphicAngle(0, 0, spriteangle);

Yukari-Chan

  • Excuse me while I prepare /your/ demise. <3 TSO
Re: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #685 on: December 11, 2011, 03:43:07 AM »
Hey, How do you set player lives. ( Like in Phantasm romance lifes are 2 and CtC  youcan set it.
" Borders are Borders. They were meant to be manipulated and mistreated. "

Drake

  • *
Re: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #686 on: December 11, 2011, 04:23:00 AM »
ExtendPlayer(number);

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

Chronojet ⚙ Dragon

  • The Oddity
  • 今コソ輝ケ、我ガ未来、ソノ可能性!!
Re: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #687 on: December 11, 2011, 07:06:02 AM »
Or rather, ExtendPlayer(thenumberoflivesyouwanttheplayertohave-GetPlayerLife);

TraceTheKriken

Re: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #688 on: December 12, 2011, 01:13:27 PM »
Look up the function next time. Do not immediately post back after every single error, investigate and try to figure out why. If you really can't figure it out after trying a bunch of things, then post back and we'll see if we can help.

SetGraphicAngle(0, 0, spriteangle);

Ok, this time I tried to investigate things. Danmakufu doesn't give any errors this time, but the sprite doesn't spin and I have tried everything.
Maby this helps:

Code: [Select]
@DrawLoop {
SetTexture(imgBoss);
SetRenderState(ALPHA);
SetAlpha(255);
SetGraphicScale(1, 1);

let spin = 0;
let spriteangle = 0;

if(int(GetSpeedX())==0) {
SetGraphicAngle(0, 0, spriteangle);
if(f<5){ SetGraphicRect(7, 197, 43, 256); }
if(f>=5 && f<10){ SetGraphicRect(55, 197, 91, 256); }
if(f>=10 && f<15){ SetGraphicRect(103, 197, 139, 256); }
if(f>=15 && f<20){ SetGraphicRect(151, 197, 187, 256); }
f2=0;
}

if(GetSpeedX()>0) {
SetGraphicAngle(0, 0, spriteangle);
if(f2<5){ SetGraphicRect(11, 324, 41, 384); }
if(f2>=5 && f2<10){ SetGraphicRect(56, 328, 88, 384); }
if(f2>=10){ SetGraphicRect(107, 331, 136, 377); }
f2++;
}

if(GetSpeedX()<0) {
SetGraphicAngle(180, 0, spriteangle);
if(f2<5){ SetGraphicRect(11, 324, 41, 384); }
if(f2>=5 && f2<10){ SetGraphicRect(56, 328, 88, 384); }
if(f2>=10){ SetGraphicRect(107, 331, 136, 377); }
f2++;
}

if( GetSpeedX != 0){ spin = GetSpeedX; }
if( spriteangle != 0 ){
    spriteangle += spin;
}

DrawGraphic(GetX, GetY);

f++;
if(f==20) {f=0;}
}

I hope you can find waht's wrong.

MMX

  • In Soviet Gensokyo...
  • ...bullets dodge you.
    • LiveJournal blog
Re: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #689 on: December 12, 2011, 01:23:45 PM »
Quote
Code: [Select]
let spriteangle = 0;
Define it outside the drawloop so it'll not always reset to zero. Also join those two ifs doing the same thing.

Also, lets go talk on IRC. I'm currently sitting there bored  :wikipedia:
« Last Edit: December 12, 2011, 01:27:45 PM by MMX »
My danmakufu thread Most recent - "Kappa Mechanics" (Nitori fight)   My youtube channel Latest update - EoSD extra no bombs clear