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

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #930 on: May 04, 2013, 09:30:49 PM »
Like I said in IRC, it might just be fine if you define a 3D array of sets of coordinates to pick from.
let lichtcoords = [
   << ARRAYS >>
];
let bundel = lichtcoords[rand_int(0,12)];
ascent(i in 0..8) {
   makelichtbundel(256,768-(bundel[i][0]*+128),-2560+(bundel[i][1]*128),96,25,96);
}
Manual labour but what the heck! I am grateful for the simple solution.

So I worked it out and yes, it works as intended except for the spazzing part because the rand_int being in @BackGround. Need to write this outside the loop in a separate task.

I guess I'll finish that up tomorrow. For now, thanks and bed++

Qwertyzxcv

  • yas
  • k!
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #931 on: May 04, 2013, 09:59:57 PM »
Exactly. But I guess Obj_Obj gives a specific collision defined of the bullets own hitbox. This works perfectly, unless you somehow want a specific hitbox.

If you use only one bullet to collide with, it shouldn't be hard, but since you often want to spawn more than one of those bullets on the screen at once, you have to use ascent and array coding. Basically, you want to create a bullet array, store all the ID's of the bullets (only one of them) once they are created and later delete those ID's out of the array once the bullets are deleted. In the other object bullet, you just have to ascent loop through all the ID's in your array and check the collision between this bullets ID and all other ID's saved in your bullet-ID-array, and it should work.
Oops, forgot to look it up...teehee  :derp: 
Thanks

fondue

  • excuse me
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #932 on: May 04, 2013, 10:01:41 PM »
OK, I've been making a spell card for a while now, and i just got it to work in danmakufu, but the boss dies the second the script starts, and I have no idea why.

