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

Iryan

  • Ph?nglui mglw?nafh
  • Cat R?lyeh wgah?nagl fhtagn.
Re: Danmakufu Q&A/Problem thread number 4
« Reply #600 on: December 09, 2010, 07:55:41 PM »


Well, i don't get it. I checked and all the { and }'s are okay. I tried just to add a { in the DrawLoop and it asks me to add a }. I tried also adding some random {{{ and the script ran, but there was only a hitbox, i was invincible (that's okay because my Missed loop is empty there's only the yield;) and i couldn't shot.
What can I do?

Visible in the error raise:

you have a ; between the closing ) of your if condition and the opening { of the statement.

 :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."

Serina

  • Evening Star
  • I like Danmakufu
Re: Danmakufu Q&A/Problem thread number 4
« Reply #601 on: December 09, 2010, 08:05:36 PM »
Visible in the error raise:

you have a ; between the closing ) of your if condition and the opening { of the statement.

 :derp:

So that's it! Thank you, it should be "if blahblahblah) {" right? Anyway i still getting the same error, but with "(". I'm not very good in english, so maybe i misunderstood what you said hehe~
But thank you very much and sorry if i'm being a idiot.

Iryan

  • Ph?nglui mglw?nafh
  • Cat R?lyeh wgah?nagl fhtagn.
Re: Danmakufu Q&A/Problem thread number 4
« Reply #602 on: December 09, 2010, 08:11:53 PM »
To help you, it would be a good idea if you actually posted the code you are working on, or at least the block of code where danmakufu is finding the error.

Make sure to include the lines before the one where the error is. If you are missing a ), a ; or something similar at the end of a statement, danmakufu does not realize that the statement is supposed to be over, so it goes to the next line of code where the error is then raised.
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."

Serina

  • Evening Star
  • I like Danmakufu
Re: Danmakufu Q&A/Problem thread number 4
« Reply #603 on: December 09, 2010, 08:22:38 PM »
http://pastebin.com/5kW1dxCV

Well, here's the "important" part. Also i removed the ; of the if's. Ignore this :V

And thank you very much again!

Iryan

  • Ph?nglui mglw?nafh
  • Cat R?lyeh wgah?nagl fhtagn.
Re: Danmakufu Q&A/Problem thread number 4
« Reply #604 on: December 09, 2010, 08:33:20 PM »
In line 30 and line 39, you are missing a ) in the internal if conditions.

For all of your SetGraphicRect() commands, you are missing the ; at the end.  :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."

Serina

  • Evening Star
  • I like Danmakufu
Re: Danmakufu Q&A/Problem thread number 4
« Reply #605 on: December 10, 2010, 01:57:51 PM »
Thank you very much! But the error stills... anyway, i'll check again it must be some newbie error i commited.
Thank you very much!

Re: Danmakufu Q&A/Problem thread number 4
« Reply #606 on: December 13, 2010, 06:25:32 AM »
If you don't have the disc, you can download the folder needed online. It's called I386. If you can't find it, I do still have my copy.

I downloaded language support off the internet and it worked perfectly! Thanks!

I know this is going to sound even stupider than my last problem, but I can't open the script I've downloaded, (Skies of Insanity) so only the default ones work. They're in my script folder. though. Same deal with the player scripts.

Blargel

  • RAWR!
  • I'M AN ANGRY LOLI!
Re: Danmakufu Q&A/Problem thread number 4
« Reply #607 on: December 13, 2010, 07:55:09 AM »
Try navigating through the the Directory menu in Danmakufu to the folder where you unpacked the files. Only thing I can think of...
<WorkingKeine> when i get home i just go to the ps3 and beat people up in blazblue with a loli
<Azure> Keine: Danmakufu helper by day, violent loli by night.

Re: Danmakufu Q&A/Problem thread number 4
« Reply #608 on: December 14, 2010, 01:03:20 AM »
I think...you should get the ;  after KEY_HOLD) off? Anyway,now I would like to know how can we get the screen dark but around the player or some places,like Mystia's 3 last spells,thanks alredy ^^

