Author Topic: Danmakufu Q&A/Problem thread number 4  (Read 205720 times)

GenericTouhouFailure

  • WHAT DO YOU MEAN IT'S NOT CALLED UNL? *boom*
Re: Danmakufu Q&A/Problem thread number 4
« Reply #300 on: August 23, 2010, 04:18:40 AM »
You have to make an entirely new DrawText
Shit.

Re: Danmakufu Q&A/Problem thread number 4
« Reply #301 on: August 23, 2010, 04:27:49 AM »
Shit.

DrawText("This one Here".x.y.30,alpha);
DrawText("That one Tere".x+30.y+30.30,alpha);

Perhaps "Make" was a poor word choice...

GenericTouhouFailure

  • WHAT DO YOU MEAN IT'S NOT CALLED UNL? *boom*
Re: Danmakufu Q&A/Problem thread number 4
« Reply #302 on: August 23, 2010, 04:59:41 AM »
DrawText("This one Here".x.y.30,alpha);
DrawText("That one Tere".x+30.y+30.30,alpha);

Perhaps "Make" was a poor word choice...
No. I was just complaining about the process being too time consuming.
Especially with multiple lines.
Object effects would be a lot easier in this case.
brb finding my DrawTextNew function that's blatantly edited version of Kylesky's Dialogue functionz

Drake

  • *
Re: Danmakufu Q&A/Problem thread number 4
« Reply #303 on: August 23, 2010, 05:03:04 AM »
You're implying the DrawTextNew-esque functions were developed by one person and not a combined effort of ripping off various code from various people :(

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

Chronojet ⚙ Dragon

  • The Oddity
  • 今コソ輝ケ、我ガ未来、ソノ可能性!!
Re: Danmakufu Q&A/Problem thread number 4
« Reply #304 on: August 23, 2010, 05:04:42 AM »
SetFog

It turns my backgrounds into big blocks of whatever colour

GenericTouhouFailure

  • WHAT DO YOU MEAN IT'S NOT CALLED UNL? *boom*
Re: Danmakufu Q&A/Problem thread number 4
« Reply #305 on: August 23, 2010, 05:13:31 AM »
You're implying the DrawTextNew-esque functions were developed by one person and not a combined effort of ripping off various code from various people :(
god.
I guess I haz worse choice of word.
I was just trying to say that I'll try another lazier method and scream when I fail miserably.

Maybe I'll just shut up next time.
Sheesh, my engrish made another mess again.

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: Danmakufu Q&A/Problem thread number 4
« Reply #306 on: August 23, 2010, 09:29:10 AM »
SetFog

It turns my backgrounds into big blocks of whatever colour

SetFog has to be accompanied with a 2D sheet in your back ground. I think I am going to write a tutorial about this. To help you out:

Logically the stage background is pitch black. So when you are building a stage, you logically add stuff in like walls, floor, ceilings. Incase you don't have a background drop (like Azure has for example with her mountains/sky) it will simply show the black backdrop. Adding just SetFog isn't going to cure this. You have to create a "backdrop" which is simply a 2D sheet drawn with the 3Dfunction and placed in the back.

- Create a 1x1 white pixel in paint and save it as fogsheet.png or w/e.
- Draw this inside the stage with quite large proportions, so it covers the black parts. Set it to the desired fog colour you are using with SetFog (i.e if your SetFog has 255,16,16 then make sure the fogsheet is also same colour).
- Adjust the first two parameters of SetFog until you get your desired intensity.



Kylesky

  • *The Unknown*
  • Local Unbalanced Danmakufu Idiot Scripter
    • My useless youtube account... (will be useful in the future *I promise*)
Re: Danmakufu Q&A/Problem thread number 4
« Reply #307 on: August 23, 2010, 11:01:46 AM »
I think he just means that SetFog's turning his graphics into big blocks of a certain color

use smaller images then just tile them or something, SetFog goes crazy with large images :V
Danmakufu Script Thread :V Latest Script: Intertwining Mechanical Intervention (temp name)

Yooooouuutuuuubeeee Channel Latest Video: Contest #8 Entry

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: Danmakufu Q&A/Problem thread number 4
« Reply #308 on: August 23, 2010, 11:24:57 AM »
I think he just means that SetFog's turning his graphics into big blocks of a certain color

