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

Re: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #60 on: May 08, 2011, 03:03:52 AM »
Read stickies.

Move yield; out of if(frame==120) and into the main body of @MainLoop. You're going to have many bullets appearing.

Blargel

  • RAWR!
  • I'M AN ANGRY LOLI!
Re: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #61 on: May 08, 2011, 05:32:10 AM »
I'm trying to run LibTest from the animation library folder. I make no adjustments, and I get the following error:



I figure it means something like file does not exist, but I triple-checked and it lines up correctly in the code.
I believe what happened is that you loaded the script, then maybe moved the folder containing the files to some other location and reloaded the script, causing Danmakufu to try to load a nonexistant file (because it's still looking for it in its original location).

Hi
I'm having a little problem with my simple code that is using a task.

Now, the boss shoot bullets and when those bullets touch the border of the screen, they explode into a circle of other bullets.
You see, that's simple, but something wrong happen : they only explode when they touch the bottom border of the screen.

This is my code
Code: [Select]
long code
}

If someone can test my code and tell me what my problem is, it will be really but really appreciate
Thanks
WHEN POSTING LARGE BLOCKS OF CODE, PLEASE USE PASTEBIN.COM 


You should probably also read the information thread stickied at the top because it has rules you should be following and tutorials you can look at to help troubleshoot your stuff. For now, do what Naut said and move the yield out of the if block so that it runs every frame instead of every 120 frames. Your bullet task logic looks okay to do what you want except for one thing: you aren't deleting the bullet after it explodes so each bullet is going to explode every frame after they leave the screen. The bullets dont auto delete until they're at least 64 pixels outside of the playing field.
« Last Edit: May 08, 2011, 05:37:37 AM by Blargel »
<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.

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 #62 on: May 08, 2011, 05:33:26 AM »
He originally posted it in its own thread, which got merged to this one.

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #63 on: May 08, 2011, 06:55:38 AM »
He originally posted it in its own thread, which got merged to this one.
Still no excuse for not reading the rules, because that should have never happened.

I need to talk with TSO to see if I we can implement some popup for newbie members entering the garage.

Re: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #64 on: May 08, 2011, 07:13:56 AM »
This list thing I found today might help a lot of people  :V

http://en.touhouwiki.net/wiki/Touhou_Danmakufu:_Functions
Hey There !

Blargel

  • RAWR!
  • I'M AN ANGRY LOLI!
<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.

Darkness1

  • Nothing to see here.
  • Enigmatic, isn't it?
Re: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #66 on: May 08, 2011, 08:30:42 AM »
Hi
I'm having a little problem with my simple code that is using a task.

Now, the boss shoot bullets and when those bullets touch the border of the screen, they explode into a circle of other bullets.
You see, that's simple, but something wrong happen : they only explode when they touch the bottom border of the screen.

This is my code
http://pastebin.com/Amq8j5qX

If someone can test my code and tell me what my problem is, it will be really but really appreciate
Thanks

The problem is that your yield is in the if(frame==120){space;. This means that the bullet only "activates" once per 120 frames. Instead put the yield; in the beginning or the end of the mainloop. Lol i was too slow already fixed.

Then just put Obj_Delete(obj); in the loop(nb) parts of the bullet task if you don't want massive circles.

Re: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #67 on: May 08, 2011, 06:09:18 PM »
This list thing I found today might help a lot of people  :V
Read stickies.

KrackoCloud

  • I don't mean to be greedy...
  • ... but white rice is my favorite food.
Re: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #68 on: May 09, 2011, 01:31:51 AM »
http://www.mediafire.com/download.php?gg19aam5c4986xd

So, uh, I'm pretty new at arrays.
I'm trying to get bullets to bounce off of lasers, and it works sometimes... But bullets often bounce once, then pass other lasers before bouncing again.

Re: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #69 on: May 09, 2011, 02:21:12 AM »
Thanks a lot for the help guys, it worked!! :)
you just make my day!!

