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

Iryan

  • Ph?nglui mglw?nafh
  • Cat R?lyeh wgah?nagl fhtagn.
Re: Danmakufu Q&A/Problem thread number 4
« Reply #330 on: August 30, 2010, 11:18:18 AM »
      sub setGraphicMove {
         if (GetSpeedX < 0){
            setGraphicLeft;
         }else{
            if (GetSpeedX > 0){
               setGraphicRight;
            }
         }else{
            if (GetSpeedX == 0){
               setGraphicStop;
            }
         }
      }
Your second else{} is linked to the first else{} instead of what's IN the first else{}. Technically this would mean that the condition for the final case is the same as for the first case, but I can totally see danmakufu not liking you putting a "if else than else" condition into your code.

      sub setGraphicMove {
         if (GetSpeedX < 0){
            setGraphicLeft;
         }else{
            if (GetSpeedX > 0){
               setGraphicRight;
            }
         else{
            if (GetSpeedX == 0){
               setGraphicStop;
            }
         }   }
      }

If that does not fix it, then maybe the problem lies somewhere else entirely.


Edit: I hate all of you.  :derp:
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."

Sakuya Izayoi

  • Smartest Man on the Forum
  • Ozymandias has begun a mysterious construction!
Re: Danmakufu Q&A/Problem thread number 4
« Reply #331 on: August 30, 2010, 11:39:43 AM »
you don't type elseif, you do it this way:
Code: [Select]
if(somethingistrue){.
doCrap;
} else if(somethingelseistrue){
doCrap2;
}

I can dream can't I?  :D Thanks

Your second else{} is linked to the first else{} instead of what's IN the first else{}. Technically this would mean that the condition for the final case is the same as for the first case, but I can totally see danmakufu not liking you putting a "if else than else" condition into your code.

If that does not fix it, then maybe the problem lies somewhere else entirely.


Edit: I hate all of you.  :derp:

Thank you, too.  :P


Nimono

  • wat
Re: Danmakufu Q&A/Problem thread number 4
« Reply #332 on: September 01, 2010, 06:39:01 PM »
I don't have a script problem, but I do have a question pertaining to player scripts that I'm not sure would fit in its own thread.

What would be a good power range for a player's unfocused shots when the point of that player is to be a bit of a spread type, thus having power in the option shots that wouldn't really go towards the enemy that much? This is my issue. I'm worried my unfocused spread is too weak (~80 DPS from the bottom of the screen against the DPS tester), but if you shotgun with it, you get ~200 DPS. I don't want it to be so weak from the bottom, but of course, that is with like, two option shots and every stream of main shots but two hitting the boss. I just...can't figure out if that is even good enough. It's meant to be slightly weak, since its main purpose is to tackle stage enemies, but this is just worrying.

Iryan

  • Ph?nglui mglw?nafh
  • Cat R?lyeh wgah?nagl fhtagn.
Re: Danmakufu Q&A/Problem thread number 4
« Reply #333 on: September 01, 2010, 06:54:21 PM »
I don't have a script problem, but I do have a question pertaining to player scripts that I'm not sure would fit in its own thread.

What would be a good power range for a player's unfocused shots when the point of that player is to be a bit of a spread type, thus having power in the option shots that wouldn't really go towards the enemy that much? This is my issue. I'm worried my unfocused spread is too weak (~80 DPS from the bottom of the screen against the DPS tester), but if you shotgun with it, you get ~200 DPS. I don't want it to be so weak from the bottom, but of course, that is with like, two option shots and every stream of main shots but two hitting the boss. I just...can't figure out if that is even good enough. It's meant to be slightly weak, since its main purpose is to tackle stage enemies, but this is just worrying.
If you are at the bottom of the screen but below the boss, you should be able to deal at least 200 dps with any shottype. Anything else is just frustrating. Shotgun damage can be 300~350 as long as you can't do it for too long, no problem.
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."

Nimono

  • wat
Re: Danmakufu Q&A/Problem thread number 4
« Reply #334 on: September 01, 2010, 07:24:00 PM »
If you are at the bottom of the screen but below the boss, you should be able to deal at least 200 dps with any shottype. Anything else is just frustrating. Shotgun damage can be 300~350 as long as you can't do it for too long, no problem.
Again, I said UNfocused. Sure, you shouldn't be going unfocused against a boss, but I'm still worried it will be too weak... And I don't want this shot to have ANY shotgun potential AT ALL. :/

does your response still stand?

Iryan

  • Ph?nglui mglw?nafh
  • Cat R?lyeh wgah?nagl fhtagn.
