Author Topic: Danmakufu Q&A/Problem Thread  (Read 172133 times)

Hat

  • Just an unassuming chapeau.
  • I will never be ready.
Re: Danmakufu Q&A/Problem Thread
« Reply #120 on: June 08, 2009, 12:00:29 AM »
I'm not sure what that would amount to, Naut, but I can try... the thing is, she currently lacks any semblance of shot information (I have the shot data already configured, although it was just as a troubleshoot... I only defined one bullet) and bomb info. I wonder why she doesn't show up, though... that's very bizarre.

I'll try to find a method of uploading.

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
« Reply #121 on: June 09, 2009, 04:34:27 AM »
I have a question...

How do you make a spellcard for a player you're creating as a laser, like Marisa's, but using a custom picture, like a .png file that you already have?

Pls answer... thanks in advance...
Danmakufu Script Thread :V Latest Script: Intertwining Mechanical Intervention (temp name)

Yooooouuutuuuubeeee Channel Latest Video: Contest #8 Entry

Stuffman

  • *
  • We're having a ball!
Re: Danmakufu Q&A/Problem Thread
« Reply #122 on: June 09, 2009, 04:58:42 AM »
You make a spell object with that .png as the texture.

Heath Robinson

Re: Danmakufu Q&A/Problem Thread
« Reply #123 on: June 09, 2009, 12:47:12 PM »
@Heath Robinson

Specify what you mean? Scoping...?

I meant this.  In particular I wonder whether sub-routines, functions, and tasks operate inside their own independant scopes, with the alternative being that variables in one or more of these fall under the global namespace.

Stuffman

  • *
  • We're having a ball!
Re: Danmakufu Q&A/Problem Thread
« Reply #124 on: June 09, 2009, 04:40:30 PM »
Yes, they all have their own scopes.

Re: Danmakufu Q&A/Problem Thread
« Reply #125 on: June 09, 2009, 05:22:51 PM »
Code: [Select]
#TouhouDanmakufu
#Title[BROFIST]
#Text[Dodge five bros or you're not a bro]
#BGM[.\Unzan lol.mp3]
#PlayLevel[ULTRA RAPE]
#Player[FREE]
#ScriptVersion[2]

script_enemy_main {
    let frame = 0;
    let count = 0;
    let count2 = 0;
    let direction = 0;
    @Initialize {
SetLife(9001);
        SetTimer(30);
LoadUserShotData(GetCurrentScriptDirectory ~ "shot.txt");
SetShotAutoDeleteClip(500,500,500,500)
    }

    @MainLoop {     
        if(frame==2){
    CreateShot01(60, -300, 50, 90+(1*count), 300, 0);
            CreateShot01(390, -300, 50, 90-(1*count), 300, 0);
    frame = 0;
    count2++;
    if(direction==0){
        count++;
        }
            if(count==5){
        direction = 1;
        count--;
                }
        if(direction==1){
        count--;
        }
            if(count==-5){
        direction = 0;
        count++;
        }
            }
if(count2==5){
    CreateShot01(GetX, -300, 2, GetAngleToPlayer, RED01, 0);
    count2 = 0;
            }
        frame++;
    }

    @DrawLoop {
    }

    @Finalize {
    }

    @BackGround {
    }
}
GetAngleToPlayer seems to be failing in this script. If I move about 1.5 characters to the left or right, the small red shots aim to the other side of me and don't ever come close of hitting...

Nimono

  • wat
Re: Danmakufu Q&A/Problem Thread
« Reply #126 on: June 09, 2009, 06:04:23 PM »
Code: [Select]
#TouhouDanmakufu
#Title[BROFIST]
#Text[Dodge five bros or you're not a bro]
#BGM[.\Unzan lol.mp3]
#PlayLevel[ULTRA RAPE]
#Player[FREE]
#ScriptVersion[2]