Re: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #70 on: May 09, 2011, 01:38:43 PM »
I have got little impossible request:

Could somebody explain how to make custom score/graze/something else counter and bars?
« Last Edit: May 09, 2011, 03:16:40 PM by Eyja123 »

Blargel

  • RAWR!
  • I'M AN ANGRY LOLI!
Re: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #71 on: May 09, 2011, 06:55:27 PM »
I have got little impossible request:

Could somebody explain how to make custom score/graze/something else counter and bars?

First you need to know how to use effect objects. If you already know how, then great! Otherwise, you can try reading the Effect Object Tutorial. It's one of the more difficult concepts in Danmakufu to understand so it might take a few read-throughs, experimentation, and a good chunk of time to understand fully.

After you learn effect objects, all you need to do is draw things on layer 8 over on the side after using SetRateScoreSystemEnable(false); to turn off the default scoring system and SetDefaultStatusVisible(false); to turn off the default counters. This is a pretty difficult subject so feel free to ask more questions on this thread as you learn.
<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: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #72 on: May 09, 2011, 07:02:15 PM »
Well... I tried do that, but this is too difficult. There is code script:
Code: [Select]
task ScoreNumber(x,y){
let numberarray=[];
let number0= Obj_Create(OBJ_EFFECT);
let number1 = Obj_Create(OBJ_EFFECT);
let number2 = Obj_Create(OBJ_EFFECT);
let number3 = Obj_Create(OBJ_EFFECT);
let number4 = Obj_Create(OBJ_EFFECT);
let number5 = Obj_Create(OBJ_EFFECT);
let number6 = Obj_Create(OBJ_EFFECT);
let number7 = Obj_Create(OBJ_EFFECT);
let number8 = Obj_Create(OBJ_EFFECT);
let number9 = Obj_Create(OBJ_EFFECT);
numberarray=numberarray~[number0];
numberarray=numberarray~[number1];
numberarray=numberarray~[number2];
numberarray=numberarray~[number3];
numberarray=numberarray~[number4];
numberarray=numberarray~[number5];
numberarray=numberarray~[number6];
numberarray=numberarray~[number7];
numberarray=numberarray~[number8];
numberarray=numberarray~[number9];
       
ascent(i in 1..10){
Obj_SetX(numberarray[i], x);
        Obj_SetY(numberarray[i], y);
ObjEffect_SetTexture(numberarray[i], imgNumber);
ObjEffect_SetLayer(numberarray[i], 8);
ObjEffect_SetPrimitiveType(numberarray[i], PRIMITIVE_TRIANGLEFAN);
ObjEffect_CreateVertex(numberarray[i], 4);
ObjEffect_SetVertexUV(numberarray, 0, 0+16*numberarray[i], 0+16*numberarray[i]);
ObjEffect_SetVertexUV(numberarray, 1, 16+16*numberarray[i], 0+16*numberarray[i]);
ObjEffect_SetVertexUV(numberarray, 2, 16+16*numberarray[i], 16+16*numberarray[i]);
ObjEffect_SetVertexUV(numberarray, 3, 0+16*numberarray[i], 16+16*numberarray[i]);

ObjEffect_SetVertexXY(numberarray[i], 0, -8, -8);
ObjEffect_SetVertexXY(numberarray[i], 1, 8, -8);
ObjEffect_SetVertexXY(numberarray[i], 2, 8, 8);
ObjEffect_SetVertexXY(numberarray[i], 3, -8, 8);
}

yield;
}

I think it's completely bad. That why I asked.

Quote
After you learn effect objects, all you need to do is draw things on layer 8 over on the side after using SetRateScoreSystemEnable(false); to turn off the default scoring system and SetDefaultStatusVisible(false); to turn off the default counters
I have done it earlier.
« Last Edit: May 09, 2011, 07:04:39 PM by Eyja123 »