use smaller images then just tile them or something, SetFog goes crazy with large images :V
Just realizing that I returned to this thread to edit my post, but you seem to have tackled it all ready. Must read more clearly in the early timers =.=

Like Kylesky said, build your stage from 1024 blocks etc.

Formless God

Re: Danmakufu Q&A/Problem thread number 4
« Reply #309 on: August 25, 2010, 06:27:18 AM »
I couldn't achieve that reflective effect in the end (which needed to be part of the player script) but the various advices were very useful for my other scripts. Thanks a lot guys :3

Re: Danmakufu Q&A/Problem thread number 4
« Reply #310 on: August 25, 2010, 09:09:28 AM »
I have a quick question.  I have a Plural file working with Spellcards and Non-Spellcards, but I can't figure out how too change the background of the Non-Spellcards.

Drake

  • *
Re: Danmakufu Q&A/Problem thread number 4
« Reply #311 on: August 25, 2010, 09:12:57 AM »
You need a stage. Without a SetScore there are no backgrounds for single patterns.

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

Kylesky

  • *The Unknown*
  • Local Unbalanced Danmakufu Idiot Scripter
    • My useless youtube account... (will be useful in the future *I promise*)
Re: Danmakufu Q&A/Problem thread number 4
« Reply #312 on: August 25, 2010, 09:51:55 AM »
alternatively, If you want, you can draw the background in @DrawLoop, but make sure it's always drawn below/before the boss and other things... also, I don't think this would allow anything 3D (I doubt that you're trying to do 3D yet though :V)
Danmakufu Script Thread :V Latest Script: Intertwining Mechanical Intervention (temp name)

Yooooouuutuuuubeeee Channel Latest Video: Contest #8 Entry

Re: Danmakufu Q&A/Problem thread number 4
« Reply #313 on: August 25, 2010, 09:59:57 AM »
You need a stage. Without a SetScore there are no backgrounds for single patterns.

I made a 'stage' with the background I want that clears after 30 seconds, but I how do link the stage to the plural file?

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: Danmakufu Q&A/Problem thread number 4
« Reply #314 on: August 25, 2010, 10:05:52 AM »
I made a 'stage' with the background I want that clears after 30 seconds, but I how do link the stage to the plural file?

During the stage when ever you want, you spawn the boss which is calling the plural file with the following command: CreateEnemyBossFromFile("path to the plural file",x pos,y pos, speed , direction ,userargument);

(Note that the path to the plural file must be between double quotes.

Re: Danmakufu Q&A/Problem thread number 4
« Reply #315 on: August 26, 2010, 02:57:38 AM »
During the stage when ever you want, you spawn the boss which is calling the plural file with the following command: CreateEnemyBossFromFile("path to the plural file",x pos,y pos, speed , direction ,userargument);

Worked out great, thanks!

Is there a more proper way to make a time out spellcard rather than making the enemy health 99999?

Re: Danmakufu Q&A/Problem thread number 4
« Reply #316 on: August 26, 2010, 03:08:54 AM »
Leave out the SetCollisionA/SetCollisionB so make it so the player's bullets don't even collide with boss, or use ForbidShot(true);

Drake

  • *
Re: Danmakufu Q&A/Problem thread number 4
« Reply #317 on: August 26, 2010, 09:58:58 AM »
SetDurableSpellCard; ?

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

Re: Danmakufu Q&A/Problem thread number 4
« Reply #318 on: August 26, 2010, 06:17:35 PM »
SetDurableSpellCard; ?
That too, because without it, the Bonus would decrease over time, so when time would be up the Bonus would be 0.

Re: Danmakufu Q&A/Problem thread number 4
« Reply #319 on: August 27, 2010, 03:22:48 PM »
Can someone see why this isn't working  :V I'm stuck

Code: [Select]
   if(sc== 1){
ascent(i in 0..5){
PlaySE(GetCurrentScriptDirectory~"SE\Shot4.wav");
CreateShotA(1, GetX+50*i, GetY, 10);
SetShotDataA(1, 0, 0.5-5/i, GetAngleToPlayer+wa, 0, 1, 10, 185);
FireShot(1);

CreateShotA(1, GetX-50*i, GetY, 10);
SetShotDataA(1, 0, 0.5-5/i, GetAngleToPlayer-wa, 0, 1, 10, 185);
FireShot(1);
}


sc = 0;
   }


   if(wa<= 100){
wa += 1;
}

   if(wa>= 100){
wa -= 1;
}

   if(wa== 95){
wa = 200;
}

   if(wa== 105){
wa = 0;
}
Hey There !

Kylesky

  • *The Unknown*
  • Local Unbalanced Danmakufu Idiot Scripter
    • My useless youtube account... (will be useful in the future *I promise*)
Re: Danmakufu Q&A/Problem thread number 4
« Reply #320 on: August 27, 2010, 04:07:04 PM »
Code: [Select]
   if(wa<= 100){
wa += 1;
}

   if(wa>= 100){
wa -= 1;
}

   if(wa== 95){
wa = 200;
}

   if(wa== 105){
wa = 0;
}

check if wa ever falls between 95 and 105... if it does, it would get stuck at 100... if it's impossible for it to go between 95 and 105, then I have no idea :V (too lazy to actually look at the code right now)
Danmakufu Script Thread :V Latest Script: Intertwining Mechanical Intervention (temp name)

Yooooouuutuuuubeeee Channel Latest Video: Contest #8 Entry

Re: Danmakufu Q&A/Problem thread number 4
« Reply #321 on: August 27, 2010, 10:58:33 PM »
I am so mad at this right now...

http://pastebin.org/791582

I am trying to recreate Sanae's OP from MoF, lunatic, and I can't get the angles right. I need help, please~ I have the bullet placement and the begging right, just when the fan out is the part I am having troubles with.

Iryan

  • Ph?nglui mglw?nafh
  • Cat R?lyeh wgah?nagl fhtagn.
Re: Danmakufu Q&A/Problem thread number 4
« Reply #322 on: August 27, 2010, 11:37:40 PM »
I am so mad at this right now...

http://pastebin.org/791582

I am trying to recreate Sanae's OP from MoF, lunatic, and I can't get the angles right. I need help, please~ I have the bullet placement and the begging right, just when the fan out is the part I am having troubles with.

Code: [Select]
task TShitballs(x, y, v, r, as, ab, ns, nb, graph){

loop(120){ yield; }

let d=r*2/sin(72);

ascent(k in 0..nb){ ascent(i in 0..ns){ ascent(j in 0..5){

CreateShotA(1,  x+r*cos(ab+72*j)+d*cos(ab+72*j+162)*k/nb,
y+r*sin(ab+72*j)+d*sin(ab+72*j+162)*k/nb, 0);

SetShotDataA(1, 0, 0, as+360*i/ns, 0, 0, 0, graph);
SetShotDataA(1, 60+nb-k, 6, as+360*i/ns, 0, -0.2, 0, graph);
SetShotDataA(1, 180+nb-k, 0, ab+72*j+162, 0.25*k/nb, v/90, v, graph);
FireShot(1);

} } yield; }
}
Reposting here so it doesn't get lost in the pastebin limbo.

x,y = center of starsplosion
v = final bullet speed
r = star radius
as, ns = alignment and number of stars
ab, nb = alignment of bullets and number of bullets in the individual lines of the pentagrams
graph = graphic

You need to tinker around with the final SetShotData until you get the correct result. I may look at it again tomorrow, but it is kinda late over here...
Old Danmakufu stuff can be found here!

"As the size of an explosion increases, the numbers of social situations it is incapable of solving approaches zero."

Grumskiz

  • Likes Tyrian and Cave...also there is Touhou
  • Danmaku without programming or gaming skill
    • My Youtube Channel - German Let's Play Videos
Re: Danmakufu Q&A/Problem thread number 4
« Reply #323 on: August 28, 2010, 05:45:12 PM »
I have another problem.
I combining my standartspells and spell-cards in one Plural-script for my first real boss fight.(I mean, it is not just a bunch of attacks in a spellcard which was randomly designed according to a tutorial or something)
At the moment there are 2 spells and 2 standartspells combined in it.
While testing it, I noticed that the "Graze" counter resets itself after a VERY short time.
So you can't get a grazecount higher then 1.(Mostly it's 0)
How do I fix that?

€dit:
Forgot to tell you that it works for every other script. Also the single scripts work fine, when you don't use the Plural script.
I will upload it on pastebin and write the link in this post.
« Last Edit: August 28, 2010, 05:51:42 PM by Grumskiz »

GenericTouhouFailure

  • WHAT DO YOU MEAN IT'S NOT CALLED UNL? *boom*
Re: Danmakufu Q&A/Problem thread number 4
« Reply #324 on: August 29, 2010, 06:56:37 AM »
I have another problem.
I combining my standartspells and spell-cards in one Plural-script for my first real boss fight.(I mean, it is not just a bunch of attacks in a spellcard which was randomly designed according to a tutorial or something)
At the moment there are 2 spells and 2 standartspells combined in it.
While testing it, I noticed that the "Graze" counter resets itself after a VERY short time.
So you can't get a grazecount higher then 1.(Mostly it's 0)
How do I fix that?