Re: Danmakufu Q&A/Problem thread number 4
« Reply #609 on: December 14, 2010, 01:06:57 AM »
Try navigating through the the Directory menu in Danmakufu to the folder where you unpacked the files. Only thing I can think of...

That worked, thankyou!

Micro

  • Danmakufu Scripter, Touhou Player
  • I always make my danmaku, too hard.
Re: Danmakufu Q&A/Problem thread number 4
« Reply #610 on: December 14, 2010, 01:11:52 AM »
Does any one know why this code raises an error?

http://pastebin.com/upKWaju6

Block of code = no. Pastebin it. -Hele
« Last Edit: December 14, 2010, 01:32:32 PM by Helepolis »
Oh... I got yin yang-ed.

Drake

  • *
Re: Danmakufu Q&A/Problem thread number 4
« Reply #611 on: December 14, 2010, 01:57:09 AM »
   task fire
   {
      loop
      {
         flame(GetEnemyX,GetEnemyY,5,90,RED01,30);
         dir+=180/36;
         x++;
         wait(90);
      }

      //Only yield loops!
      //yield;
      }////////////////////////////////////////////////////////////////////////this
   }

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

Micro

  • Danmakufu Scripter, Touhou Player
  • I always make my danmaku, too hard.
Re: Danmakufu Q&A/Problem thread number 4
« Reply #612 on: December 14, 2010, 11:50:38 PM »
Thank you very much! I should really remember to use Notepad++ more often. After that I got a few more errors, but I handled them my self.
Oh... I got yin yang-ed.

Drake

  • *
Re: Danmakufu Q&A/Problem thread number 4
« Reply #613 on: December 15, 2010, 12:11:52 AM »
Notepad++'s bracket checker isn't all that great for DNH syntax, and actually screws up highlighting too. The best thing you can do is keep consistently tabbing and spacing like you have been. I was actually surprised when I saw a new person use nice tabbing and spacing, gj lol

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

Micro

  • Danmakufu Scripter, Touhou Player
  • I always make my danmaku, too hard.
Re: Danmakufu Q&A/Problem thread number 4
« Reply #614 on: December 15, 2010, 12:41:36 AM »
Thank you! Actually, that's why the way Helepolis (and others) does there code bothers me. He does this:
Code: [Select]
thing{
}
Whereas I (and many others) do this:
Code: [Select]
thing
{
}
I think that way makes it easer to read, even if it is a little bigger. Anyone here agree? Also, I've been Danmakufu scripting longer than I've been on, or even heard of, (said, I know) this forum.
Oh... I got yin yang-ed.

Drake

  • *
Re: Danmakufu Q&A/Problem thread number 4
« Reply #615 on: December 15, 2010, 01:04:56 AM »
Oh, ok.

Either one is fine. Most professors will tell you to make a new line and it does look more neat, but many people including myself don't bother; it's actually harder for me to read the latter. It isn't for any huge overlying reason or anything, it's just how we do it. It feels weird to do otherwise just as you probably feel weird doing it our way. There are a lot of programming conventions that are ambiguous enough for people to do them multiple ways, don't worry about it.

EDIT: A related thing, take this example.
Code: [Select]
thing{
    stuff;
    }
vs
Code: [Select]
thing{
    stuff;
}
It doesn't actually change anything; it's just how people read things differently.
« Last Edit: December 15, 2010, 01:07:46 AM by Drake »

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

Blargel

  • RAWR!
  • I'M AN ANGRY LOLI!
Re: Danmakufu Q&A/Problem thread number 4
« Reply #616 on: December 15, 2010, 05:10:52 AM »
I actually thought the first example was more common than the second. Maybe it's just this community.... and in which case it's probably my fault for making the first ever basics tutorial and everyone learning from my bad habits.  :V
<WorkingKeine> when i get home i just go to the ps3 and beat people up in blazblue with a loli
<Azure> Keine: Danmakufu helper by day, violent loli by night.

Drake

  • *