Blargel

  • RAWR!
  • I'M AN ANGRY LOLI!
Re: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #73 on: May 09, 2011, 11:59:33 PM »
Okay, well now that I have a more concrete idea of what you've been having trouble with, I can help more easily now. I'll try to write this in a tutorial kind of way instead of just giving you pure code in hopes that you learn instead of just coming here every time you need someone to write code for you. I'm also not testing the code as I write this so, lol.

First off, you need to create an effect object for each digit, so decide on how many digits you want to display first. For now, I'm going to go with the assumption that you want 10 digits with no decimal places.
Code: [Select]
task DisplayScore {
    let digits = [];
    loop(10){
        digits = digits ~ [Obj_Create(OBJ_EFFECT)]; // Yes, this is allowed. :V
    }
}

Now we need to make it set up all the initial values of the effects. They're all going to be the same except with different x values so I'll use an ascent for that.
Code: [Select]
task DisplayScore {
    let digits = [];
    loop(10){
        digits = digits ~ [Obj_Create(OBJ_EFFECT)]; // Yes, this is allowed. :V
    }
    ascent(i in 0..10){
        let obj = digits[i]
        Obj_SetPosition(obj, GetClipMaxX+32+16*i, GetClipMinY+32); // I don't know if this is a good position or not. Fiddle around with it for a bit.

        ObjEffect_SetTexture(obj, imgNumber); // Make sure imgNumber is actually defined and that you loaded it.
        ObjEffect_SetLayer(obj, 8); // The rest of this is copied from your post.
        ObjEffect_SetPrimitiveType(obj, PRIMITIVE_TRIANGLEFAN);
        ObjEffect_CreateVertex(obj, 4);
        ObjEffect_SetVertexXY(obj, 0, -8, -8);
        ObjEffect_SetVertexXY(obj, 1, 8, -8);
        ObjEffect_SetVertexXY(obj, 2, 8, 8);
        ObjEffect_SetVertexXY(obj, 3, -8, 8);
    }
}

That's it for the initial set up of the effects. You might have noticed that I didn't set the UV vertices yet. That's because those need to change every time the score changes. We'll handle that in the loop in the task. However, first we need to get the score in a way where we can easily tell what each digit is, this isn't directly related to displaying the score, and since you might need to format other things that need to be displayed on the side screen, let's make a function for that.
Code: [Select]
function FormatNumberString(number, digits){
    // number is the number you want to format, and digits is the number of digits you want to display
    // In the case of the example score counter I'm building right now, I'd use FunctionNumberString(GetScore, 10);
    let str = ToString(number);
    loop(7){
        str = erase(str, length(str)-1); // Erase the last 7 characters of the string because those are the decimals and the decimal point.
    }
    while(length(str) < digits){
        str = "0" ~ str; // If the string is shorter than the amount of digits wanted, add some 0s in the beginning.
    }
    while(length(str) > digits){
        str = erase(str, length(str)-1); // If the string is longer than the amount of digits wanted, remove the digits on the end until it fits. This is how ZUN actually handles this.
    }
    return str;
}