Re: Danmakufu Q&A/Problem thread number 4
« Reply #335 on: September 01, 2010, 07:39:03 PM »
Again, I said UNfocused. Sure, you shouldn't be going unfocused against a boss, but I'm still worried it will be too weak... And I don't want this shot to have ANY shotgun potential AT ALL. :/

does your response still stand?
Well, at least the focused shot should do 200+ dps from the bottom of the screen when you are directly below the boss, if not 250.
If you do not want shotgun potential, you can make it so that the damage of each bullet that is not part of the forward main fire (which I assume your shot has) increases the longer it flies.  :derp:
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."

Nimono

  • wat
Re: Danmakufu Q&A/Problem thread number 4
« Reply #336 on: September 01, 2010, 08:29:00 PM »
Well, at least the focused shot should do 200+ dps from the bottom of the screen when you are directly below the boss, if not 250.
If you do not want shotgun potential, you can make it so that the damage of each bullet that is not part of the forward main fire (which I assume your shot has) increases the longer it flies.  :derp:
*sigh* I just increased the power of the unfocused shot to where it's now over 100 DPS. You really weren't understanding me, Iryan. I said the UNFOCUSED spread. Nowhere was I even mentioning focused. :( The focused damage was fine, it hovers around 240. (I refuse to have it closer to 250 because I feel that is going into the "power type" area, since that is what the designated power shot, MarisaA, has...)

GenericTouhouFailure

  • WHAT DO YOU MEAN IT'S NOT CALLED UNL? *boom*
« Last Edit: September 02, 2010, 01:18:05 PM by GenericClipdeath »

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 #338 on: September 02, 2010, 04:01:34 PM »
I'm sorry, I was busy and so I didn't answer you awesome guys :ohdear:
The graze-counter resets immediatly when you graze once.
I mean, you graze, so you get a grazecount of 1, but after one second it's already 0 again.
I tried many player scripts, including the original danmakufu REIMU ans MARISA Players (both A and B), but the error still occurs.

Seems like danamkufu hates me  :(

Tested again and now it works with Reimu, Marisa and Rumia, but not with custom player scripts.
I changed some graphics and sounds in th_dnh.dat in the near past.(like background, player sprites, bomb graphics, STG frame, shot sounds, enemy-kill sound, etc.))
Maybe I screwd up my danmakufu programm data??
« Last Edit: September 02, 2010, 04:35:36 PM by Grumskiz »

GenericTouhouFailure

  • WHAT DO YOU MEAN IT'S NOT CALLED UNL? *boom*

Re: Danmakufu Q&A/Problem thread number 4
« Reply #340 on: September 06, 2010, 10:59:59 AM »
How would one go along making custom dialog and text functions? I know you would need a image sheet with the numbers, letters, and symbols, but thats about it. Oh, and using the case() thing, which I have no idea how to use as well.

Azure Lazuline

  • Looooove!!
  • PM me for free huggles and love!
    • Entanma Project - indie game development
Re: Danmakufu Q&A/Problem thread number 4
« Reply #341 on: September 06, 2010, 07:17:19 PM »
First, make an image file with all the letters in order, preferably spaced out evenly (32 pixels for each or so). Now, you have to make a function that converts each letter of a string into the position of the corresponding letter (usually with a case statement), then either make a series of objects for each one, or one object with many vertices.
Each string is stored as a series of letters, by the way. If you do
let string="something";
then string[0] will return 's' (single quotes, not double quotes - it's a character, not a string).

As for the case statement:
Code: [Select]
function ToNumber(character){
let ret=0;
alternative(character)
case('A') {ret=0;} case('B') {ret=1;} case('C') {ret=2;} case('D') {ret=3;}
//etc
return ret;
}
Might not be the most efficient way, but it works.

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 #342 on: September 07, 2010, 03:57:09 PM »
Well this is just completely craptastic...

I guess this fits in the Q&A thread :V

I just got a new comp (windows 7 home basic), and whenever I try to run danmakufu with applocale, it crashes even before it reaches the main menu screen... :/

damn my being problematic >_>

EDIT: nvm, got it working by running through config.exe... wooo! I can run it at 60fps window mode now!!! :V
« Last Edit: September 07, 2010, 04:49:28 PM by Kylesky »
Danmakufu Script Thread :V Latest Script: Intertwining Mechanical Intervention (temp name)

Yooooouuutuuuubeeee Channel Latest Video: Contest #8 Entry

GenericTouhouFailure

  • WHAT DO YOU MEAN IT'S NOT CALLED UNL? *boom*
Re: Danmakufu Q&A/Problem thread number 4
« Reply #343 on: September 10, 2010, 12:24:28 AM »
How do you make a homing player script's bullets NOT home in on FOE's that don't have a hitbox? (eg: REIMU_A)

(Hitbox = SetCollisionA)

Re: Danmakufu Q&A/Problem thread number 4
« Reply #344 on: September 10, 2010, 12:29:25 AM »
You can't. You would have to set CommonData in the enemy script that tells the player not to shoot it. The default player characters probably don't even use Danmakufu code, but instead just call whatever language Danmakufu was programmed in directly, which gives them access to that kind of information, as well as makes them run faster than all custom player characters.

GenericTouhouFailure

  • WHAT DO YOU MEAN IT'S NOT CALLED UNL? *boom*
Re: Danmakufu Q&A/Problem thread number 4
« Reply #345 on: September 10, 2010, 02:44:47 AM »
run faster than all custom player characters.
:o what?!? I don't feel the difference. (Maybe because I suck)
Is it like a 1 or 2 frames different thing?

Thanks anyway.

Re: Danmakufu Q&A/Problem thread number 4
« Reply #346 on: September 10, 2010, 03:04:33 AM »
Er, it's not a frame rate increase. I meant that it takes your computer less time to process the default player scripts than it does all other custom player characters. So all scripts, if they lagged, would run faster using those characters instead of complete custom ones.

GenericTouhouFailure

  • WHAT DO YOU MEAN IT'S NOT CALLED UNL? *boom*
Re: Danmakufu Q&A/Problem thread number 4
« Reply #347 on: September 10, 2010, 03:07:58 AM »
Er, it's not a frame rate increase. I meant that it takes your computer less time to process the default player scripts than it does all other custom player characters. So all scripts, if they lagged, would run faster using those characters instead of complete custom ones.
Aaah! I see. I'm a (9)
Thanks again.
Now if you excuse me, I'll work on my shit.

Re: Danmakufu Q&A/Problem thread number 4
« Reply #348 on: September 10, 2010, 04:27:36 AM »
I have some questions  ???
-How do you make every bullet in the screen do something at the same time ?
-How do you make those youmu's bubble cutting thingy
-How do you make enemy do something when their health is low ?
-Where can I get damage tester ( :o)
-How do you make bullets follow you like those Pc-98 yellow worm thingy  :/
-I heard that you can make a background using loop video [How?]
-How do you make those eirin familiars that shoot stuff when bullets pass them?

I'll stop for now  :ohdear: my brain is dead
Hey There !

GenericTouhouFailure

  • WHAT DO YOU MEAN IT'S NOT CALLED UNL? *boom*
Re: Danmakufu Q&A/Problem thread number 4
« Reply #349 on: September 10, 2010, 04:35:15 AM »
I have some questions  ???
-How do you make every bullet in the screen do something at the same time ?
-How do you make those youmu's bubble cutting thingy
-How do you make bullets follow you like those Pc-98 yellow worm thingy  :/
1, createshotA shenanigans or Object Bullets
2, Object Bullets
3, Object Sinulate Lazers

Whee I'm helpful

Re: Danmakufu Q&A/Problem thread number 4
« Reply #350 on: September 10, 2010, 04:39:31 AM »
I have some questions  ???
-How do you make every bullet in the screen do something at the same time ?
-How do you make those youmu's bubble cutting thingy
-How do you make enemy do something when their health is low ?
-Where can I get damage tester ( :o)
-How do you make bullets follow you like those Pc-98 yellow worm thingy  :/
-I heard that you can make a background using loop video [How?]
-How do you make those eirin familiars that shoot stuff when bullets pass them?

I'll stop for now  :ohdear: my brain is dead

- Object bullets, if(SomeRandomVariable==true){ Obj_DoStuff(object, killthefuckingplayer); }
- Object laser collision_obj_obj, or use your own collision in the object bullets you will collide into the laser
- if(GetLife<1000){ .... }
- here
- Object sinuate lasers are best, but you can use object bullets and spawn a trail behind them
- Ma'am?
- Object bullets, collision_obj_obj, or use enemy scripts (no fun, boo)

I think it's time you started actively dabbling with object bullets. This is just a hunch.

Re: Danmakufu Q&A/Problem thread number 4
« Reply #351 on: September 10, 2010, 04:49:53 AM »
I have some questions  ???
-How do you make enemy do something when their health is low ?
-Where can I get damage tester ( :o)
-I heard that you can make a background using loop video [How?]
-How do you make those eirin familiars that shoot stuff when bullets pass them?
- Use GetLife to make it check that a certain value is greater than GetLife
-The Player Tutorial has it I think
-Sorry, I'm not your guy
-Object Bullets and a CommonData, Set The commondata of the Object bullet and then have the familiars check the commondata to see if they are touching.

Drake

  • *
Re: Danmakufu Q&A/Problem thread number 4
« Reply #352 on: September 10, 2010, 04:53:32 AM »
Don't need CommonData, just every bullet that would activate the extra bullets has to be an object bullet.

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

Re: Danmakufu Q&A/Problem thread number 4
« Reply #353 on: September 14, 2010, 01:22:41 PM »
So, I've mostly played scripts on my Danmakufu, but now I tried to make my own script.

Code: [Select]
#TouhouDanmakufu
#Title[Fool's Arts [Scarlet Feast]]
#Image[.\giygas.gif]
#BackGround[User(.\bg.png, 1, 1)]
#BGM[.\radiant.mp3]
#PlayLevel[Normal]
#Player[FREE]
#ScriptVersion[2]

script_enemy_main {
    let BossImage = "script\img\giygas.gif";
    let BossCutIn = "script\img\giygas.gif";
    @Initialize {LoadGraphic(BossImage);
        SetLife(100);
        SetDamageRate(10, 10);
        SetTimer(50);
        SetInvincibility(30);
        CutIn(YOUMU, "Fool's Arts [Scarlet Feast]", BossCutIn, 0, 0, 200, 600);
        SetScore(500000);
        SetEnemyMarker(true);
        SetDurableSpellCard;
        LastSpell;
        Concentration01(60);
        Concentration02(60);
        MagicCircle(false);
        SetEffectForZeroLife(180, 100, 1);
    }

    @MainLoop {
        SetCollisionA(GetX, GetY, 32);
        SetCollisionB(GetX, GetY, 24);
        if(frame==60){
            CreateShot01(50, Get30, 3, GetAngleToPlayer, RED21, 10);
            frame = 0;
        }
        frame++;
    }

    @DrawLoop {
    }

    @Finalize {
    }

    @BackGround {
    }
}

Well, when I start the script... It gives me the following error.



I know, the script must have a fail-athon going... :fail:
So, any help? :3

Re: Danmakufu Q&A/Problem thread number 4
« Reply #354 on: September 14, 2010, 01:26:30 PM »
You have to declare "frame" as a variable. Declare it after script_enemy_main {, like you did the variables BossImage and BossCutIn with

let frame = 0;

Re: Danmakufu Q&A/Problem thread number 4
« Reply #355 on: September 14, 2010, 01:42:03 PM »
Gah, how, where and what? I totally don't know how to. I just copy-pasted from the tutorial, and totally skipped the variables part. >_>

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: Danmakufu Q&A/Problem thread number 4
« Reply #356 on: September 14, 2010, 01:48:24 PM »
Gah, how, where and what? I totally don't know how to. I just copy-pasted from the tutorial, and totally skipped the variables part. >_>
Why are you skipping the variables part when that is like the majority of general programming?

Re: Danmakufu Q&A/Problem thread number 4
« Reply #357 on: September 14, 2010, 01:52:34 PM »
Why are you skipping the variables part when that is like the majority of general programming?

>>... *cough* Well, I just thought I don't need it yet. And it was oh-so-long. BUT NO, it turned out to be the "majority of general programming." :(
(That's not an insult, fyi.)

Edit:
Well, now I got it to work, I don't know what magic did I do... Only thing is now, that I failed to get the boss in the... "playground." Also I failed such simple thing as the music. :)
« Last Edit: September 14, 2010, 04:06:18 PM by Helepolis »

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: Danmakufu Q&A/Problem thread number 4
« Reply #358 on: September 14, 2010, 04:07:35 PM »
I appreciate your effort for trying to figure out things yourself.

Since you are new to the forum, a welcome first and second; please refrain from double posting. For this time, I merged your posts and deleted your second one. There is no reason to double post. Also, read the tutorials FULLY without skipping things. There is no reason to skip things when you are a learner.


Re: Danmakufu Q&A/Problem thread number 4
« Reply #359 on: September 14, 2010, 05:09:43 PM »
Yeah, thanks. I forgot that's not good on forums. :P Also, I now got some hang of it. :)
Now just one thing to ask. What's the width of the field? You know, where the bullets, enemy and the player is? :o