Re: Danmakufu Q&A/Problem thread number 4
« Reply #617 on: December 15, 2010, 05:37:37 AM »
blargel is obv western danmakufu grandpa

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

Micro

  • Danmakufu Scripter, Touhou Player
  • I always make my danmaku, too hard.
Re: Danmakufu Q&A/Problem thread number 4
« Reply #618 on: December 15, 2010, 09:51:47 PM »
Notice how everyone is commenting on the first thing I said (or rather, typed), instead of the second where I said:
"... Also, I've been Danmakufu scripting longer than I've been on, or even heard of, (said, I know) this forum."

I wonder what would have happened if I had typed those two things in reverse order...
Oh... I got yin yang-ed.

TheMasterSpark

  • Lunatic lemurialist
Re: Danmakufu Q&A/Problem thread number 4
« Reply #619 on: December 18, 2010, 08:57:59 PM »
Hello,

I must really be missing something here. I'm having some trouble altering the Alpha value of an object effect that I'm drawing. Consider this little piece of code..
Code: [Select]
task Hitbox
{
let obj=Obj_Create(OBJ_EFFECT);
ObjEffect_SetTexture(obj,img_hitbox);
ObjEffect_SetRenderState(obj,ALPHA);
Obj_SetAlpha(obj,255);
ObjEffect_SetLayer(obj,4);
ObjEffect_SetPrimitiveType(obj, PRIMITIVE_TRIANGLESTRIP);
ObjEffect_CreateVertex(obj,4);
ObjEffect_SetVertexXY(obj,0,-50,-75);
ObjEffect_SetVertexXY(obj,1,50,-75);
ObjEffect_SetVertexXY(obj,2,-50,75);
ObjEffect_SetVertexXY(obj,3,50,75);
ObjEffect_SetVertexUV(obj,0,0,0);
ObjEffect_SetVertexUV(obj,1,100,0);
ObjEffect_SetVertexUV(obj,2,0,150);
ObjEffect_SetVertexUV(obj,3,100,150);
while(!Obj_BeDeleted(obj))
{
Obj_SetPosition(obj,GetEnemyX,GetEnemyY);
yield;
}
}
It's a big, ugly yellow rectangle that I want to use for hitbox purposes on large things. However, it won't respond properly to the Obj_SetAlpha part. Even if I set it to 0 it will still be shown fully opaque.

What am I missing here?  ???

Iryan

  • Ph?nglui mglw?nafh
  • Cat R?lyeh wgah?nagl fhtagn.
Re: Danmakufu Q&A/Problem thread number 4
« Reply #620 on: December 18, 2010, 09:09:14 PM »
You have to use ObjEffect_SetVertexColor(obj, vertexnumber, alpha, red, green, blue); for every single vertex instead.

Because danmakufu is stupid.
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."

TheMasterSpark

  • Lunatic lemurialist
Re: Danmakufu Q&A/Problem thread number 4
« Reply #621 on: December 19, 2010, 01:00:16 PM »
Alright, thanks for that. That'll teach me to actually read up on the functions instead of just scrolling through the list trying to find a relevant name. :)

Another thing,

Is it not possible to perform an AddShot on a bullet that was spawned with AddShot? Let's say that I fire bullet (1) like a regular shot, and bullet (2) is then AddShotted from it - can't I then spawn bullet (3) from bullet (2) using the same mechanics as with the first AddShot? I'm trying to get some results with it, but it's all blank at the moment.

There is no reason for double posting =.=  -Hele
« Last Edit: December 19, 2010, 10:14:58 PM by Helepolis »

Iryan

  • Ph?nglui mglw?nafh
  • Cat R?lyeh wgah?nagl fhtagn.
Re: Danmakufu Q&A/Problem thread number 4
« Reply #622 on: December 19, 2010, 04:36:31 PM »
Another thing,