We can now use this function to get a string with digits that match up with the number of effects. The beauty about a string is that it behaves like an array of characters too, so you can do string[0] and it will give you the first character of the string. We can use this to our advantage to look at every digit in a number after converting it into a string like I just did with this function. Now let's get the basic logic out for updating the effects in the score counter.
Code: [Select]
task DisplayScore {
    yield; // Yielding in the beginning because you can't create effect objects in @Initialize, yet I was expecting this task to be called in there.
    let digits = [];
    loop(10){
        digits = digits ~ [Obj_Create(OBJ_EFFECT)]; // Yes, this is allowed. :V
    }
    ascent(i in 0..10){
        let obj = digits[i];
        Obj_SetPosition(obj, GetClipMaxX+32+16*i, GetClipMinY+32); // I don't know if this is a good position or not. Fiddle around with it for a bit.

        ObjEffect_SetTexture(obj, imgNumber); // Make sure imgNumber is actually defined and that you loaded it.
        ObjEffect_SetLayer(obj, 8); // The rest of this is copied from your post.
        ObjEffect_SetPrimitiveType(obj, PRIMITIVE_TRIANGLEFAN);
        ObjEffect_CreateVertex(obj, 4);
        ObjEffect_SetVertexXY(obj, 0, -8, -8);
        ObjEffect_SetVertexXY(obj, 1, 8, -8);
        ObjEffect_SetVertexXY(obj, 2, 8, 8);
        ObjEffect_SetVertexXY(obj, 3, -8, 8);
    }

    loop {
        let score = FormatNumberString(GetScore, 10); // The function I just wrote earlier.
        ascent(i in 0..10){
            let obj = digits[i];
            let number = score[i]-48; // I'm exploiting a strange quirk of Danmakufu here. I'll explain it after this code block. All you need to know for now is that I'm changing the character into a number.
            let offset = number*16;
            ObjEffect_SetVertexUV(obj, 0, 0+offset, 0);   // Add the offset to the x value of all the vertices.
            ObjEffect_SetVertexUV(obj, 1, 16+offset, 0); // It wasn't necessary to add it to the y values as you did in the code in your post.
            ObjEffect_SetVertexUV(obj, 2, 16+offset, 16);
            ObjEffect_SetVertexUV(obj, 3, 0+offset, 16);
        }
        yield; // Don't forget the yield in @MainLoop either!
    }
}

If you looked at the code, you'll definitely have noticed this line: let number = score[i]-48;. This is an exploitation of how Danmakufu stores characters. Let's say, for example, that score was the string "0123456789". In this case, score[0] will return the character '0' (notice the single quotes instead of double... that is how Danmakufu differentiates between strings and characters). However if you attempt to do a mathematical operation on a character, Danmakufu will turn it into its ascii value and use that in the mathematical operation. The ascii values for the characters '0' through '9' are stored as 48 through 57. Therefore, if you subtract 48 from the ascii value of a number's character, it will become the numerical equivalent.

Anyways, so what we have here should be a working score counter now (except for any silly errors I made :V). At this point, you can stop, but there actually are ways to optimize this. If you're interested in the optimization methods I'm thinking of, just let me know, but they probably aren't necessary.
« Last Edit: May 10, 2011, 12:03:49 AM by Blargel »
<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: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #74 on: May 10, 2011, 01:16:50 PM »
Thank you very much. It works.

Darkness1

  • Nothing to see here.
  • Enigmatic, isn't it?
Re: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #75 on: May 10, 2011, 06:47:08 PM »
How do you get a #BackGround similar effect with @BackGround? What i mean is that I'm trying to make a spellcard-background that scrolls upward, but i can't get it to work right :ohdear:.

EDIT: Naut you're a freaking genius!
« Last Edit: May 11, 2011, 05:05:40 PM by Darkness1 »

Re: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #76 on: May 10, 2011, 07:16:11 PM »
let y = 0;

@BackGround{
   SetTexture("texture");
   SetGraphicRect(0, 0 - y, 512, 512 - y);
   DrawGraphic(GetCenterX, GetCenterY);
   y++;
}

Blargel

  • RAWR!
  • I'M AN ANGRY LOLI!
Re: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #77 on: May 10, 2011, 08:46:23 PM »
let y = 0;

@BackGround{
   SetTexture("texture");
   SetGraphicRect(0, 0 - y, 512, 512 - y);
   DrawGraphic(GetCenterX, GetCenterY);
   y++;
}

* Blargel slaps Naut for putting logic inside a drawing loop.
<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: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #78 on: May 10, 2011, 08:46:38 PM »
Hi
Can someone tell me all the properties and function that we can use in an object in a task?
Because I want to know if we can change the width and height of a bullet in a task.
Thank you

