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

Drake

  • *
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #420 on: January 05, 2013, 11:36:16 PM »
Try yielding the Missed loop for the deathbomb period before resetting the type.

Laser: You don't rotate graphics by manually changing their XYs. Just use ObjEffect_SetAngle(obj, 0, 0, z).
« Last Edit: January 05, 2013, 11:39:37 PM by Drake »

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

Byronyello

  • "The Western Non-Otaku That Respects and Likes Touhou"
  • I guess that'd be my title in a Touhou game...
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #421 on: January 06, 2013, 12:12:08 AM »
You can do it without any fancy arrays, but yeah that's it. Each next line in the star is 144 degrees in the circle, so each chord that makes up the star is going to have the same length. There's a way to get the value other ways, but notice the chord from 72 degrees to -72 degrees in the previous picture makes a vertical line, and both are clearly the same distance from the zero-angle/origin. Since sin(72) is the vertical distance from the origin, just double it to get the chord length for the unit circle. Then you can multiply by the radius of the circle.
Because the star begins straight, you only add half the "turning" angle to get your first angle. You can see the turning angle is 144 (but you can figure it out as 360 - 36 + 180).

The code would be like:
Code: [Select]
snipOf course the actual bullets part is missing, but you can do that a few different ways.

That's ace. Thanks!
(Strike-through indicates a clear)
Hard Clears: EoSD, PCB, IN, MoF, SA, UFO, TD, DDC.
Lunatic Clears: Someday, perhaps.
Extra Clears: EoSD, PCB, PCB Phantasm, IN, MoF, SA, UFO, TD, DDC.

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #422 on: January 06, 2013, 12:53:50 AM »
Try yielding the Missed loop for the deathbomb period before resetting the type.

Laser: You don't rotate graphics by manually changing their XYs. Just use ObjEffect_SetAngle(obj, 0, 0, z).

For the first, you mean adding a yield; to the @Missed? The deathbomb time is 1/3 second, and that yield; would technically run MainLoop once, in 1/60 second. Wouldn't that still result in a large margin of error for the bomb?