script_enemy_main {
    let frame = 0;
    let count = 0;
    let count2 = 0;
    let direction = 0;
    @Initialize {
SetLife(9001);
        SetTimer(30);
LoadUserShotData(GetCurrentScriptDirectory ~ "shot.txt");
SetShotAutoDeleteClip(500,500,500,500)
    }

    @MainLoop {     
        if(frame==2){
    CreateShot01(60, -300, 50, 90+(1*count), 300, 0);
            CreateShot01(390, -300, 50, 90-(1*count), 300, 0);
    frame = 0;
    count2++;
    if(direction==0){
        count++;
        }
            if(count==5){
        direction = 1;
        count--;
                }
        if(direction==1){
        count--;
        }
            if(count==-5){
        direction = 0;
        count++;
        }
            }
if(count2==5){
    CreateShot01(GetX, -300, 2, GetAngleToPlayer, RED01, 0);
    count2 = 0;
            }
        frame++;
    }

    @DrawLoop {
    }

    @Finalize {
    }

    @BackGround {
    }
}
GetAngleToPlayer seems to be failing in this script. If I move about 1.5 characters to the left or right, the small red shots aim to the other side of me and don't ever come close of hitting...

From what I've heard, GetAngleToPlayer gets the angle from the enemy to the player, not the bullet to the player. However, yes, some people have said otherwise. (I, though, feel this script proves that it gets from the enemy.) To fix it, just do atan2(GetPlayerY - *insert the Y location of the bullet here*, GetPlayerX - *insert the X location of the bullet here*) and you have the angle from the bullet to the player!

Re: Danmakufu Q&A/Problem Thread
« Reply #127 on: June 09, 2009, 06:06:57 PM »
From what I've heard, GetAngleToPlayer gets the angle from the enemy to the player, not the bullet to the player. However, yes, some people have said otherwise. (I, though, feel this script proves that it gets from the enemy.) To fix it, just do atan2(GetPlayerY - *insert the Y location of the bullet here*, GetPlayerX - *insert the X location of the bullet here*) and you have the angle from the bullet to the player!
Sweet. Thanks!

Iryan

  • Ph?nglui mglw?nafh
  • Cat R?lyeh wgah?nagl fhtagn.
Re: Danmakufu Q&A/Problem Thread
« Reply #128 on: June 09, 2009, 07:40:29 PM »
For regular bullets, there is another way to make them aim towards the player. That is, the command SetShotDirectionType(PLAYER);. After this command, bullets will have their angle adjusted not towards the right side of the field but towards the player, meaning that any bullet with an angle of 0 will aim towards the player. After you fired the bullet call SetShotDirectionType(ABSOLUTE); to return to the regular way of firing bullets.
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."

Stuffman

  • *
  • We're having a ball!
Re: Danmakufu Q&A/Problem Thread
« Reply #129 on: June 09, 2009, 11:44:25 PM »
SetShotDirectionType(Player) is particularly useful for CreateShotA bullets with multiple steps, as bullets made with it are capable of adjusting the angle to the player dynamically; the angle formula would only shoot it where the player was when the bullet was fired.

Nimono

  • wat
Re: Danmakufu Q&A/Problem Thread
« Reply #130 on: June 12, 2009, 06:03:09 PM »
I have two questions:

1: Given an amount of angles between two points, how can I easily figure out how much I need to increase the angle by to put something directly in the middle of those two points?