Drake

  • *

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

Re: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #80 on: May 10, 2011, 08:51:32 PM »
Thank you so much, I didn't think that a page like that exist
It will help me a lot when I'm coding
Thanks again

Chronojet ⚙ Dragon

  • The Oddity
  • 今コソ輝ケ、我ガ未来、ソノ可能性!!
Re: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #81 on: May 10, 2011, 09:02:06 PM »
Thank you so much, I didn't think that a page like that exist
It will help me a lot when I'm coding
Thanks again

Read stickies.

How many times.....

KrackoCloud

  • I don't mean to be greedy...
  • ... but white rice is my favorite food.
Re: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #82 on: May 10, 2011, 10:39:40 PM »
Posting again because my last post was drowned out by other posts.

I'm new to arrays. I wanted bullets to bounce off of lasers. This works about a third of the time. It will usually bounce once, pass one or two other lasers, then bounce off another, but I want it to be trapped between two lasers.

http://pastebin.com/4SkqwZbD
Any help?

Blargel

  • RAWR!
  • I'M AN ANGRY LOLI!
Re: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #83 on: May 10, 2011, 11:54:15 PM »
I'm pretty sure you have your arrays correct but your bouncing logic incorrect. Changing the angle to 360-ang will only work correctly for bouncing off of horizontal lasers. You need to check the angle of the laser the bullet is bouncing off of and use some sort of math formula to get the new angle.
<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.

KrackoCloud

  • I don't mean to be greedy...
  • ... but white rice is my favorite food.
Re: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #84 on: May 11, 2011, 12:17:32 AM »
Even if I make all the lasers perfectly horizontal, many of the bullets still pass through them easily :/
I don't think it's hitbox detection either, because the same problem still occurs with 50-width lasers.

EDIT: Fixed!
« Last Edit: May 12, 2011, 03:23:41 AM by KrackoCloud »

Darkness1

  • Nothing to see here.
  • Enigmatic, isn't it?
Re: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #85 on: May 11, 2011, 07:58:46 PM »
Super-noob question, how am i supposed to use Iryan's GetLineBorderPoint function (when creating bullets)?

Function link - http://www.shrinemaiden.org/forum/index.php/topic,5164.60.html

Iryan

  • Ph?nglui mglw?nafh
  • Cat R?lyeh wgah?nagl fhtagn.
Re: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #86 on: May 11, 2011, 08:32:28 PM »
Super-noob question, how am i supposed to use Iryan's GetLineBorderPoint function (when creating bullets)?

Function link - http://www.shrinemaiden.org/forum/index.php/topic,5164.60.html
I assume you want to make a laser that spawns bullets wherever it touches the playing field (as that is the main use for this function), yes?

What the function does is you put in the coordinates of the line base and the coordinates of a point it is directed towards, then it returns you the coordinates of where that line crosses the playing field. It returns it in form of an array with two values, [x, y].
The easiest way to handle this would be to create an array at the beginning of the script which you use for short-time storage of these coordinates. You can then call my function to store the values in that array and use the array directly as the parameters in your CreateShot functions.

Let's say the array is named "temparray". You would use the function like this:
Code: [Select]
temparray=GetLineBorderPoint(px, py, tx, ty);
CreateShotA(1, temparray[0], temparray[1], delay);

I hope this was helpful...  :derp:

Edit: Derp, making typing mistakes from not having coded in a long while.  :derp:
« Last Edit: May 11, 2011, 09:04:24 PM by Iryan »
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."

Darkness1

  • Nothing to see here.
  • Enigmatic, isn't it?
Re: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #87 on: May 12, 2011, 05:40:44 AM »
I assume you want to make a laser that spawns bullets wherever it touches the playing field (as that is the main use for this function), yes?

