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

Qwertyzxcv

  • yas
  • k!
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #480 on: January 23, 2013, 01:51:29 AM »
You never called MainTask in @Initialize of your familiar script. That's why it doesn't shoot. Also, a speed of 7, along with 12 bullets per second, is extremely hard to dodge is you aren't streaming or if there are other bullets.
THANK YOU! :DD Oh, and yes, it's just streaming. :V

Qwertyzxcv

  • yas
  • k!
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #481 on: January 23, 2013, 02:00:01 AM »
You never called MainTask in @Initialize of your familiar script. That's why it doesn't shoot. Also, a speed of 7, along with 12 bullets per second, is extremely hard to dodge is you aren't streaming or if there are other bullets.
It's sort of glitching, the first familiar shoots bullets wierd, and then the others and enemy 2 dont shoot at all

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #482 on: January 23, 2013, 02:14:39 AM »
It's sort of glitching, the first familiar shoots bullets wierd, and then the others and enemy 2 dont shoot at all

Elaborate, and post the enemy code. Also post the code that spawns the familiar.

When you say it shoots weird, please provide a screenshot or describe what is going awry.

Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #483 on: January 23, 2013, 02:54:53 AM »
It's sort of glitching, the first familiar shoots bullets wierd, and then the others and enemy 2 dont shoot at all

I think I also had this problem. Don't use GetEnemyX/GetEnemyY for familiars. It's only used for if you want to attack with the main enemy.
Instead, just use GetX/GetY. This should solve your problem.
Currently a normal player

Qwertyzxcv

  • yas
  • k!
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #484 on: January 23, 2013, 02:58:16 AM »
I think I also had this problem. Don't use GetEnemyX/GetEnemyY for familiars. It's only used for if you want to attack with the main enemy.
Instead, just use GetX/GetY. This should solve your problem.
I'll try  :)

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #485 on: January 23, 2013, 03:23:12 AM »
I'll try  :)

Geez. You're not seriously running Danmakufu on Linux, are you?
If it still doesn't work, post the code on pastebin and we'll see what we can do.

Qwertyzxcv

  • yas
  • k!
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #486 on: January 23, 2013, 08:41:13 PM »
Geez. You're not seriously running Danmakufu on Linux, are you?
If it still doesn't work, post the code on pastebin and we'll see what we can do.
No i'm not, a couple messages I sent were from my Nook, i'm doing it on Windows 7.  :V

Qwertyzxcv

  • yas
  • k!
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #487 on: January 23, 2013, 10:00:23 PM »
Thanks all! It worked!!  :)
I have ANOTHER question though, how do I make multiple object bullets shoot? I can only get one to...

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #488 on: January 23, 2013, 10:19:12 PM »
Just call the object bullet more than once. For example:
Code: [Select]
@MainLoop
    //collision
    loop(4){Bullet(GetX, GetY, 3, angle, 34, 0, true); angle += 90;}
}

Where 'Bullet' is a task that creates an object bullet. The code above creates a ring of 4 object bullets.
P.S. There are tutorials for this you know... They might clear up some misconceptions.

Qwertyzxcv

  • yas
  • k!
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #489 on: January 23, 2013, 10:38:02 PM »
Just call the object bullet more than once. For example:
Code: [Select]
@MainLoop
    //collision
    loop(4){Bullet(GetX, GetY, 3, angle, 34, 0, true); angle  = 90;}
}

Where 'Bullet' is a task that creates an object bullet. The code above creates a ring of 4 object bullets.
P.S. There are tutorials for this you know... They might clear up some misconceptions.
Nevermind, I fixed it xD I forgot the loop{.
(And I meant make multiple shoot from the enemy, I know I worded that strangely)
« Last Edit: January 23, 2013, 11:11:00 PM by Qwertyzxcv »

Qwertyzxcv

  • yas
  • k!
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #490 on: January 25, 2013, 03:18:38 PM »
Does anyone know what's wrong with this script?
http://pastebin.com/Gwa8MJ8r

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #491 on: January 25, 2013, 05:27:06 PM »
Does anyone know what's wrong with this script?
http://pastebin.com/Gwa8MJ8r

You have an extra closing bracket at the end, I believe.

Please read the following: Danmakufu Error Message Troubleshooting

Technically, it's part of the sticky, so if you get an error message, please consult this page before posting here. I also suggest learning Katakana, so that you can tell some of the error messages apart without looking at the page.

Qwertyzxcv

  • yas
  • k!
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #492 on: January 25, 2013, 05:37:48 PM »
You have an extra closing bracket at the end, I believe.

Please read the following: Danmakufu Error Message Troubleshooting

Technically, it's part of the sticky, so if you get an error message, please consult this page before posting here. I also suggest learning Katakana, so that you can tell some of the error messages apart without looking at the page.
It doesn't give me an error, it freezes.

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #493 on: January 25, 2013, 05:52:02 PM »
It doesn't give me an error, it freezes.

If something freezes, that means that there was probably an infinite loop. I'll check.

Edit: If getting rid of that last } doesn't give you an error message and it still freezes, put a yield; in maintask and see what happens. I'm not an expert with scripts where you run a maintask instead of @MainLoop, so I can't help much more than this.
« Last Edit: January 25, 2013, 05:54:04 PM by Sparen »

Drake

  • *
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #494 on: January 25, 2013, 07:10:22 PM »
There doesn't need to be a yield in mainTask. Tasks don't inherently need a yield until you want to pass processing to a different thread. At that, a mainTask that just calls other tasks without delay doesn't even need to be a task, and really you could just skip it and plop fire; effect; in @Initialize.

That being said, I can't immediately see why it would crash, since there isn't actually an extra bracket. I just tried it myself, without the images and code related to the images, and it ran fine.

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