Code: [Select]
snip
oh hello there extra bracket
Code: [Select]
script_enemy_main {

   let CSD = GetCurrentScriptDirectory;
   let shot = CSD ~ "ZUNAST.txt";
   let frame = 0;
   let angle = 0;
   
   @Initialize {
      SetLife(1500);
      SetDamageRate(100, 100)
      SetTimer(45);
      SetInvincibility(30);
      SetScore(20000)
      SetMovePosition02(GetCenterX, GetCenterY - 100, 120);
   }

   @MainLoop {
   SetCollisionA(GetX, GetY, 32);
   SetCollisionB(GetX, GetY, 16);
   frame++

   if(frame==120)
     
             loop(36){
            CreateShot01(Get X, Get Y, 2, GetAngleToPlayer, 28, 0);
            angle += 360/36;
   }

   angle = 0;
   frame = 60;

   @DrawLoop {
   }

   @Finalize {
   }
}
}
Fixed~ (I hope, I can't Dnh old verison)
« Last Edit: May 05, 2013, 06:57:21 AM by Naut »

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #933 on: May 04, 2013, 10:07:11 PM »
Always check brackets and ; if your script doesn't work. Then check to see if you have the correct function arguments.

Darkness1

  • Nothing to see here.
  • Enigmatic, isn't it?
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #934 on: May 04, 2013, 10:11:14 PM »
And that is why Notepad++ is great to use for this :3.

Maths ~Angelic Version~

  • Aspiring Mathematician of Brilliant Laziness
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #935 on: May 04, 2013, 10:11:37 PM »
This should work:

Code: [Select]
script_enemy_main {

let CSD = GetCurrentScriptDirectory;
let shot = CSD ~ "ZUNAST.txt";
let frame = 0;
let angle = 0;

@Initialize {
SetLife(1500);
SetDamageRate(100, 100);
SetTimer(45);
SetInvincibility(30);
SetScore(20000);
SetMovePosition02(GetCenterX, GetCenterY - 100, 120);
}

@MainLoop {
SetCollisionA(GetX, GetY, 32);
SetCollisionB(GetX, GetY, 16);
frame++;

if(frame==120)
{
          loop(36){
      CreateShot01(GetX, GetY, 2, GetAngleToPlayer, 28, 0);
      angle += 360/36;
}
angle = 0;
frame = 60;
}

}

@DrawLoop {
}

@Finalize {
}
}
As Sparen said, always check your brackets and semicolons.
Also, the functions "GetX" and "GetY" don't work if you write them as "Get X" and "Get Y" (notice the space).
Edit: Fixed the changing of the variables "angle" and "frame".
« Last Edit: May 04, 2013, 10:13:26 PM by Maths ~Angelic Version~ »

PhantomSong

  • The Ghost Living through Everyday Life.
  • Eh, it doesn't matter.
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #936 on: May 04, 2013, 10:17:36 PM »
OK, I've been making a spell card for a while now, and i just got it to work in danmakufu, but the boss dies the second the script starts, and I have no idea why.

Code: [Select]
snip
Kinda out out of place... but are you using the shotsheet from my PoFV Boss Rush? I know this because ZUN Aya, Shiki, and Tewi = ZUNAST  :derp:
« Last Edit: May 05, 2013, 06:56:59 AM by Naut »

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #937 on: May 04, 2013, 10:44:07 PM »
Kinda out out of place... but are you using the shotsheet from my PoFV Boss Rush? I know this because ZUN Aya, Shiki, and Tewi = ZUNAST  :derp:

@PhantomSong: Please collapse that block of code. You're only interested in one line. Quoting becomes a problem like this...

Zoriri

  • Danmaku Trainee
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #938 on: May 04, 2013, 10:45:08 PM »
Wow, all because of a missing bracket. Well, at least i didn't post here because of a spelling error (which were most of the problems with this).

Kinda out out of place... but are you using the shotsheet from my PoFV Boss Rush? I know this because ZUN Aya, Shiki, and Tewi = ZUNAST  :derp:

Yeah, I was, since it's the only shotsheet I could find with TD arrows. Sorry, should I have asked for permission first? I thought it was one of those shotsheets anyone could use.

PhantomSong

  • The Ghost Living through Everyday Life.
  • Eh, it doesn't matter.
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #939 on: May 04, 2013, 11:12:48 PM »
Wow, all because of a missing bracket. Well, at least i didn't post here because of a spelling error (which were most of the problems with this).

Yeah, I was, since it's the only shotsheet I could find with TD arrows. Sorry, should I have asked for permission first? I thought it was one of those shotsheets anyone could use.
It is~  It doesn't belong to me... I just thought you should rename it... XD Being your script most likely doesn't have Aya, Tewi and Shiki

Zoriri

  • Danmaku Trainee
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #940 on: May 05, 2013, 12:09:18 AM »
It is~  It doesn't belong to me... I just thought you should rename it... XD Being your script most likely doesn't have Aya, Tewi and Shiki

Oh, alright. ^^ Also, how do you use the shotsheet? When I use the defualt graphics, it works fine, but using the shotsheet graphics causes no bullets to appear.

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #941 on: May 05, 2013, 12:25:32 AM »
Oh, alright. ^^ Also, how do you use the shotsheet? When I use the defualt graphics, it works fine, but using the shotsheet graphics causes no bullets to appear.

Post code, explain how you called the shotsheet, and check your directories.

Zoriri

  • Danmaku Trainee
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #942 on: May 05, 2013, 01:22:28 AM »
Post code, explain how you called the shotsheet, and check your directories.

Code: [Select]
script_enemy_main {

let CSD = GetCurrentScriptDirectory;
let shot = CSD ~ "ZUNAST.txt";
let frame = 0;
let angle = 0;

@Initialize {
SetLife(1500);
SetDamageRate(100, 100);
SetTimer(45);
SetInvincibility(30);
SetScore(20000);
SetMovePosition02(GetCenterX, GetCenterY - 100, 120);

LoadUserShotData(shot);
Concentration02(60)
}

@MainLoop {
SetCollisionA(GetX, GetY, 32);
SetCollisionB(GetX, GetY, 16);
frame++;

if(frame==120)
{
           loop(36){
            CreateShot01(GetX, GetY, 2, GetAngleToPlayer, 28, 0);
            angle += 360/36;
               }

          angle = 0;
          frame = 60;
}

}

@DrawLoop {
}

@Finalize {
}
}

I called the shotsheet before @Initialize with "let shot = CSD ~ "ZUNAST.txt";". Then in @Initialize, I called it useing "LoadUserShotData(shot);" Lastly in CreateShot01, I called the bullet id from the shotsheet, 28, in the part where you put the bullet graphic. I looked at scripts that used the same shotsheet for reference, and this is pretty much how they did it.

PhantomSong

  • The Ghost Living through Everyday Life.
  • Eh, it doesn't matter.
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #943 on: May 05, 2013, 02:08:14 AM »
Code: [Select]
snip
I called the shotsheet before @Initialize with "let shot = CSD ~ "ZUNAST.txt";". Then in @Initialize, I called it useing "LoadUserShotData(shot);" Lastly in CreateShot01, I called the bullet id from the shotsheet, 28, in the part where you put the bullet graphic. I looked at scripts that used the same shotsheet for reference, and this is pretty much how they did it.

I think the best thing to note is that the shot sheet had some numbers slashed off and such, but I think 28 were bubbles...?
« Last Edit: May 05, 2013, 06:56:46 AM by Naut »

Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #944 on: May 05, 2013, 03:05:13 AM »
@Zoriri
Does the shot sheet have this at the beginning:
Code: [Select]
ShotImage = ".\ZUNAST"Or what the shot image is called.
I know that some shot sheets don't have that exactly. They have something link "shot_image" which won't make the bullet appear.
Also, have you tried any other bullets, 28 might just be blocked off.
If any of these don't work, can you post the Shot data onto pastebin and link it to us.
Currently a normal player

PhantomSong

  • The Ghost Living through Everyday Life.
  • Eh, it doesn't matter.
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #945 on: May 05, 2013, 03:08:40 AM »
@Zoriri
Does the shot sheet have this at the beginning:
Code: [Select]
ShotImage = ".\ZUNAST"Or what the shot image is called.
I know that some shot sheets don't have that exactly. They have something link "shot_image" which won't make the bullet appear.
Also, have you tried any other bullets, 28 might just be blocked off.
If any of these don't work, can you post the Shot data onto pastebin and link it to us.

Considering he took it straight from my script, it should be working just fine o-o

Darkness1

  • Nothing to see here.
  • Enigmatic, isn't it?
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #946 on: May 05, 2013, 08:44:53 AM »
Since no error came up with danmakufu, with the only problem being no graphics appearing, it's obviously a problem with the directories. I see nothing wrong with the script, so you must have either:
  • Renamed it.
  • Moved it somewhere else.
  • Put it in a folder.
Putting it in a folder is convenient, but needs you to link through the folder first like this:
Code: [Select]
let niceshot = CSD~"\ZUNASTfolder\ZUNAST.txt";Because CSD/GetCurrentScriptDirectory stands for looking in the same folder as your script for the file. So this code would first look in the same folder as your script after the folder named ZUNASTfolder and then find the file named ZUNAST.txt inside the folder.
Also:
Code: [Select]
           loop(36){
            CreateShot01(GetX, GetY, 2, GetAngleToPlayer, 28, 0);
            angle += 360/36;
               }
This doesn't seem like such a good idea.
Spoiler:
I would reccomend  using ascents/descents instead of loops for this kind of thing, but use whatever you prefer really.
:P

Maths ~Angelic Version~

  • Aspiring Mathematician of Brilliant Laziness
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #947 on: May 05, 2013, 09:11:33 AM »
An unrelated problem:
Code: [Select]
           loop(36){
            CreateShot01(GetX, GetY, 2, GetAngleToPlayer, 28, 0);
            angle += 360/36;
               }
This will just spawn 36 bullets that are aimed directly at the player. If you want one of the bullets in a 36-bullet circle to be aimed at the player, you may use this:
Code: [Select]

if(frame==120)
{
         angle=GetAngleToPlayer;

           loop(36){
            CreateShot01(GetX, GetY, 2, angle, 28, 0);
            angle += 360/36;
               }
          frame = 60;
}
« Last Edit: May 05, 2013, 09:15:07 AM by Maths ~Angelic Version~ »

Darkness1

  • Nothing to see here.
  • Enigmatic, isn't it?
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #948 on: May 05, 2013, 09:23:25 AM »
My version then. :P

Code: [Select]
if(frame==120)
{

           ascent(i in 0..36){
            CreateShot01(GetX, GetY, 2, GetAngleToPlayer+i*360/36, 28, 0);
               }
          frame = 60;
}

Zoriri

  • Danmaku Trainee
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #949 on: May 05, 2013, 12:13:35 PM »
Thanks guys for the help, I got it to work.

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #950 on: May 05, 2013, 02:22:33 PM »
Manual labour but what the heck! I am grateful for the simple solution.

So I worked it out and yes, it works as intended except for the spazzing part because the rand_int being in @BackGround. Need to write this outside the loop in a separate task.

I guess I'll finish that up tomorrow. For now, thanks and bed++
I fixed the spazzing. Rays are fading / in out. Except now I am stuck in a logic process which is grinding my mind but nothing useful is coming out of it. Not sure if the Engine is limiting me or I am missing something.

Code da ze: http://pastebin.com/EBsk2yZn

I am spawning the 3D rays inside the @Background. They work. Except to give a more natural feeling, I want to spawn the different rays (in this case three of them) in some kind of delayed / randomized order. Yielding / delaying the @Background is AFAIK not the solution. I tried and the script speeds up. Taking the spawn function outside the @Background isn't an option either. Because DrawGraphic3D must be called in @Background.

I was thinking of spawning all three first then use a rand_int to decide which ray may light up. But since the rays share the same function and handler task, I am clueless and extremely confused. In worst case scenario I have to manually handle each ray separate with alpha values / functions. But that would be overkill unless last resolve.

Edit

Problem solved. Found a workaround in a slightly less efficient way and succeeded.
« Last Edit: May 07, 2013, 08:59:04 PM by Helepolis »

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #951 on: May 05, 2013, 02:29:50 PM »
EDIT: This question has been put aside by creator. It is CLOSED

I have an object effect question.

I want a lifebar, basically. It works in all cases EXCEPT for cases where SetMovePosition is used. GetAngle for the incorrect render is -172 degrees. For graphics in DrawLoop, I use (GetAngle+360)%360 to control the images.

I used the exact same strategy for the lifebar, but it seems that it refuses to work the way it should (the other enemies going at 188 degrees have correct lifebars).

Is this a problem with when tasks are executed in relation to @MainLoop, or is the problem with me?

Normal DrawLoop Code (which works)
Code: [Select]
    SetGraphicRect(19, 17, 41, 41); //Down. Default
    if((GetAngle+360)%360>315||(GetAngle+360)%360<=45){SetGraphicRect(64, 16, 82, 42);} //Rt
    if((GetAngle+720)%360>135&&(GetAngle+720)%360<=225){SetGraphicRect(84, 16, 102, 42);}//Left
    if((GetAngle+360)%360>225&&(GetAngle+360)%360<=315){SetGraphicRect(40, 16, 61, 44);}//Up
The Lifebar task code, which works when SetMovePosition02 is not used but fouls up when it is used.
Code: [Select]
  if((GetAngle+360)%360>135&&(GetAngle+360)%360<=225){
    ObjEffect_SetVertexXY(life,0,(-dimensions[0]-7)*(GetLife/startHP),-3);
            ObjEffect_SetVertexXY(life,1,(dimensions[1]-7)*(GetLife/startHP),-3);
            ObjEffect_SetVertexXY(life,2,(dimensions[1]-7)*(GetLife/startHP),3);
            ObjEffect_SetVertexXY(life,3,(-dimensions[0]-7)*(GetLife/startHP),3);
  }
I already tried substituting +720 degrees instead of +360, and that made no difference.

Edit:

OK. I am using graphics for enemies that are controlled by the stuff in the first box of code. This normalized stuff is what sets the enemy graphics.

I want a lifebar that is centered above the enemies that decreases from both sides as the enemy's health is depleted. That pat is done. However, I have problems trying to center it above the enemy graphics, since using SetMovePosition02, for some inexplicable reason, does not give the same lifebar position. It is either a problem with my code, or something more fundamental with Danmakufu. Worse case scenario, I replace my SetMovePosition02s wit SetSpeed and SetAngle so that I can actually control the stuff.

Currently, the left moving graphic when using SetMovePosition 02 results in a lifebar that is 6 pixels to the left of where it is supposed to be. The problem does not occur with SetAngle.

Using GetAngle on the enemy provided an angle of -172. When normalized with my formula, it should be the same as if I had used SetAngle(188). But it isn't. That's the problem.

EDIT: This question has been put aside by creator. It is CLOSED

@Ozzy: Thanks for all of the attempts to try and fix this, but I think it looks reasonably acceptable now. I'm content with where it is, although some of the lifebars are assymetrical in regards to enemy graphics.
« Last Edit: May 06, 2013, 12:22:32 AM by Sparen »

Flan27

  • I like bullets.
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #952 on: May 08, 2013, 09:39:19 AM »
I've just started getting acquainted with effect objects, and I have a question.  Reading through Nuclear Cheese's tutorial, it talks a lot about 3d, but do you have to code it in 3d even if you only want a 2d object?  I tried making an effect object simply with ObjEffect_SetTexture, but it didn't display anything so I assume something more is necessary.  Do I need to learn about vertices and everything?
I can't think of anything clever to put here.

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #953 on: May 08, 2013, 12:13:59 PM »
I've just started getting acquainted with effect objects, and I have a question.  Reading through Nuclear Cheese's tutorial, it talks a lot about 3d, but do you have to code it in 3d even if you only want a 2d object?  I tried making an effect object simply with ObjEffect_SetTexture, but it didn't display anything so I assume something more is necessary.  Do I need to learn about vertices and everything?
You are mixing 3D drawing and Effect Objects. Effect Objects are used in regular scripts and are 2D drawings. 3D drawing is used for stage construction which only function in Stage scripts inside the @Background loop. Effect Objects are programmed like Object bullets and have their own tasks. Effect objects can be called in stages, so they can be somewhat mixed/combined. Though must be strictly scripted according to their rules.

Effect objects are basically  2D drawn images using vertexes forming triangles and eventually patterns/shapes. So if you simply want a square/rectangular texture, you need to set 4 vertexes (0 to 3)  and define the positioning and their UV for the textures.

Alternatively, if you need more visual example / guidance, I would suggest you my video tutorial
« Last Edit: May 08, 2013, 12:15:40 PM by Helepolis »

Flan27

  • I like bullets.
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #954 on: May 10, 2013, 02:52:07 AM »
Wow, thank you so much!  This all seemed complicated and convoluted at first, but after I watched your video I was actually able to work with it.  These effect objects seem like they can be used in lots of different ways.  I'll have to think some more about how I want to implement them.
I can't think of anything clever to put here.

Flan27

  • I like bullets.
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #955 on: May 12, 2013, 11:34:35 AM »
(Um, sorry for the double post, but) I'm having problems with a couple more things.  I'm trying to make effect objects that stick around even after an enemy or boss disappears.  I've made explosion effects, and also some custom items, but they get deleted along with the boss.  I'm pretty sure I have to have the stage make those effect objects for them to last, but I don't know how to tell the stage when to create them.  How do you go about telling it to create things when a boss or enemy dies?  Or is there something else I'm missing?
« Last Edit: May 12, 2013, 11:42:44 AM by Flan27 »
I can't think of anything clever to put here.

Darkness1

  • Nothing to see here.
  • Enigmatic, isn't it?
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #956 on: May 12, 2013, 02:44:40 PM »
That is a quite tricky one, unless I'm also missing something here :/. I couldn't get it right, so I got around it by delaying the enemies deaths, deleting graphic/hitbox/etc. when they are at, say GetEnemyLife<80. Then start a counter in the mainloop which uses VanishEnemy on the enemy after a certain time has passed. (NOTE: with delete graphic, I may mean in this case; SetAlpha to 0.)

For bosses, you could probably do the same as above (which looks far worse than using this strategy on simple enemies) or you could probably use commondata for storing the boss(es) position, then at the stage use GetEnemyNum to wait until there are no enemies existing and then create it in the stage at the stored X and Y position.


Nevermind that, Helepolis solution is better. For stage enemies Enemy Enumeration should work (if I just knew how to make different enemies spawn different items using this) and with bosses what Hele said (or commondata, which would work if you are using a stage script).
« Last Edit: May 14, 2013, 03:54:06 PM by Darkness1 »

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #957 on: May 14, 2013, 06:58:47 AM »
I think that is way too complicated Darkness1 and also not required. No idea why you're suggesting GetEnemyNum here since that is commonly used to hold the stage script, like during boss fights. I wouldn't fool too much around in the MainLoop nor even try to delay the original scripts since dummy scripts are more flexible and reuse-able when summoned in masses.

Flan27, for bosses what you need to do is create a dummy spell card in the plural. Give it no collisionbox so it cannot get hit. Script your custom explosion effect either in here or as a library included (#include). When the boss "dies" this dummy script will simply show the explosion and finish it off with a VanishEnemy; So it should look like this:

Code: [Select]
@Initialize {
SetLife(1);
finishHer;
}

@MainLoop { yield; }

@DrawLoop { //empty, since the boss is already dead so you dont need to show anything }

function wait(w) { loop(w) { yield; } }

function customExplosion { Effect script } // or outside the script

task finishHer {
yield; // you want to yield once here because dnh doesn't like drawing Effect objects upon Initialize
customExplosion;
wait(80); // just enough to let te explosion effect finish.
VanishEnemy; // done
}

For enemies, script your effect object inside the stage script (or as library called here) and simply parse the X Y position to the custom task/function/effect as parameters. While bosses there is an easy approach as you noticed, for enemies and items being spawned you need to script everything outside the enemy script.

If you want the typical "boss is sliding diagonally" upon death, simply put a SetMovePosition01 before the customExplosion and put another wait(w) as long as you desire. However, you'll need to draw the boss and then perform a DeleteGraphic to make the boss invisible. Or you could warp the boss after the explosion outside the field boundaries. Plenty of simple yet effective solutions available.

Danmakufu 0.12m is all about workarounds.
« Last Edit: May 14, 2013, 07:15:35 AM by Helepolis »

Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #958 on: May 20, 2013, 09:02:10 PM »
I am a beginner at danmakufu and don't know much. I am also a bit too lazy to look at the other 30 or so pages so don't attack me if this has been mentioned, but:
How do I use custom lasers? I am only guessing my way through and it's not working...

Script: http://www.mediafire.com/download/p6v4gtuynzb7pwb/Sariel.rar

(If you click on the download, the script you should be looking at is "0Aa.txt")
« Last Edit: May 20, 2013, 09:07:40 PM by Mr. Hlaaluington »

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 6 ※ for OLD Danmakufu version (0.12m)
« Reply #959 on: May 20, 2013, 09:34:17 PM »
By custom lasers, do you mean Object Lasers or CreateLasers? I haven't checked the code yet, but it's always helpful to know the details about what exactly you are trying to do.