What the function does is you put in the coordinates of the line base and the coordinates of a point it is directed towards, then it returns you the coordinates of where that line crosses the playing field. It returns it in form of an array with two values, [x, y].
The easiest way to handle this would be to create an array at the beginning of the script which you use for short-time storage of these coordinates. You can then call my function to store the values in that array and use the array directly as the parameters in your CreateShot functions.

Let's say the array is named "temparray". You would use the function like this:
Code: [Select]
temparray=GetLineBorderPoint(px, py, tx, ty);
CreateShotA(1, temparray[0], temparray[1], delay);

I hope this was helpful...  :derp:

Edit: Derp, making typing mistakes from not having coded in a long while.  :derp:

This made my day. It actually works, even though i suck at arrays :P. Here's what i was trying to do http://pastebin.com/zUwk2Cqb

Re: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #88 on: May 12, 2011, 08:44:30 PM »
Well, I'm a recent user of Danmakufu (I've had it for two days.)  :V Anyway. I keep getting horrific errors that won't go away. Ever. And if hey do go away, the code dosn't do anything.
So, here it is. Possible epic failure ahead.
Spoiler:

#TouhouDanmakufu
#Title[Spawning Bullets in a Circle]
#Text[Using loop to spawn bullets in a circular pattern.]
#Player[FREE]
#ScriptVersion[2]

script_enemy_main{

   let imgExRumia="script\ExRumia\img\ExRumia.png";
   let frame = 0;
   let angle = 0;
   let speedvar = 40;
   
   @Initialize {
      SetLife(1500);
      SetTimer(60);
      SetInvincibility(30);
      LoadGraphic(imgExRumia); //Load the boss graphic.
      SetMovePosition02(GetCenterX, GetCenterY - 100, 120);
   }
   
   @MainLoop{
   SetCollisionA(GetX, GetY, 32);
   SetCollisionB(GetX, GetY, 16);
   
   if(frame==120){
   loop(36)
      
   CreateShot01(GetX + 60*cos(angle), GetY + 60*sin(angle), 3, angle, WHITE22, 12);
      angle += 360/36;   
      
      
   
   angle += 4;
   speedvar += 5;
   }
   let frame = speedvar;
   frame++
   }

   @DrawLoop{
      //All this foolishness pertains to drawing the boss. Ignore everything in @Drawloop unless you have read and understand Nuclear Cheese's Drawing Tutorial.
      SetColor(255,255,255);
      SetRenderState(ALPHA);
      SetTexture(imgExRumia);
      SetGraphicRect(64,1,127,64);
      DrawGraphic(GetX,GetY);
   }
      
   @Finalize
   {
      DeleteGraphic(imgExRumia);
   }
}
So yeah, I did see the tutorials and I... didn't really get anything that helped aside from what terms to use, I didn't really find a solution. My error message is weird,
---------------------------
ScriptError「C:\Users\Power One\Desktop\th_dnh\th_dnh\script\Loop1-Tutorial(Refuses to work).txt」
---------------------------
一回も代入していない変数を使おうとしました(26行目)

   if(frame==120){

   loop(36) {

      

   CreateShot01(GetX + 60*cos(angle), GetY + 60*sin(angle), 3, angle, WHITE22, 12);

      angle
~~~
---------------------------
OK   
---------------------------
and I have no clue what it means. Moving brackets didn't help. Basically what I want is for the boss to fire circular shots progressively faster and faster.
There's also an intentional logic failure, when frame gets too fast and starts at 120+. I think I put the greater than, but that may have glitched up too. I'm officially stuck, and need some help from people who have done Danmakufu before.

Also, hi people, I'm new here.

Something XutaWoo-y

  • Adorable Weaponsmith
Re: ※ Q&A/Problem Thread 5 ※ for OLD Danmakufu version (0.12m)
« Reply #89 on: May 12, 2011, 09:21:16 PM »
You forgot to put { after loop(36) and } after angle+=360/36;. Loops need to be contained in curly brackets, too