Basically, I have a script where many yellow lasers spin around the boss in one direction, while an equal amount of red lasers spin in the other direction. Eventually, they slow down and stop, and they can either be lined up on each other perfectly, or the red lasers will be positioned in between the yellowss. When I had 36 lasers, I increased the angle by 10, and I found that increasing the angles of the red ones by 45 (though it'd probably be better on a smaller amount) got them to be perfectly in the middle of the yellow ones. However, now that I've lowered the laser count to 24 of each color, I find that I need to change the angle for the reds. Problem is, I cannot figure out the "middle angle" here. So, to put my question in another way...

[Angle 135]    o    [Angle 105]

How do I find the middle angle, the "o", given the angles 105 and 135? I KNOW it would come from trigonometry, but sad to say, I never really got to learn that...how sad. (Please don't ask.)

2: I know there's a function that will return the angle of a line between two given points, but how would I go about using that angle and the positions of the points to deduce the distance between said points? Basically, I'm looking to try to see if I could maybe recreate the gravitational pull effect of Utsuho's last spellcard in SA... Not actually wanting to recreate that spellcard, just the effect. I just feel like trying to make a script that has that since it'd be fun to play.

Delpolo

Re: Danmakufu Q&A/Problem Thread
« Reply #131 on: June 12, 2009, 06:33:58 PM »
1: If you have 24 lasers, each laser has 360/24 degrees between each, or 15 degrees. Half of that is 7.5 degrees. (With 36 lasers, you could have increased it by only 5 degrees.) In other words, the middle of two angles is half the angle difference, plus the lower angle ((A2-A1)/2+A1, wher A1 and A2 are the angles).

2: You don't need the angle to calculate the distance between two points. All you need is the X and Y distance between the two points, then use the Pythagorean theorem to get the distance. In other words, "((X1-X2)^2+(Y1-Y2)^2)^0.5" (where X1 and Y1 are the X and Y couple of one point, and X2 and Y2 are for the other point) should work.

Nimono

  • wat
Re: Danmakufu Q&A/Problem Thread
« Reply #132 on: June 12, 2009, 06:54:02 PM »
1: If you have 24 lasers, each laser has 360/24 degrees between each, or 15 degrees. Half of that is 7.5 degrees. (With 36 lasers, you could have increased it by only 5 degrees.) In other words, the middle of two angles is half the angle difference, plus the lower angle ((A2-A1)/2+A1, wher A1 and A2 are the angles).

2: You don't need the angle to calculate the distance between two points. All you need is the X and Y distance between the two points, then use the Pythagorean theorem to get the distance. In other words, "((X1-X2)^2+(Y1-Y2)^2)^0.5" (where X1 and Y1 are the X and Y couple of one point, and X2 and Y2 are for the other point) should work.

1: I tried 7.5, but that honestly didn't make it work. It makes the red lasers hug near the yellow lasers. Thus is my problem. All I'm really doing is this, basically:

Yellow Lasers: variable Angle, which increases by 15 each time a laser is created
Red Lasers: Same as Yellow, but before the lasers are even created, a variable "c" is created and set to "AngleChange[rand_int(0, 5)]". This is AngleChange:

let AngleChange = [7.5, 7.5, 7.5, 7.5, 0, 0];
(The zeroes are so the Red Lasers may line up with the Yellow ones, but most likely WON'T.)

So, the formula for Red Lasers is merely "Angle+c". This worked fine with 36 lasers and c = 45 from AngleChange, but now, it won't put it in between them.

2: Oh geez, Pythagorean Theorem... Thanks, I'll try that. ...but I need the angle, anyways, since I then have to change the X and Y positions of the player according to the angle to the other point! (The distance is only needed for checks to make sure the player doesn't go past the point.)

Delpolo

Re: Danmakufu Q&A/Problem Thread
« Reply #133 on: June 12, 2009, 07:54:15 PM »
For the angle between 2 points, once you have X1-X2 (which would be X3) and Y1-Y2 (or X3), then use "atan2(Y3, X3)" to get the angle (unless they're over each other).

As for the lasers... I'm sorry, but I don't know the problem. You could possibly post the script so that someone else could help, though.

EDIT- Iryan, it's not 12 reds and 12 yellows. He says in his post:
[...]now that I've lowered the laser count to 24 of each color[...]
So it should be 7.5 to add, but if that doesn't work, then it must be something else.
« Last Edit: June 12, 2009, 09:24:19 PM by Delpolo »

Iryan

  • Ph?nglui mglw?nafh
  • Cat R?lyeh wgah?nagl fhtagn.
Re: Danmakufu Q&A/Problem Thread
« Reply #134 on: June 12, 2009, 09:18:32 PM »
24 lasers... do you mean 12 red and 12 yellow ones? In that case the difference has to be 15?.


As for being sucked towards a point at a given speed, well...

v = speed
x, y = point of suckitude

Code: [Select]
angle=atan2(y-GetPlayerY, x-GetPlayerX);
SetPlayerX(GetPlayerX+v*cos(angle));
SetPlayerY(GetPlayerY+v*sin(angle));

That should do the trick.
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."

CK Crash

  • boozer
Re: Danmakufu Q&A/Problem Thread
« Reply #135 on: June 12, 2009, 09:48:44 PM »
1. Is there any particular reason why I can't get CreateEnemyFromScript to work for stage scripts? Or do I just have to make an entirely separate file for my generic enemies and use CreateEnemyFromFile?

2. What would I have to learn in order to make a "background object", like a tree or mountain? I already figured out drawing in 3D, but it would be a pain to do everything with just variables...

3. Can anyone provide me with an example event script? I tried a few times, but it just doesn't work for me :(

Nimono

  • wat
Re: Danmakufu Q&A/Problem Thread
« Reply #136 on: June 12, 2009, 11:09:41 PM »
Okay, here's my code:

Code: [Select]
#TouhouDanmakufu
#Title[Sun Spin]
#Text[]
#Image[]
#BackGround[Default]
#PlayLevel[]
#Player[FREE]
#ScriptVersion[2]

script_enemy_main
{
#include_function "lib\SHOT_REPLACE\shot_replace.dnh"
//let BossImage = GetCurrentScriptDirectory ~ "boss_yukari.png";
//let BossCutIn = GetCurrentScriptDirectory ~ "Yukari.png";
let frame = -60;
let frame2 = -20;
let Angle = 0;
let Angle2 = 0;
//let ShotSFX = "script\sfx\shot.wav";
//let LaserSFX = "script\sfx\laser.wav";
let delay = 80;
let AngleSave = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
let AngleSave2 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
let AngleChange = [7.5, 7.5, 7.5, 7.5, 0, 0];

@Initialize
{
shotinit;
//LoadGraphic(BossImage);
SetLife(1024);
SetDamageRate(10,2);
SetTimer(152);
SetInvincibility(30);
//CutIn(YOUMU, "Sun Spin", BossCutIn, 0, 0, 256, 320);
SetScore(70000);
SetEnemyMarker(true);
MagicCircle(true);
SetMovePosition02(GetCenterX,GetCenterY-100,30);
}

@MainLoop
{
SetCollisionA(GetX(),GetY(),32);
SetCollisionB(GetX(),GetY(),24);
if(frame == 0)
{
let laser = 0;
let i = 0;
let c = AngleChange[rand_int(0, 5)];
loop(24)
{

CreateLaserB(laser, 200, 10, YELLOW01, 150);
SetLaserDataB(laser, 0, 0, 0, 0, 0, 2, Angle, 2);
SetLaserDataB(laser, 460, 0, 0, 0, NULL, 1.5, NULL, 1.5);
SetLaserDataB(laser, 500, 0, 0, 0, NULL, 1, NULL, 1);
SetLaserDataB(laser, 540, 0, 0, 0, NULL, 0.5, NULL, 0.5);
SetLaserDataB(laser, 580, 0, 0, 0, NULL, 0, NULL, 0);
SetShotKillTime(laser, 680);
//PlaySE(LaserSFX);
FireShot(laser);
laser++;
CreateLaserB(laser, 200, 10, RED01, 150);
SetLaserDataB(laser, 0, 0, 0, 0, 0, -2, (Angle+c), -2);
SetLaserDataB(laser, 460, 0, 0, 0, NULL, -1.5, NULL, -1.5);
SetLaserDataB(laser, 500, 0, 0, 0, NULL, -1, NULL, -1);
SetLaserDataB(laser, 540, 0, 0, 0, NULL, -0.5, NULL, -0.5);
SetLaserDataB(laser, 580, 0, 0, 0, NULL, 0, NULL, 0);
SetShotKillTime(laser, 680);
FireShot(laser);
laser++;
AngleSave[i] = Angle;
AngleSave2[i] = (Angle+c);
Angle += 15;
i++;
}
}
if(frame >= 580 && frame < 640)
{
if(frame%5 == 0)
{
let i = 0;
let shot = 0;
let curve = rand(0.5, 1);
loop(24)
{
CreateShotA(shot, GetX, GetY, 25);
SetShotDataA(shot, 0, 6, AngleSave[i], 0, 0, 0, YELLOW05);
SetShotDataA(shot, 10, NULL, NULL, 0, 0, 0, YELLOW05);
SetShotDirectionType(PLAYER);
SetShotDataA(shot, 30, NULL, NULL, 0, -1, 0, YELLOW05);
SetShotDataA(shot, delay, NULL, 0, 0, 0.1, 8, YELLOW05);
FireShot(shot);
shot++;
SetShotDirectionType(ABSOLUTE);
CreateShotA(shot, GetX, GetY, 25);
SetShotDataA(shot, 0, 6, AngleSave2[i], 0, 0, 0, RED05);
SetShotDataA(shot, 10, NULL, NULL, 0, 0, 0, RED05);
SetShotDirectionType(PLAYER);
SetShotDataA(shot, 30, NULL, NULL, 0, -1, 0, RED05);
SetShotDataA(shot, delay, NULL, 0, 0, 0.1, 8, RED05);
FireShot(shot);
SetShotDirectionType(ABSOLUTE);
i++;
}
delay += 20;
}
}
if(frame2 == 0)
{
SetMovePositionRandom01(100, 15, 15, GetCenterX - 130, GetCenterY - 150, GetCenterX + 130, GetCenterY - 35);
frame2 = -20;
}
frame++;
if(frame < 550)
{
frame2++;
}
if(frame == 710)
{
frame = 0;
delay = 80;
}
}

@DrawLoop
{
//SetTexture(BossImage);
//SetGraphicRect(40,33,91,94);
//DrawGraphic(GetX, GetY);
}

@Finalize
{
//DeleteGraphic(BossImage);
}
}

(I commented out all the SFX and graphics-related stuff because I don't really want to upload the same things over and over. It's just annoying.)

I honestly can't see what's wrong here. Also, somehow, the bullets I spawn at the end don't even appear at the right place anymore, though they do when I spawn 36 lasers of each color... (I reduced it to 24 because 72 lasers plus 72 bullets every 5 frames when they appear lags Danmakufu for me...)

Iryan

  • Ph?nglui mglw?nafh
  • Cat R?lyeh wgah?nagl fhtagn.
Re: Danmakufu Q&A/Problem Thread
« Reply #137 on: June 12, 2009, 11:26:08 PM »
Uuuuuh...


The laser sets spin in different directions...

The total angle one set spins is...

(460*2 + 40*1.5 + 40*1 + 40*0.5) = 980 + 60 + 40 + 20 = 1100

As the sets spin in different directions, the difference in the end is 2200. Every full 360 degrees don't matter.
360*6 = 2160; 2200-2160= 40.

Thus, your angle differs by 40 by default. Thus, c has to equal half the difference between two lasers -40. Which, in case of 24 lasers, would be (360/24)/2 -40 =  7.5 -40 = -32.5


...at least I think so.

I cannot test it without restarting the PC, and it is about 2 am over here, so I'm too lazy.  :P
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
« Reply #138 on: June 12, 2009, 11:40:24 PM »
Ah, thanks! That PARTIALLY fixes it... I say "PARTIALLY" because it sometimes goes off-angle...probably due to those 0's I have. (Maybe changing them to 40 would be better?)

Also, I still have a problem with the bullets not shooting at the correct locations! Any idea why?

Iryan

  • Ph?nglui mglw?nafh
  • Cat R?lyeh wgah?nagl fhtagn.
Re: Danmakufu Q&A/Problem Thread
« Reply #139 on: June 12, 2009, 11:45:19 PM »
Ah, thanks! That PARTIALLY fixes it... I say "PARTIALLY" because it sometimes goes off-angle...probably due to those 0's I have. (Maybe changing them to 40 would be better?)
Exactly. Change all zeros to 40.


Quote
Also, I still have a problem with the bullets not shooting at the correct locations! Any idea why?
I don't really know how you want your bullets to behave, but I am pretty certain that whatever you want to achieve would be easier if you attached the bullets to the lasers with AddShot instead.


Well, you say the bullets don't spawn where you want them to? Where do you want them to appear? They all should spawn at GetX/GetY, which is the position of the boss, and nothing about the lasers should be able to change this...
« Last Edit: June 12, 2009, 11:57:20 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."

Nimono

  • wat
Re: Danmakufu Q&A/Problem Thread
« Reply #140 on: June 13, 2009, 12:01:30 AM »
No no, they spawn WHERE I want them to- they just don't SHOOT out AT the ANGLES I want them to, which are the exact angles those lasers are pointing, therefore, they run along the lasers. Also, I kinda hate AddShot when working with multiple shots. I don't think I ever did get it working correctly... Not sure.

Iryan

  • Ph?nglui mglw?nafh
  • Cat R?lyeh wgah?nagl fhtagn.
Re: Danmakufu Q&A/Problem Thread
« Reply #141 on: June 13, 2009, 12:03:30 AM »
Ah, just the angles. Give me a minute...

As I said, the first set of lasers rotates by 1100, the second by -1100 degrees.
The closest multiple of 360? would be 1080.

Thus you have to subtract 20 degrees from the firing angle of the first set of bullets and have to add 20 degrees to the firing angle of the second.
Or possibly the other way round. One of those variants should work. Test it.
« Last Edit: June 13, 2009, 12:06:13 AM 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."

Re: Danmakufu Q&A/Problem Thread
« Reply #142 on: June 13, 2009, 12:15:52 AM »
2: I know there's a function that will return the angle of a line between two given points, but how would I go about using that angle and the positions of the points to deduce the distance between said points? Basically, I'm looking to try to see if I could maybe recreate the gravitational pull effect of Utsuho's last spellcard in SA... Not actually wanting to recreate that spellcard, just the effect. I just feel like trying to make a script that has that since it'd be fun to play.

Utsuho's psuedo-gravity:

      PlayerAngle = atan2(GetCenterY - GetPlayerY, GetCenterX - GetPlayerX); //ANGLE FORMULA!
      PlayerDistance = ((GetPlayerX - GetCenterX)^2 + (GetPlayerY - GetCenterY)^2)^0.5; //DISTANCE FORMULA!
      SetPlayerX(GetCenterX - (PlayerDistance - gravity)*cos(PlayerAngle)); //GRAVITY FOR X!
      SetPlayerY(GetCenterY - (PlayerDistance - gravity)*sin(PlayerAngle)); //GRAVITY FOR Y!

Declare PlayerAngle = 0;, PlayerDistance = 0; and gravity = the distance you want the player to move per frame. The rate at which Utsuho pulls you in at the very start of Subterranean Sun is approximately 0.5 pixels per frame, thus gravity = 0.5;. This gravity code will suck the player towards the center of the screen (GetCenterX, GetCenterY). Replace all of those values for any point you wish the player to move to (like say, GetX, GetY to always move towards the boss). Call those four lines of code every @MainLoop (like SetCollisionA/B).

Hat

  • Just an unassuming chapeau.
  • I will never be ready.
Re: Danmakufu Q&A/Problem Thread
« Reply #143 on: June 13, 2009, 01:08:04 AM »
... if I knew that SetPlayerX/Y existed, that would have made my life SO much easier.

Re: Danmakufu Q&A/Problem Thread
« Reply #144 on: June 13, 2009, 02:02:56 AM »
We hide information from you so that you'll keep coming back here to talk to us :(

Iryan

  • Ph?nglui mglw?nafh
  • Cat R?lyeh wgah?nagl fhtagn.
Re: Danmakufu Q&A/Problem Thread
« Reply #145 on: June 13, 2009, 10:10:54 AM »
@ Pikaguy:

Sorry, I'm stupid. You should change the zeros to - 40 instead of 40.
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."

Hat

  • Just an unassuming chapeau.
  • I will never be ready.
Re: Danmakufu Q&A/Problem Thread
« Reply #146 on: June 13, 2009, 02:02:52 PM »
I actually figured out the answer to my question on my own. Turns out you can't comment out stuff before you define #TouhouDanmakufu. Wewl, I now have just about the prettiest animation script anyone has ever seen. All I need is the shot data and the spellcards and... augh.

Stuffman

  • *
  • We're having a ball!
Re: Danmakufu Q&A/Problem Thread
« Reply #147 on: June 13, 2009, 02:53:56 PM »
So hey I found something out last night and I guess I'll post it here.

As you may or may not have noticed most of the shot definition files people have made for shot_all don't actually include all the bullets, so I was working on a complete one and having trouble getting the dark bullets to work right.

Turns out, in a shot definition script the maximum number of bullets you can have is 255. If you give a shot an ID of more than 255 and try to call it in a script, it will instead call the last bullet defined in the script.

(I can still squeeze all of shot_all into one definition script, just need to change my numbering system.)

So in the unlikely event that you are attempting to make a shot definition script with a shot ID of more than 255...now you know.

Re: Danmakufu Q&A/Problem Thread
« Reply #148 on: June 14, 2009, 03:33:09 AM »
Arg how do I put a spellcard file with a stage file?

Arg stage files in general and confusing the hell out of me
« Last Edit: June 14, 2009, 03:48:19 AM by Suikama »

Re: Danmakufu Q&A/Problem Thread
« Reply #149 on: June 14, 2009, 04:17:54 AM »
Though I've already talked to you about it over MSN, I'll post the link to my "stage tutorial" for anybody else wondering how to create stage files:

http://www.shrinemaiden.org/forum/index.php?topic=382.msg12998#msg12998