Is it not possible to perform an AddShot on a bullet that was spawned with AddShot? Let's say that I fire bullet (1) like a regular shot, and bullet (2) is then AddShotted from it - can't I then spawn bullet (3) from bullet (2) using the same mechanics as with the first AddShot? I'm trying to get some results with it, but it's all blank at the moment.
You need to call the AddShot before the bullet you are adding to is fired. I am not 100% sure, but that may mean that you also have to add the tertiary bullet to the secondary bullet before you add the secondary to the primary.

I know for sure that it works if you do it that way, though.
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."

TheMasterSpark

  • Lunatic lemurialist
Re: Danmakufu Q&A/Problem thread number 4
« Reply #623 on: December 19, 2010, 04:43:44 PM »
That worked!

I changed it from
Code: [Select]
AddShot(120,1,2,0);
AddShot(60,2,3,0);
to
Code: [Select]
AddShot(60,2,3,0);
AddShot(120,1,2,0);
and now it behaves exactly like I wanted it to.

Thanks.   :)

Laplace

  • Crossing Demon
  • Easily confused by danmakufu
Re: Danmakufu Q&A/Problem thread number 4
« Reply #624 on: December 19, 2010, 07:03:16 PM »
Hi~
I made an account just to get help :D
Be part of this wonderful community
Anyway, I'm working on a Rumia character using the default Rumia Danmakufu stuff
As usual being the smartass that I am I thought copying a snippet of a code (to make a hitbox) from another character (In this case a Byakuren made by someone on here, I think)
And the results are as expected   :derp:



And the code

http://pastebin.com/s6PrEiDr

Anyway apologies to the dude/ette for stealing a snippet of code ;c
desudesudesu

Iryan

  • Ph?nglui mglw?nafh
  • Cat R?lyeh wgah?nagl fhtagn.
Re: Danmakufu Q&A/Problem thread number 4
« Reply #625 on: December 19, 2010, 07:20:03 PM »
I am going to say that "img" is a string variable that was defined in the original player script you copied the hitbox code snippet from to make refering to the paths of the images easier.

You need to change that line so that you give the command the actual full (relative, please) pathname of the image you would want to use for your hitbox.
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."

Laplace

  • Crossing Demon
  • Easily confused by danmakufu
Re: Danmakufu Q&A/Problem thread number 4
« Reply #626 on: December 19, 2010, 07:33:14 PM »
I am going to say that "img" is a string variable that was defined in the original player script you copied the hitbox code snippet from to make refering to the paths of the images easier.

You need to change that line so that you give the command the actual full (relative, please) pathname of the image you would want to use for your hitbox.

Can you give me an example of how the path should be, please?
I'm sorta confused
Sorry ;;;
I should go back to study Danmakufu scripting
desudesudesu

Iryan

  • Ph?nglui mglw?nafh
  • Cat R?lyeh wgah?nagl fhtagn.
Re: Danmakufu Q&A/Problem thread number 4
« Reply #627 on: December 19, 2010, 07:49:07 PM »
Can you give me an example of how the path should be, please?
I'm sorta confused
Sorry ;;;
I should go back to study Danmakufu scripting
Welllllll, have you read the avialable danmakufu tutorials here? There is one on player creation as well, so you may want to take a look if you plan to make one.
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."

Laplace

  • Crossing Demon
  • Easily confused by danmakufu
Re: Danmakufu Q&A/Problem thread number 4
« Reply #628 on: December 19, 2010, 08:09:35 PM »
Welllllll, have you read the avialable danmakufu tutorials here? There is one on player creation as well, so you may want to take a look if you plan to make one.
Not many as of yet.
And that's what I'm doing
I'm taking the Rumia stuff in Danmakufu and making it better
I thought it have been easier to use an already existing character script to learn a few things
But yeah, can you give me an example  :ohdear:
« Last Edit: December 20, 2010, 12:06:03 AM by Laplace »
desudesudesu

Zengar Zombolt

  • Space-Time Tuning Circle - Wd/Fr
  • Green-Red Divine Clock
Re: Danmakufu Q&A/Problem thread number 4
« Reply #629 on: December 19, 2010, 11:46:05 PM »
I'd say that you should learn some boss scripting before player scripting, as it uses some more complex knowledge (Like say, objects.)