?dit:
Forgot to tell you that it works for every other script. Also the single scripts work fine, when you don't use the Plural script.
I will upload it on pastebin and write the link in this post.
Sounds like Danmakufu being a jerk again to me rather than your script's error.

Stuffman

  • *
  • We're having a ball!
Re: Danmakufu Q&A/Problem thread number 4
« Reply #325 on: August 30, 2010, 05:59:46 AM »
I have another problem.
I combining my standartspells and spell-cards in one Plural-script for my first real boss fight.(I mean, it is not just a bunch of attacks in a spellcard which was randomly designed according to a tutorial or something)
At the moment there are 2 spells and 2 standartspells combined in it.
While testing it, I noticed that the "Graze" counter resets itself after a VERY short time.
So you can't get a grazecount higher then 1.(Mostly it's 0)
How do I fix that?

Might be a screwy player script? Not sure how a plural would cause this. Need to see code.

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: Danmakufu Q&A/Problem thread number 4
« Reply #326 on: August 30, 2010, 08:16:48 AM »
Sounds like a player script indeed. I don't remember the graze counter resetting unless you use continue. Might want to try regular Reimu or Marisa A/B to see what happens. Also when does the graze counter reset? Immediately in the first spell/nonspell or ......... ?

Sakuya Izayoi

  • Smartest Man on the Forum
  • Ozymandias has begun a mysterious construction!