Qwertyzxcv

  • yas
  • k!
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #495 on: January 25, 2013, 07:22:16 PM »
There doesn't need to be a yield in mainTask. Tasks don't inherently need a yield until you want to pass processing to a different thread. At that, a mainTask that just calls other tasks without delay doesn't even need to be a task, and really you could just skip it and plop fire; effect; in @Initialize.

That being said, I can't immediately see why it would crash, since there isn't actually an extra bracket. I just tried it myself, without the images and code related to the images, and it ran fine.
I think it might have to do with the SetVertexes, for an image that is 0, 0, 88, 90, would they be correct?

Blargel

  • RAWR!
  • I'M AN ANGRY LOLI!
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #496 on: January 25, 2013, 07:58:14 PM »
You can't make an effect object on the first frame, as this script is doing. In your effect task, put a yield before you even create the effect.
<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.

Qwertyzxcv

  • yas
  • k!
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #497 on: January 25, 2013, 08:10:54 PM »
You can't make an effect object on the first frame, as this script is doing. In your effect task, put a yield before you even create the effect.
Before   let obj=Obj_Create(OBJ_EFFECT);? I did that and it still freezes
 

Drake

  • *
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #498 on: January 25, 2013, 10:43:53 PM »
Comment out the lines that have to do with each individual graphic, one at a time. Comment out the effect graphic and the lines that refer to it, try running. Comment out the references to the boss image and drawing, try running. Comment out the cutin image and function, try running. Comment out the bg and actual background, etc.

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

Qwertyzxcv

  • yas
  • k!
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #499 on: January 27, 2013, 06:11:43 PM »
Comment out the lines that have to do with each individual graphic, one at a time. Comment out the effect graphic and the lines that refer to it, try running. Comment out the references to the boss image and drawing, try running. Comment out the cutin image and function, try running. Comment out the bg and actual background, etc.
It didn't work.  ???
« Last Edit: January 29, 2013, 10:50:34 PM by Qwertyzxcv »

Drake

  • *
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #500 on: January 28, 2013, 12:12:09 AM »
What. So your script is like this, but still freezes?

http://pastebin.com/9hbb9kyi

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

Qwertyzxcv

  • yas
  • k!
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #501 on: January 28, 2013, 01:02:30 AM »
What. So your script is like this, but still freezes?

http://pastebin.com/9hbb9kyi
Wait no, your code doesn't freeze  :) . (nothing shows up though)

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #502 on: January 28, 2013, 01:42:16 AM »
Compare your code to his (besides the /* */). See what's different. Then maybe you'll find your error.

Also, I know that this is an EXTREMELY stupid question, but you're definitely using 0.12m, right? Not ph3.

Qwertyzxcv

  • yas
  • k!
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #503 on: January 28, 2013, 02:04:32 AM »
Compare your code to his (besides the /* */). See what's different. Then maybe you'll find your error.

Also, I know that this is an EXTREMELY stupid question, but you're definitely using 0.12m, right? Not ph3.
Yes, i'm using 0.12,  :)

Qwertyzxcv

  • yas
  • k!
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #504 on: January 29, 2013, 10:54:31 PM »
What. So your script is like this, but still freezes?

http://pastebin.com/9hbb9kyi
OK, I tried your method, and I figured out the problem has to do with the effect task. Anyway to fix the freeze?
(And I know i'm asking lots of questions but, how do I make the script wait a certain amount of frames before shooting bullets?)

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #505 on: January 29, 2013, 11:14:48 PM »
(And I know i'm asking lots of questions but, how do I make the script wait a certain amount of frames before shooting bullets?)

In general, make your count variable start negative, and increment it up. I use -60 as my default.

As for objects, Danmakufu executes from top down. Therefore, if you wait(60); then do something, Danmakufu will wait 1 second before executing the code below it.

For bullet control, use % or have multiple counting variables.

Qwertyzxcv

  • yas
  • k!
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #506 on: January 30, 2013, 12:16:44 AM »
In general, make your count variable start negative, and increment it up. I use -60 as my default.

As for objects, Danmakufu executes from top down. Therefore, if you wait(60); then do something, Danmakufu will wait 1 second before executing the code below it.

For bullet control, use % or have multiple counting variables.
Thank you! :D
« Last Edit: January 30, 2013, 01:12:21 AM by Qwertyzxcv »

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #507 on: January 30, 2013, 01:17:41 AM »
Thank you! :D

You're welcome. Also, your effect task DOESN'T LOAD ANYTHING. I hope you realize this. You did not load any file, so no image will ever show up (i.e. you never set the file from where the vertices are going to select the image in the task). Also, the image will appear twisted when it is loaded, I think. Has to do with the UV vertices.

Qwertyzxcv

  • yas
  • k!
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #508 on: January 30, 2013, 01:59:22 AM »
You're welcome. Also, your effect task DOESN'T LOAD ANYTHING. I hope you realize this. You did not load any file, so no image will ever show up (i.e. you never set the file from where the vertices are going to select the image in the task). Also, the image will appear twisted when it is loaded, I think. Has to do with the UV vertices.
Oh wow,  I guess i'll fix that. But how?

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #509 on: January 30, 2013, 02:02:21 AM »
ObjEffect_SetTexture(obj, filewiththeimage);

filewiththeimage is a variable you define earlier in the task or in script_enemy_main

For the latter part,
ObjEffect_SetVertexUV(obj, 0, 0, 0);
ObjEffect_SetVertexUV(obj, 1, 90, 0);
ObjEffect_SetVertexUV(obj, 2, 90, 88);
ObjEffect_SetVertexUV(obj, 3, 0, 88);

should work, I think.
« Last Edit: January 30, 2013, 08:32:39 PM by Sparen »