For the laser, I have an actual laser with no graphic, and I have an effect laser that has the graphic. Do I still use SetVertexXY for the effect laser, or do I just use a ObjEffect_SetAngle? If I only use the latter, Danmakufu has no sense about the scale (which is why I'm using an effect object in the first place).

http://pastebin.com/KtPNwNYU

The current task code is located above. The code is SUPPOSED to create an object laser and its graphic separately. The laser does damage, then is deleted immediately afterwards. Same will eventually happen to the graphic to prevent Danmakufu slowdown, but the results are currently unknown since I wasn't ready to test the unstable version.
« Last Edit: January 06, 2013, 01:05:35 AM by Sparen »

Drake

  • *
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #423 on: January 06, 2013, 03:43:26 AM »
@Missed runs instead of MainLoop when you're hit, until you respawn. By yielding 20 frames and then resetting the type, you've waited through the deathbomb period and change back afterwards. I assume that @Missed ends if you deathbomb.

I'm not sure what you mean with your laser. Sure there's an invisible laser for damage purposes, and setting the XY vertices tells where around the object position to draw in order to make an accurate representation of the image. SetAngle then takes care of turning the graphic if needed. You don't really use the XYs to turn the graphic unless you're warping the image.

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

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #424 on: January 06, 2013, 05:04:50 AM »
...How do you use ObjEffect_SetAngle?

Besides Experimentation, that is. I understand using two angles to form 3D, but I'm not familiar with using 2 different values for a single 2D angle.

Drake

  • *
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #425 on: January 06, 2013, 07:53:21 AM »
That's why I wrote the parameters as (obj, 0, 0, z). You don't touch the x and y angles, just the z-angle.

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

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #426 on: January 06, 2013, 01:43:05 PM »
That's why I wrote the parameters as (obj, 0, 0, z). You don't touch the x and y angles, just the z-angle.

OK. So the plane you are viewing is the Z axis by default for object effects then?

Edit: The following is the current error, with all of the code of the task.

http://i1164.photobucket.com/albums/q570/SparenofIria/ScreenShot2013-01-06at90148AM_zpsc0f50393.png

Here's a breakdown of what Danmakufu does:
-The lasers fire correctly. No surprise there. (or at least I'm assuming they do, since the damage is building up on the DPS monitor)
-The effects don't work AT ALL. In the picture, there are supposed to be no lasers, since the task wasn't even called. Somehow, the task to create the image is being executed, yet it's not actually called. When the call to shoot is actually made, none of the lasers that are supposed to show up actually show up.

Refer to the image in this post for what is SUPPOSED to occur. (although the picture doesn't show the backwards blue lasers)
http://www.shrinemaiden.org/forum/index.php/topic,12397.msg927053.html#msg927053

P.S. The Deathbomb things still didn't work.
Code: [Select]
  @Missed {
    loop(20){yield;}
    SetRebirthFrame(20);
    veetype = 0;
    SetSpeed(3.5,1);
  }

1/7/2013 Edit: I've released the current script here (I decided to change the original image rather than deal with the problems with the effects; I'll have to reread the Effect Object tutorial for everything else). http://www.shrinemaiden.org/forum/index.php/topic,13738.msg933431.html#msg933431
It's hosted on Bulletforge. The death bomb issue is still a factor though.
« Last Edit: January 08, 2013, 12:20:53 AM by Sparen »

Drake

  • *
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #427 on: January 09, 2013, 02:57:33 AM »
I'm not sure why I thought that would work. It doesn't work in the MainLoop because it runs every frame regardless and it's the exact same thing with Missed, so that was a dumb mistake on my part.

One way to do it would be to imitate how tasks interact with the MainLoop: start the designated task at the time you want and let it run its course. The only difference is that it's easy to do this with Initialize, but as far as I can tell you don't have a natural one-time event when you die, you just have the several frames of Missed. (ph3 solves this with Events!)
Instead you can start a task on Initialize that runs per frame and checks if you've died, then runs accordingly. You would also just need a yield in the Missed loop. It would basically be this:
Code: [Select]
task checkdeath{
loop{
if(OnMissed){
loop(GetRebirthFrame+60){yield;}
if(OnMissed){stuff;}
}
yield;
}
}

One way you can get around Missed's several frames is if you make a separate counting variable that goes up during Missed until GetRebirthFrame+60 and then does stuff and then stops working until you die again, but that's a bit roundabout and silly.

Another way is to have a flag variable for dying. Starts as false, you make it true during Missed, then in MainLoop you ask if it's true and if so do things and then reset. Less code, a bit messier in some aspects yet a bit cleaner in others than the first option, and by changing things on the first frame you've respawned it's juuuuust a bit possible that the changes happen too late, I'm not sure.
« Last Edit: January 09, 2013, 03:09:38 AM by Drake »

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

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #428 on: January 09, 2013, 11:25:47 PM »
Okay, a new question, regarding honing player shot bullets.

Code: [Select]
  task Magnahoning(speed, graphic, x, y){ //Based off of the Rumia script that comes with Danmakufu.
    let obj_smallhone = Obj_Create(OBJ_SHOT);
    Obj_SetX(obj_smallhone, x);
    Obj_SetY(obj_smallhone, y);
    Obj_SetSpeed(obj_smallhone, speed);
    ObjShot_SetGraphic(obj_smallhone, graphic);
    ObjShot_SetDamage(obj_smallhone, 2);
    ObjShot_SetPenetration(obj_smallhone, 1);
    while(!Obj_BeDeleted(obj_smallhone)){
      //let toAngle=atan2(GetEnemyY()-Obj_GetY(obj_smallhone), GetEnemyX()-Obj_GetX(obj_smallhone)); //old code
      //Obj_SetAngle(obj_smallhone, toAngle);
      if(GetEnemyNum > 0){ //V1.1 code
let toAngle=atan2(GetEnemyY()-Obj_GetY(obj_smallhone), GetEnemyX()-Obj_GetX(obj_smallhone));
        Obj_SetAngle(obj_smallhone, toAngle);
      }else{
Obj_SetAngle(obj_smallhone, 270);
      }
      yield;
    }
  }

I use this above code, which works fine. Usually. I even went and put the check to see if there's an enemy there. Apparently, that bit of code still messes up now and then, and I need a way to fix it.

I discovered the issue while testing out the ExRumia script that comes with the game, and it occured during the survival spell. Magnamon's bullets all honed in on the target, but since the target could not take any damage, they JUST SAT THERE and lagged Danmakufu. I read the player script tutorial for honing bullets, but this honing hones behind you and I decided that using someone else's script was sort of defeating the purpose of what I was trying to do, since my script is different.

An out of date script (Version 1.8 ) can be found in my code dump (PDDVee). http://www.shrinemaiden.org/forum/index.php/topic,13738.msg933431.html#msg933431 It should exhibit this problem perfectly when on Magnamon during any spell where the enemy is immune to bullets (and the enemy has no graphic, I guess.
« Last Edit: January 11, 2013, 11:20:49 PM by Sparen »

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #429 on: January 11, 2013, 11:17:49 PM »
...And another question, regarding Stage scripts. 
Code: [Select]
  let section1 = GetCurrentScriptDirectory~"Danmaku101Section1.txt";
  let section2 = GetCurrentScriptDirectory~"Danmaku101Section2.txt";
  let music1 = GetCurrentScriptDirectory~"XW26.wav";

  task Stage{
    wait(1); //Required to be here, greater than 0.
    CreateEnemyBossFromFile(section1, GetCenterX, 0, 1.4, 90, 0);
    wait(60);
    CreateEnemyBossFromFile(section2, GetCenterX, 0, 1.4, 90, 0);
    WaitForZeroEnemy;
    wait(180);
    Clear;
  }

The code above is SUPPOSED to call the first section, then call the second section. The issue is that it never does.
Edit: Apparently, not having a "WaitForZeroEnemy" after the first call is the issue. It's solved now.
« Last Edit: January 11, 2013, 11:25:00 PM by Sparen »

Blargel

  • RAWR!
  • I'M AN ANGRY LOLI!
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #430 on: January 12, 2013, 12:41:50 AM »
For your homing bullet problem. Just make it stop homing after a set time and fly off the edge of the screen to be deleted.
<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.

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #431 on: January 12, 2013, 12:59:52 AM »
If I set a variable in the task and decrement it, then the bug will still be present, just hidden slightly. The bullets will still cluster at the site of the "boss."

Also, the only place I've seen the bug having an ugly effect is the ExRumia script. It also occurs while a boss is dying. The bug is attached below.

ExRumia Script bug with PDDVee V2.0
« Last Edit: January 12, 2013, 01:03:17 AM by Sparen »

Blargel

  • RAWR!
  • I'M AN ANGRY LOLI!
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #432 on: January 12, 2013, 03:54:29 AM »
It'll happen any time the boss has no hitbox but still has an id and/or position attached to it. There is no way to check if the boss has a hitbox associated with it in Danmakufu 0.12m so you have to do something to account for this in the bullet's logic. If you don't like my first idea, you can try this instead: if you make it check how close it is to the boss and turns off the homing logic at a close distance, you will have an effect where the shots head towards the boss's position, but passes through them if they don 't have a hitbox.
<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.

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #433 on: January 13, 2013, 07:32:57 PM »
New question: How do you control the acceleration of object bullets?

In my setup, I have a bullet bounce off a wall. I want that bullet to begin accelerating with gravity. All of my attempts have failed so far; I'm not doing the method that is usually accepted. For more specifics, the gravity effect I want is that of Shizuha's midboss spell.

Lunasa Prismriver

  • Poltergeist Violinist
  • Himorogi, Burn in Violet
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #434 on: January 13, 2013, 09:22:29 PM »
New question: How do you control the acceleration of object bullets?

In my setup, I have a bullet bounce off a wall. I want that bullet to begin accelerating with gravity. All of my attempts have failed so far; I'm not doing the method that is usually accepted. For more specifics, the gravity effect I want is that of Shizuha's midboss spell.
I haven't tested the code but I think it should work.
 
Code: [Select]
task AccelerationShot(x,y,startspeed,acceleration,angle,graphic,delay) {
 let ObjShot = Obj_Create(OBJ_SHOT);
 let OldSpeed = startspeed;
   
 Obj_SetPosition(ObjShot,x,y);
 Obj_SetSpeed(ObjShot, startspeed);
 ObjShot_SetBombResist(ObjShot, false);
 ObjShot_SetGraphic(ObjShot, graphic);
 Obj_SetAngle(ObjShot, angle);
 ObjShot_SetDelay(ObjShot, delay);
 while(!Obj_BeDeleted(ObjShot)){
  Obj_SetSpeed(ObjShot, OldSpeed+acceleration);
  OldSpeed = OldSpeed+acceleration;
  yield; 
 }
}
 

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #435 on: January 13, 2013, 09:32:32 PM »
The angle changes as well based on the acceleration. That's my problem.

The issue is that I do not know how to change an angle measure into x and y accelerations and velocities, or how to take an angle and speed and then increment them after they have bounced off of a wall so that they fall like gravity.

Drake

  • *
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #436 on: January 13, 2013, 10:01:48 PM »
Look at a right triangle.

Your getting from point A to point B is length c which is the hypotenuse where the side a is your vertical speed and the side b is your horizontal speed. You can get c of course using the Pythagorean Theorem with c = (a^2 + b^2)^0.5. This is your speed.
If you're going from point A to B, you want to find the angle at A (or θA). Given you already have your XY speeds a and b, you can use them sohcahtoa rules to know tan(θA) = a/b, and so θA =  atan(a/b).

So now that you can simply get your usual vector angle and speed, all you need to do differently is use two separate variables to track/modify x-speed and y-speed instead of keeping an angle and speed. To simulate "gravity" you keep the x-speed constant and just accelerate the y-speed. Of course remember that increasing x means right and decreasing means left, while increasing y means down and decreasing means up.

EDIT: If you're firing the bullet with speed and angle first, then if you look at the triangle again notice you would already have θA and c, so with those you can get the x-speed and y-speed with sohcahtoa again (as you usually see all the time in Danmakufu, really): b = cos(θA)*c and a = sin(θA)*c. So when you bounce, reflect the angle first and then convert to your initial xy speeds.
« Last Edit: January 13, 2013, 10:06:00 PM by Drake »

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

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #437 on: January 13, 2013, 10:37:55 PM »
Still, how would you implement it into the code?

Since Danmakufu 0.12m does not have any way to control the acceleration of object bullets, would I still use Obj_SetSpeed and Obj_SetAngle? The speed would depend on the angle, and the angle would be based off of the trig functions. However, how would you use the existing
Code: [Select]
          xvel = cos(Obj_GetAngle(obj))*Obj_GetSpeed(obj);
          yvel = sin(Obj_GetAngle(obj))*Obj_GetSpeed(obj);
to set the new angle and speed? Since your bullet has reflected off of a wall and now has different Vx, Vy, Ax, Ay, Xcor, Ycor, Angle, etc, Obj_SetPosition becomes too impractical to use.

Drake

  • *
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #438 on: January 14, 2013, 12:13:22 AM »
You keep track of the speed by using two variables, rather than one, and then use those two variables to determine the "actual" vector speed. The difference is that you aren't accelerating the whole speed (both x and y-velocities), just the velocity of one direction (y-velocity). This way your y-acceleration does not affect the x-speed, and so the angle will work as intended. It's just an implementation of CreateShotA_XY with some extra stuff. Hell, you could even do exactly what you want by deleting the bullet on contact with the wall and then using A_XY to make a new one, but you asked how to do it with one object.

Obj_SetPosition fails when you're using bullet graphics like arrowheads and rice that need to turn based on angle, because Set_Position doesn't affect graphic angle. It would be more or less the same as below, but with different calculations.

I pretty much gave you everything you needed. You're supposed to read and try to understand what I wrote and then use it to implement it yourself rather than me just giving you the code, which would have been easier on my part. There's a reason I explain these things. Anyways...

Code: [Select]
let obj = Obj_Create(OBJ_SHOT);
Obj_SetPosition(obj, x, y);
Obj_SetSpeed(obj, s1); //this is initial θA
Obj_SetAngle(obj, a1); //this is initial c
//etc

while(!hitwall){ yield; } //wait until bullet hits wall

let a2 = (180 - a1) % 360; //horizontal reflection
let xvel = cos(a2) * s1; //x-velocity after bounce
let yvel = sin(a2) * s1; //y-velocity after bounce
//note, you don't need a2 anymore

while(!deleted){
Obj_SetSpeed(obj, (xvel^2 + yvel^2)^0.5); //this is your new c
Obj_SetAngle(obj, atan(yvel / xvel)); //this is your new θA
yvel += accel; //increases only y-velocity, hence pseudogravity effect
yield;
}

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

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #439 on: January 14, 2013, 12:28:11 AM »
OK. So you'd use the arc tangent in order to obtain the speeds. That's the part that I was missing. Thanks!

Edit: It half works. Bullets with an angle of <90 or >270 will bounce, then disappear. (angle issue). Bullets with an angle of >225 and <270 will go straight through the roof and will not bounce.

http://pastebin.com/XJTbFpJu
« Last Edit: January 14, 2013, 12:45:44 AM by Sparen »

Drake

  • *
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #440 on: January 14, 2013, 01:46:04 AM »
Your program flow is kind of weird, you have the if bouncecount==0 in the >0 loop and depend on the previous if statements to get it to zero and then immediately set it to -1. I can see potential problems with that. Are you really expecting the bullets to bounce more than once? Also, what do you mean by disappear?

225 hitting the top will be 2*(180-225) = -45 which is clearly not a bounce. 2*(180-270) is -180. So your top-bounce is completely wrong.
It's really just -angle.

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

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #441 on: January 14, 2013, 01:50:10 AM »
Your program flow is kind of weird, you have the if bouncecount==0 in the >0 loop and depend on the previous if statements to get it to zero and then immediately set it to -1. I can see potential problems with that. Are you really expecting the bullets to bounce more than once? Also, what do you mean by disappear?

225 hitting the top will be 2*(180-225) = -45 which is clearly not a bounce. 2*(180-270) is -180. So your top-bounce is completely wrong.
It's really just -angle.

I have it set so that bullets can bounce twice, thrice, etc. I also forgot about Danmakufu actually going from -90 to 90, so that'll be fixed, but I apparently made a stupid error and edited it. The original that I used in NetLogo was similar to Obj_SetAngle(obj, Obj_GetAngle(obj) + (2 * (180 - Obj_GetAngle(obj)))); Also, 2*(180-225) = -90. It confused me while I was retesting the formula I had been using.

By 'disappear' I mean that the bullet just leaves the screen.

EDIT: Problem fixed.
Code: [Select]
if(bouncecount < 0){
  if(xvel>=0){Obj_SetSpeed(obj, (xvel^2+yvel^2)^0.5);}
  if(xvel<0){Obj_SetSpeed(obj, -(xvel^2+yvel^2)^0.5);}
If the bullet is traveling with a negative x velocity, it will turn positive when fed in, and it will not respond correctly.
« Last Edit: January 14, 2013, 02:16:45 AM by Sparen »

Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #442 on: January 14, 2013, 03:05:30 AM »
Me with some questions that can be answered really easily. I must be missing something...

Question 1: You know how I asked how to destroy an enemy upon exiting the game screen? Well... my enemies don't automaticall delete after exiting the screen. I tried
Quote
   
                CreateStream(GetCurrentScriptDirectory ~ "Enemy\Red_Fairy1.txt",GetClipMaxX-100,0,0,0,1,10,20);
      WaitZero(600);
Even though it only takes about 200 frames to exit the screen. (600 is the max amount of time it pauses if there are still enemies)
Here's the function for those who need to see it to makes sense of CreateStream:
Quote
   function CreateStream(filepath,x,y,s,dir,argument,lo,wa){
      loop(lo){
         CreateEnemyFromFile(filepath,x,y,s,dir,argument);
         wait(wa);
      }
    }
Anyways... After all the enemies exit the screen, the games waits another 400 frames, before continuing, the shot SE are also still there. Something's wrong...

Question 2: Simple... The BGM will glitch out about 3 seconds from the end of the song, and won't play the 3 seconds, it immediately loops back to the beginning. Reason?

Edit: Question 3: I'm using the Zun Shots, but why won't the small pellets and small bullets appear for me? They used to work(they still do in my old scripts), but in my newer scripts, they don't seem to show up at all.
« Last Edit: January 14, 2013, 04:05:06 AM by Lavalake »
Currently a normal player

Drake

  • *
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #443 on: January 14, 2013, 05:30:40 AM »
EDIT: Problem fixed. If the bullet is traveling with a negative x velocity, it will turn positive when fed in, and it will not respond correctly.
The problem is actually with the angle then. Even if the bullet is traveling with a negative x velocity, as a vector it should still be positive; the angle is what should be adjusted. If it works it works, but yeah you shouldn't actually have a negative speed there.

Lavalake:
1: Have you tested setting the deletion boundaries so you can see the enemies delete? Are you sure it isn't a problem with WaitZero? Does it pass instantly if you don't spawn the enemies?

2: Danmakufu 0.12 sucks ass with BGM. We had a huge debacle on this a few years ago and there is no solid solution. The main way to get around music problems is just by making a really long music file with your own loops so the one little blip every 5 minutes isn't a big nuisance. You can try playing around with the length by adding silence at the end but you'll never get a good result.

3: That's pretty unspecific. Are you sure the IDs are right? Are the graphic coordinates messed up? Are you testing using something simple like CreateShot01?


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

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #444 on: January 14, 2013, 10:44:29 PM »
Edit: Question 3: I'm using the Zun Shots, but why won't the small pellets and small bullets appear for me? They used to work(they still do in my old scripts), but in my newer scripts, they don't seem to show up at all.

The filepaths are correct, right? At first, some things messed up because certain files are set up to be in a certain folder. Also, are you sure that a stray / wasn't added anywhere in your shot data information? That will mess everything past the first / up.

Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #445 on: January 15, 2013, 01:12:13 AM »
Question 1: WaitZero seems to work really well, I've defeated all the enemies and it instantly skipped the rest of the yields. Setting the boundaries?(Looks through all the tutorials for that.) I don't know the function to do that.  :ohdear:

Question 3: Everything Sparen said, I mad sure was incorrect. Besides, my old script and new script are in the same folder, meaning they share the same folder using the shots. If my old ones load the graphics and hitboxes, why can't the newer ones?

Edit: Question 3: It doesn't work on my older ones now.  Small bullets and small pellets don't appear, and they have no hitboxes.
http://pastebin.com/GEY5rXFg The code up to those two.
« Last Edit: January 19, 2013, 01:35:38 AM by Lavalake »
Currently a normal player

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #446 on: January 19, 2013, 04:33:09 PM »
Edit: Question 3: It doesn't work on my older ones now.  Small bullets and small pellets don't appear, and they have no hitboxes.
http://pastebin.com/GEY5rXFg The code up to those two.

What do you use /* for?

From what I know about the /, it will render the next set of data (until the next /) unusable.

I suggest comparing with the Zun Shotdata that you can get anywhere. Also, I suggest downloading one of your older versions and comparing the two shotdata sheets (the .txt ones). That should show you what you may have done wrong/changed for the worse.

Mythic Lullaby V 0.01 should be good for this (I hope I got the version # right).

If it still doesn't work... upload the current version (upload 0.04, note it as an unstable version/devel version), and then other scripters can scour it for possible errors.
« Last Edit: January 19, 2013, 04:37:07 PM by Sparen »

Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #447 on: January 19, 2013, 07:46:00 PM »
What do you use /* for?

From what I know about the /, it will render the next set of data (until the next /) unusable.

/* and */ was already there when I downloaded the shots. It tells Danmaku which shot to use(Since many shots have the same ID.)
Currently a normal player

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #448 on: January 19, 2013, 07:53:34 PM »
Try deleting those.

Drake

  • *
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #449 on: January 19, 2013, 11:35:03 PM »
asdf

To be completely honest I have no idea why your script doesn't just plain throw you an error, unless you just haven't mentioned it. Block comments are /* */, not */ /*. When you start the script it should give you a tokenizer failure and then not spawn any of the bullets 49 and up.

(also Sparen, / doesn't do anything. // is a line comment and /* */ is a block comment)

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