Re: Danmakufu Q&A/Problem thread number 4
« Reply #327 on: August 30, 2010, 11:09:24 AM »
I'm trying to write this simple little script for animating boss characters, but what seems like a simple task seems impossible. I keep getting an error that I'm missing a }, but I counted and I have 22 opening and closing brackets in the entire script.

Code: [Select]
sub setGraphicMove {
if (GetSpeedX < 0){
setGraphicLeft;
}else{
if (GetSpeedX > 0){
setGraphicRight;
}
}else{
if (GetSpeedX == 0){
setGraphicStop;
}
}
}

I feel like a derp because this seems so simple. If only Danmakufu had elsif like perl...  :fail:


GenericTouhouFailure

  • WHAT DO YOU MEAN IT'S NOT CALLED UNL? *boom*
Re: Danmakufu Q&A/Problem thread number 4
« Reply #328 on: August 30, 2010, 11:16:09 AM »

I feel like a derp because this seems so simple. If only Danmakufu had elsif like perl...  :fail:
you don't type elseif, you do it this way:
Code: [Select]
if(somethingistrue){
doCrap;
} else if(somethingelseistrue){
doCrap2;
}

Edit: I'm such an awesome Ninja
« Last Edit: August 31, 2010, 04:05:34 AM by GenericClipdeath »

Kylesky

  • *The Unknown*
  • Local Unbalanced Danmakufu Idiot Scripter
    • My useless youtube account... (will be useful in the future *I promise*)
Re: Danmakufu Q&A/Problem thread number 4
« Reply #329 on: August 30, 2010, 11:17:34 AM »
*cough*
Code: [Select]
sub setGraphicMove {
if (GetSpeedX < 0){
setGraphicLeft;
}else if(GetSpeedX > 0){
setGraphicRight;
}else{
setGraphicStop;
}
}

damn, beaten to the punch :V
Danmakufu Script Thread :V Latest Script: Intertwining Mechanical Intervention (temp name)

Yooooouuutuuuubeeee Channel Latest Video: Contest #8 Entry