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

Shade

  • Narb Overlord
  • There are OVER 9000! Bullets flying on the screen!
Re: Danmakufu Q&A/Problem Thread v3
« Reply #690 on: May 02, 2010, 03:55:32 PM »
Let's see,  Yeah, there's japanese, but it comes out in... boxes.

when I said merged, I meant, I merged all the extractions from each part together.

So I don't need to download font? OK then, but it still doesn't want to run.
I don't have a life, I has thousands! :D

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 v3
« Reply #691 on: May 02, 2010, 04:05:51 PM »
I'm blank then :/
Danmakufu Script Thread :V Latest Script: Intertwining Mechanical Intervention (temp name)

Yooooouuutuuuubeeee Channel Latest Video: Contest #8 Entry

Shade

  • Narb Overlord
  • There are OVER 9000! Bullets flying on the screen!
Re: Danmakufu Q&A/Problem Thread v3
« Reply #692 on: May 02, 2010, 04:08:16 PM »
Aw... :( Eventually it'll be figured out... I hope. :3
I don't have a life, I has thousands! :D

Stuffman

  • *
  • We're having a ball!
Re: Danmakufu Q&A/Problem Thread v3
« Reply #693 on: May 02, 2010, 04:10:52 PM »
You want to use the bottom language option in AppLocale. It won't work otherwise, asian fonts or no. If it still won't work then go ahead and install that East Asian Fonts option, you'll just need to put in your XP disk for a sec.

(To intercept any incoming questions, go to Control Panel -> Regional and Language Options -> Languages tab and check the option.)
« Last Edit: May 02, 2010, 04:12:59 PM by Stuffman »

Shade

  • Narb Overlord
  • There are OVER 9000! Bullets flying on the screen!
Re: Danmakufu Q&A/Problem Thread v3
« Reply #694 on: May 02, 2010, 04:12:37 PM »
Alright, I guess I'll just try all of them at the bottom then, thanks.
I don't have a life, I has thousands! :D

Bitz

  • So Moe!
  • *heart attack*
Re: Danmakufu Q&A/Problem Thread v3
« Reply #695 on: May 02, 2010, 07:36:28 PM »
Hmm, actually, my Danmakufu runs okay without Applocale, aside from showing error messages with blocks and accented vowels. :/

Stuffman

  • *
  • We're having a ball!
Re: Danmakufu Q&A/Problem Thread v3
« Reply #696 on: May 02, 2010, 09:47:11 PM »
It's not entirely certain what causes it to crash, it's just that it does for most people and AppLocale fixes the problem 99% of the time.

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 v3
« Reply #697 on: May 03, 2010, 06:49:17 AM »
In 3D, it would be similar. You would need to specify a 3D point to rotate around, get the 3D distance and the three angles (x, y, and z angles). Then you increment the angles (in different ways likely) while changing the graphic angles the same way as well.

Sorry for bringing this up again... but I seriously can't get it... I've been working on getting this cube rotating 3-ways around 30-60 mins every day, but I still can't figure out how the hell it's done... I can get it to rotate around 1 axis, yes... but after doing the same to another axis and trying to rotate it on both axes at the same time, the entire thing just collapses into the 6 faces... :ohdear:

What I get so far, is that when you rotate it by an axis, the rotation of each axis affects one thing in SetGraphicAngle and 2 things in DrawGraphic3D...
« Last Edit: May 03, 2010, 06:52:06 AM by Kylesky »
Danmakufu Script Thread :V Latest Script: Intertwining Mechanical Intervention (temp name)

Yooooouuutuuuubeeee Channel Latest Video: Contest #8 Entry

Blargel

  • RAWR!
  • I'M AN ANGRY LOLI!
Re: Danmakufu Q&A/Problem Thread v3
« Reply #698 on: May 03, 2010, 08:05:27 AM »
Sorry for bringing this up again... but I seriously can't get it... I've been working on getting this cube rotating 3-ways around 30-60 mins every day, but I still can't figure out how the hell it's done... I can get it to rotate around 1 axis, yes... but after doing the same to another axis and trying to rotate it on both axes at the same time, the entire thing just collapses into the 6 faces... :ohdear:

What I get so far, is that when you rotate it by an axis, the rotation of each axis affects one thing in SetGraphicAngle and 2 things in DrawGraphic3D...

However, due to Danmakufu's terrible 3D engine, the angles happen to come across a phenomenon called gimbal locking where it can't rotate in certain angles under certain conditions. Also, Danmakufu only takes integer values for the SetGraphicAngle function, possibly due to a bug. If you put in a float, it will truncate it which means that if you rotate the graphic slowly, it will be jerky.
Either you didn't read this part or you didn't understand the implications. Danmakufu is unable to freely rotate any graphic in all combinations of angles due to gimbal locking. Danmakufu is utterly not able to do what you want.
<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.

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 v3
« Reply #699 on: May 03, 2010, 08:14:50 AM »
Either you didn't read this part or you didn't understand the implications. Danmakufu is unable to freely rotate any graphic in all combinations of angles due to gimbal locking. Danmakufu is utterly not able to do what you want.

I thought what you meant by that is that danmakufu won't be able to rotate it under certain conditions, like certain angle combinations, etc... I didn't think it meant that danmakufu is not able to do it at all... :ohdear:
Danmakufu Script Thread :V Latest Script: Intertwining Mechanical Intervention (temp name)

Yooooouuutuuuubeeee Channel Latest Video: Contest #8 Entry

Shade

  • Narb Overlord
  • There are OVER 9000! Bullets flying on the screen!
Re: Danmakufu Q&A/Problem Thread v3
« Reply #700 on: May 03, 2010, 08:46:17 PM »
Hey! I finally got it to work. Although, there is a new problem:

There's no music playing! I copied all the music from each file to the bgm file, but still no music! xD Help.

EDIT: Never mind, got it. :P
« Last Edit: May 03, 2010, 10:04:58 PM by Shade »
I don't have a life, I has thousands! :D

Re: Danmakufu Q&A/Problem Thread v3
« Reply #701 on: May 04, 2010, 10:53:39 AM »
I highly doubt the method being described in the thread fails. I am still sensing that you are not actually launching the game using the shortcut created by Applocal. The danmakufu zip from the wiki contains only Ex Rumia afaik. And those always work as the integrity is checked often.

Explain to us step by step what you did and trying to do. Screenshots would be even better along with it.

1. I unzipped the file I got.

2. Used AppLocale with Japanese and created a shortcut.

3. I use the shortcut and I get the error before even seeing the menu. ("th_dnh.exe has encountered a problem...")

(No use posting a screenshot since my PC isn't in English.)


By the way, I'm not getting this problem when I'm NOT using AppLocale, but if I choose anything but 'Directory' I get the error again, or the game just closes. (Both with RumiaEx and Concealed the Conclusion.)

Also, RumiaEx gives the error when I enter the folder using Danmakufu, and CoC sometimes skips boss battles after another kind of strange error.
« Last Edit: May 04, 2010, 10:58:44 AM by nicepianoplayer »

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: Danmakufu Q&A/Problem Thread v3
« Reply #702 on: May 04, 2010, 12:44:31 PM »
1. I unzipped the file I got.
2. Used AppLocale with Japanese and created a shortcut.
3. I use the shortcut and I get the error before even seeing the menu. ("th_dnh.exe has encountered a problem...")

(No use posting a screenshot since my PC isn't in English.)

By the way, I'm not getting this problem when I'm NOT using AppLocale, but if I choose anything but 'Directory' I get the error again, or the game just closes. (Both with RumiaEx and Concealed the Conclusion.)

Also, RumiaEx gives the error when I enter the folder using Danmakufu, and CoC sometimes skips boss battles after another kind of strange error.
I am out of of ideas. If you are using Windows Vista, turning off the UAC (if it is on) Else I have no idea.

Elementoid

  • Having a heated affair with feux-familiars
Re: Danmakufu Q&A/Problem Thread v3
« Reply #703 on: May 05, 2010, 01:41:24 AM »
I am having absolutely no luck with user-made shots. I've been trying to use some of Puremrz's bullets for a while, and have only made marginal progress.

I have:
  • got the image with the shots
  • got the shot definition file, linked back to the image
  • called LoadUserShotData (in initialize), linking back to the shot definition file
  • used the correct number IDs of the shots from the definition file

Somehow, the result of  everything is this (not the pretty butterflies I was hoping for). I have no idea how anything could have messed up the texture coordinates (unless they were wrong all along, for some reason), but I'm at my wits end. Could someone please walk me through exactly what I need to do to get from point A to point B?

Drake

  • *
Re: Danmakufu Q&A/Problem Thread v3
« Reply #704 on: May 05, 2010, 01:46:29 AM »
Looks just like the rects are off. Check 'em manually in Paint or something.

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

Elementoid

  • Having a heated affair with feux-familiars
Re: Danmakufu Q&A/Problem Thread v3
« Reply #705 on: May 05, 2010, 02:26:12 AM »
I tried redownloading all the relevant items again, and the problem is persisting. Could it be that the thing itself has problems?

Re: Danmakufu Q&A/Problem Thread v3
« Reply #706 on: May 05, 2010, 02:36:30 AM »
The Picture of the Shots is wrong, Photobucket resized the image to a different size. I do not have the fixed one, I did at one time, but I deleted it T_T

Re: Danmakufu Intermediate Tutorial
« Reply #707 on: May 05, 2010, 06:18:03 AM »
Hmmm what about those time stopping shots ? Can you help explain ?


[This is not my script]

#TouhouDanmakufu
#Title[Stuff 1]
#Text[A recreation of the spell card I made about a month into Danmakufu-ing.
Requires CtC shot replacement script.]
#Image[]
#BackGround[User(script\img\blank.png, 0, 0)]
#BGM[]
#PlayLevel[?H Easy]
#Player[FREE]
#ScriptVersion[2]

script_enemy_main {
#include_function "lib\SHOT_REPLACE\shot_replace.dnh";
    let frame = -300;
    let time = -300;
    let chargecolour = 255;
    let shotcolourcount = 0;
    let num = 8;
    let anglering = 0;
    let yukariangle = 0;
    let IsTimeStopping = false;
    let imgExRumia = "script\img\ExRumia.png";
    let graphic = [BLUE56, SP03];

    @Initialize {
        shotinit;
        SetLife(15000);
        SetTimer(99);
        SetInvincibility(60);
        SetEnemyMarker(true);

        SetX(GetCenterX);
        SetY(GetClipMinY + 120);

        MagicCircle(false);

        LoadGraphic(imgExRumia);
    }

    @MainLoop {
        yukariangle-=0.05;
        SetCollisionA(GetX, GetY, 36);
        SetCollisionB(GetX, GetY, 10);
        chargecolour = rand(0, 255);
        if(frame == -240) { SetColor(chargecolour, chargecolour, chargecolour); Concentration02(120); }
        anglering += 6;
        if(frame == 1) {
if(!IsTimeStopping) {
        loop (num) {
        CreateShot01(GetX, GetY, 3, anglering, graphic[0], 10);
        anglering += 360/(num);
        }
}
        frame = 0;
        }
        if(time == 300) {
        SetInvincibility(60);
        IsTimeStopping = true;
        TimeStop(250, 1, 1, 1);
        }
        if(time == 330) {
        loop(180) {
        let x = rand(-275, 275); let y = rand(-50, 180);
        CreateShot01(GetX+x, GetY+y, 3, atan2((GetPlayerY)-(GetY+y), (GetPlayerX)-(GetX+x)), graphic[rand_int(1, 1)], 0);
        CreateShot01(GetX+x, GetY+y, 3, atan2((GetPlayerY)-(GetY+y), (GetPlayerX)-(GetX+x))+15, graphic[rand_int(1, 1)], 0);
        CreateShot01(GetX+x, GetY+y, 3, atan2((GetPlayerY)-(GetY+y), (GetPlayerX)-(GetX+x))-15, graphic[rand_int(1, 1)], 0);
        }
        }
        if(time == 360) {
        IsTimeStopping = false;
        time = 0;
        }
        time++;
        if(!IsTimeStopping) { frame++; }
    }

    @DrawLoop {
        SetTexture(imgExRumia);
        SetColor(255, 255, 255);
        SetGraphicAngle(0, 0, 0);
        SetGraphicScale(1, 1);
        SetGraphicRect(0, 0, 63, 63);
        DrawGraphic(GetX, GetY);
    }

    @Finalize {
        DeleteGraphic(imgExRumia);
    }
}

 :3 Or is it somewhere in the tutorial ?
I also don't really understand the

ascent(i in -200..200){

thingy
« Last Edit: May 05, 2010, 07:30:38 AM by Foremoster »
Hey There !

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: Danmakufu Q&A/Problem Thread v3
« Reply #708 on: May 05, 2010, 08:00:51 AM »
Foremoster, for those kind of questions you shouldn't bump up ancient threads. For any help regarding scripts or danmakufu you should post in this thread. Tutorial archive threads are obviously meant for tutorial additions or comments. Not for help.

Re: Danmakufu Q&A/Problem Thread v3
« Reply #709 on: May 05, 2010, 09:39:44 AM »
Got it  :)
Hey There !

Chronojet ⚙ Dragon

  • The Oddity
  • 今コソ輝ケ、我ガ未来、ソノ可能性!!
Re: Danmakufu Intermediate Tutorial
« Reply #710 on: May 05, 2010, 05:01:06 PM »
Hmmm what about those time stopping shots ? Can you help explain ?

[This is not my script]
Code: [Select]
#TouhouDanmakufu
#Title[Stuff 1]
#Text[A recreation of the spell card I made about a month into Danmakufu-ing.
Requires CtC shot replacement script.]
#Image[]
#BackGround[User(script\img\blank.png, 0, 0)]
#BGM[]
#PlayLevel[‡H Easy]
#Player[FREE]
#ScriptVersion[2]

script_enemy_main {
#include_function "lib\SHOT_REPLACE\shot_replace.dnh";
    let frame = -300;
    let time = -300;
    let chargecolour = 255;
    let shotcolourcount = 0;
    let num = 8;
    let anglering = 0;
    let yukariangle = 0;
    let IsTimeStopping = false;
    let imgExRumia = "script\img\ExRumia.png";
    let graphic = [BLUE56, SP03];

    @Initialize {
        shotinit;
        SetLife(15000);
        SetTimer(99);
        SetInvincibility(60);
        SetEnemyMarker(true);

        SetX(GetCenterX);
        SetY(GetClipMinY + 120);

        MagicCircle(false);

        LoadGraphic(imgExRumia);
    }

    @MainLoop {
        yukariangle-=0.05;
        SetCollisionA(GetX, GetY, 36);
        SetCollisionB(GetX, GetY, 10);
        chargecolour = rand(0, 255);
        if(frame == -240) { SetColor(chargecolour, chargecolour, chargecolour); Concentration02(120); }
        anglering += 6;
        if(frame == 1) {
if(!IsTimeStopping) {
        loop (num) {
        CreateShot01(GetX, GetY, 3, anglering, graphic[0], 10);
        anglering += 360/(num);
        }
}
        frame = 0;
        }
        if(time == 300) {
        SetInvincibility(60);
        IsTimeStopping = true;
        TimeStop(250, 1, 1, 1);
        }
        if(time == 330) {
        loop(180) {
        let x = rand(-275, 275); let y = rand(-50, 180);
        CreateShot01(GetX+x, GetY+y, 3, atan2((GetPlayerY)-(GetY+y), (GetPlayerX)-(GetX+x)), graphic[rand_int(1, 1)], 0);
        CreateShot01(GetX+x, GetY+y, 3, atan2((GetPlayerY)-(GetY+y), (GetPlayerX)-(GetX+x))+15, graphic[rand_int(1, 1)], 0);
        CreateShot01(GetX+x, GetY+y, 3, atan2((GetPlayerY)-(GetY+y), (GetPlayerX)-(GetX+x))-15, graphic[rand_int(1, 1)], 0);
        }
        }
        if(time == 360) {
        IsTimeStopping = false;
        time = 0;
        }
        time++;
        if(!IsTimeStopping) { frame++; }
    }

    @DrawLoop {
        SetTexture(imgExRumia);
        SetColor(255, 255, 255);
        SetGraphicAngle(0, 0, 0);
        SetGraphicScale(1, 1);
        SetGraphicRect(0, 0, 63, 63);
        DrawGraphic(GetX, GetY);
    }

    @Finalize {
        DeleteGraphic(imgExRumia);
    }
}
:3 Or is it somewhere in the tutorial ?
I also don't really understand the

ascent(i in -200..200){

thingy
wut that looks like my script? :V
If you want to know how time stopping *works*, then let's look at this:
TimeStop(120*, 1**, 0***, 1****);
* How many frames to stop time (or whatever you like to call it)
** stops the player if true, doesn't if false
*** stops all bullets (if true, not if false)
**** stops the background
also 1 should be true and 0 should be false, but it still works, I guess

ascent(variable in min..max) { stuff; }
it basically means:
let variable = min;
while(variable < max) { stuff; variable++; }

Or something like that.

Sorry if I explained anything incorrectly :V
« Last Edit: May 05, 2010, 05:07:03 PM by ⑨dog »

Re: Danmakufu Q&A/Problem Thread v3
« Reply #711 on: May 05, 2010, 05:08:33 PM »
ascent(variable in min..max)
Pretty much is an extended loop function, used to call multiple things with a different variable
 
ascent(variable in -5..6){
CreateShot01(x,y,3,90+10*variable,RED05,0);
}
 
Would actually create 11 Bullets, because
varialble = [-5,-4,-3,-2,-1,0,1,2,3,4,5,6];
 
But it calls all of the numbers at once.
the example would create bullets that shoot at
40,30,50,60,70,etc. etc.

Iryan

  • Ph?nglui mglw?nafh
  • Cat R?lyeh wgah?nagl fhtagn.
Re: Danmakufu Q&A/Problem Thread v3
« Reply #712 on: May 05, 2010, 05:13:49 PM »
ascent(variable in -5..6){
CreateShot01(x,y,3,90+10*variable,RED05,0);
}
 
Would actually create 11 Bullets, because
varialble = [-5,-4,-3,-2,-1,0,1,2,3,4,5,6];
Actually, ascent excludes the second parameter from the loops, in that case the loop for variable=6.
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 v3
« Reply #713 on: May 06, 2010, 02:02:12 AM »
For the past hour I have been trying to come up with a reflective system, on the center X.
As of now I have the code check for which keys are pressed and act accordingly, but its not really working


Code: [Select]

#TouhouDanmakufu
#Title[Spell 1]
#Text[Spell 1]
#Player[FREE]
#BackGround[User(.\img.png)]
#ScriptVersion[2]


script_enemy_main{
//let BossImg = GetCurrentScriptDirectory~"bossimg.png";


//#include_function "lib\ExpandedShotDatav4\shot_replace.dnh"
let frame = 10;
let acc = 0;
let s1 = 1.5;
let angle = 0;
let  l =60;
let move = 0;
let o = 15;
let n = 12;
let side = 0;
let verticle = GetPlayerY;
let objLaz1=Obj_Create(OBJ_LASER);


task Laser{
      Obj_SetAngle(objLaz1, 90);
      ObjLaser_SetLength(objLaz1, 490);
      ObjLaser_SetWidth(objLaz1, 7);
      ObjShot_SetDelay(objLaz1, 60);
      ObjShot_SetGraphic(objLaz1, WHITE03);
      Obj_SetSpeed(objLaz1, 0);
      Obj_SetY(objLaz1, 0);
      while(Obj_BeDeleted(objLaz1)==false) {
                  Obj_SetX(objLaz1, GetCenterX);
       
            Obj_SetCollisionToObject(objLaz1, true);
            ObjShot_SetBombResist(objLaz1, true);
            yield;
      }
}




    @Initialize {
//SoundLoad;
        //LoadGraphic(BossImg);
SetMovePosition02(GetCenterX, GetCenterY-60, 0);
        SetLife(300);
        SetEnemyMarker(true);
        Concentration01(60);
        Concentration02(60);
        MagicCircle(true);
//ShotInit;
Laser;
//Task;


    }


    @MainLoop {
        SetCollisionA(GetX, GetY, 32);
        SetCollisionB(GetX, GetY, 24); 
        frame+=1;

if(frame%1==0){
//loop(4){
CreateShotA(0,GetCenterX+side,verticle,10);
SetShotDataA(0,0,0,0,0,0,0,RED05);
//SetShotDataA(0,120,0,angle+frame*8,0.03,0.05,3,RED05);
SetShotKillTime(0,200);
angle+=360/4;
FireShot(0);
// }
}


if(GetKeyState(VK_LEFT)==KEY_HOLD)
{
side+=3.5;
}
if(GetKeyState(VK_RIGHT)==KEY_HOLD)
{
side-=3.5;
}


if(GetKeyState(VK_UP)==KEY_HOLD)
{
verticle-=3.5;
}
if(GetKeyState(VK_DOWN)==KEY_HOLD)
{
verticle+=3.5;
}
if(side<14){
side=32;
}
if(verticle<GetClipMinY)
{
verticle=GetClipMinY+1;
}
if(verticle>GetClipMaxY)
{
verticle=GetClipMaxY-1;
}


if(GetPlayerX<GetCenterX)
{


if(side>GetCenterX){side=side-20;}


if(side>GetClipMaxX)
{
side=GetClipMaxX-1;
}
}
if(GetPlayerX<GetCenterX)
{
if(side>GetClipMinX)
{
side=GetClipMinX+1;}


if(side>GetCenterX){side=side+20;}
}
}
@DrawLoop{
DrawText(side,GetCenterX,GetCenterY,25,255);
DrawText(verticle,GetCenterX,GetCenterY-30,25,255);




DrawText(GetPlayerX,GetCenterX,GetCenterY+30,25,255);
DrawText(GetCenterX,GetCenterX,GetCenterY+60,25,255);
/*
SetTexture(BossImg);
SetRenderState(ALPHA); SetAlpha(255);
SetGraphicScale(1.25,1.25);
SetGraphicAngle(0,0,0);
if(int(GetSpeed())==0){SetGraphicRect(0,0,33,63);}
if(GetSpeedX()<0){SetGraphicRect(32,0,69,62);}


if(GetSpeedX()>0){ SetGraphicAngle(180,0,0);
SetGraphicRect(32,0,69,62);}
DrawGraphic(GetX,GetY);
*/
}
@Finalize{
//DeleteGraphic(BossImg);
}
}


Sorry for big code, I was told that my "tabbing" made the code unreadable, hopefully this is better.

Iryan

  • Ph?nglui mglw?nafh
  • Cat R?lyeh wgah?nagl fhtagn.
Re: Danmakufu Q&A/Problem Thread v3
« Reply #714 on: May 06, 2010, 02:47:21 PM »
1. What do you mean with reflective system? Why do you need button input for it? Please explain in sufficcient detail what you are trying to accomplish.

2. The code is still very hard to read since it isn't indented...  :ohdear:
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 v3
« Reply #715 on: May 06, 2010, 11:48:10 PM »
I want to make it so that when the player moves on one side of the screen, like a mirror the same thing happens on the other side, with the Center being the reflective point

Re: Danmakufu Q&A/Problem Thread v3
« Reply #716 on: May 07, 2010, 12:45:02 AM »
Reflecting over the center x (left to right reflection and vice versa):

NewX = (GetCenterX - GetPlayerX) + GetCenterX;
NewY = GetPlayerY;

Reflecting over the center y (top to bottom reflection and vice versa):

NewX = GetPlayerX;
NewY = (GetCenterY - GetPlayerY) + GetCenterY;


Your code is illegible to me in it's current state. So I'll fix it...
Code: [Select]
#TouhouDanmakufu
#Title[Spell 1]
#Text[Spell 1]
#Player[FREE]
#BackGround[User(.\img.png)]
#ScriptVersion[2]


script_enemy_main{
//let BossImg = GetCurrentScriptDirectory~"bossimg.png";


//#include_function "lib\ExpandedShotDatav4\shot_replace.dnh"
let frame = 10;
let acc = 0;
let s1 = 1.5;
let angle = 0;
let  l =60;
let move = 0;
let o = 15;
let n = 12;
let side = 0;
let verticle = GetPlayerY;
let objLaz1=Obj_Create(OBJ_LASER);


task Laser{
Obj_SetAngle(objLaz1, 90);
ObjLaser_SetLength(objLaz1, 490);
ObjLaser_SetWidth(objLaz1, 7);
ObjShot_SetDelay(objLaz1, 60);
ObjShot_SetGraphic(objLaz1, WHITE03);
Obj_SetSpeed(objLaz1, 0);
Obj_SetY(objLaz1, 0);
while(Obj_BeDeleted(objLaz1)==false) {
Obj_SetX(objLaz1, GetCenterX);
Obj_SetCollisionToObject(objLaz1, true);
ObjShot_SetBombResist(objLaz1, true);
yield;
}
}




    @Initialize {
//SoundLoad;
//LoadGraphic(BossImg);
SetMovePosition02(GetCenterX, GetCenterY-60, 0);
SetLife(300);
SetEnemyMarker(true);
Concentration01(60);
Concentration02(60);
MagicCircle(true);
//ShotInit;
Laser;
//Task;
}


    @MainLoop {
        SetCollisionA(GetX, GetY, 32);
        SetCollisionB(GetX, GetY, 24);
        frame+=1;
   
if(frame%1==0){
//loop(4){
CreateShotA(0,GetCenterX+side,verticle,10);
SetShotDataA(0,0,0,0,0,0,0,RED05);
//SetShotDataA(0,120,0,angle+frame*8,0.03,0.05,3,RED05);
SetShotKillTime(0,200);
angle+=360/4;
FireShot(0);
//   }
}

if(GetKeyState(VK_LEFT)==KEY_HOLD){
side+=3.5;
}
if(GetKeyState(VK_RIGHT)==KEY_HOLD){
side-=3.5;
}

if(GetKeyState(VK_UP)==KEY_HOLD){
verticle-=3.5;
}
if(GetKeyState(VK_DOWN)==KEY_HOLD){
verticle+=3.5;
}
if(side<14){
side=32;
}
if(verticle<GetClipMinY){
verticle=GetClipMinY+1;
}
if(verticle>GetClipMaxY){
verticle=GetClipMaxY-1;
}


if(GetPlayerX<GetCenterX){
if(side>GetCenterX){
side=side-20;
}
if(side>GetClipMaxX){
side=GetClipMaxX-1;
}
}

if(GetPlayerX<GetCenterX){
if(side>GetClipMinX){
side=GetClipMinX+1;
}
if(side>GetCenterX){
side=side+20;
}
}
}

@DrawLoop{
DrawText(side,GetCenterX,GetCenterY,25,255);
DrawText(verticle,GetCenterX,GetCenterY-30,25,255);
DrawText(GetPlayerX,GetCenterX,GetCenterY+30,25,255);
DrawText(GetCenterX,GetCenterX,GetCenterY+60,25,255);
/*
SetTexture(BossImg);
SetRenderState(ALPHA); SetAlpha(255);
SetGraphicScale(1.25,1.25);
SetGraphicAngle(0,0,0);
if(int(GetSpeed())==0){
SetGraphicRect(0,0,33,63);
}
if(GetSpeedX()<0){
SetGraphicRect(32,0,69,62);
}
if(GetSpeedX()>0){
SetGraphicAngle(180,0,0);
SetGraphicRect(32,0,69,62);
}
DrawGraphic(GetX,GetY);
*/
}

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

That's your code with it's tabbing fixed. Here's your code with the problem fixed:

Code: [Select]
#TouhouDanmakufu
#Title[Spell 1]
#Text[Spell 1]
#Player[FREE]
#BackGround[User(.\img.png)]
#ScriptVersion[2]


script_enemy_main{
//let BossImg = GetCurrentScriptDirectory~"bossimg.png";


//#include_function "lib\ExpandedShotDatav4\shot_replace.dnh"
let frame = 10;
let angle = 0;
let NewX = GetPlayerX;
let NewY = GetPlayerY;
let objLaz1=Obj_Create(OBJ_LASER);


task Laser{
Obj_SetAngle(objLaz1, 90);
ObjLaser_SetLength(objLaz1, 490);
ObjLaser_SetWidth(objLaz1, 7);
ObjShot_SetDelay(objLaz1, 60);
ObjShot_SetGraphic(objLaz1, WHITE03);
Obj_SetSpeed(objLaz1, 0);
Obj_SetY(objLaz1, 0);
while(Obj_BeDeleted(objLaz1)==false) {
Obj_SetX(objLaz1, GetCenterX);
Obj_SetCollisionToObject(objLaz1, true);
ObjShot_SetBombResist(objLaz1, true);
yield;
}
}




    @Initialize {
//SoundLoad;
//LoadGraphic(BossImg);
SetMovePosition02(GetCenterX, GetCenterY-60, 0);
SetLife(300);
SetEnemyMarker(true);
Concentration01(60);
Concentration02(60);
MagicCircle(true);
//ShotInit;
Laser;
//Task;
}


    @MainLoop {
        SetCollisionA(GetX, GetY, 32);
        SetCollisionB(GetX, GetY, 24);
        frame+=1;
//frame++; <-- ???

NewX = (GetCenterX - GetPlayerX) + GetCenterX;
NewY = GetPlayerY;

//If the remainder of frame divided by one equals zero, do this. Every frame?
if(frame%1==0){
//loop(4){
CreateShotA(0,NewX,NewY,10);
SetShotDataA(0,0,0,0,0,0,0,RED05);
//SetShotDataA(0,120,0,angle+frame*8,0.03,0.05,3,RED05);
SetShotKillTime(0,200);
angle+=360/4;
FireShot(0);
//   }
}

}

@DrawLoop{
/*
SetTexture(BossImg);
SetRenderState(ALPHA); SetAlpha(255);
SetGraphicScale(1.25,1.25);
SetGraphicAngle(0,0,0);
if(int(GetSpeed())==0){
SetGraphicRect(0,0,33,63);
}
if(GetSpeedX()<0){
SetGraphicRect(32,0,69,62);
}
if(GetSpeedX()>0){
SetGraphicAngle(180,0,0);
SetGraphicRect(32,0,69,62);
}
DrawGraphic(GetX,GetY);
*/
}

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

Re: Danmakufu Q&A/Problem Thread v3
« Reply #717 on: May 07, 2010, 01:12:10 AM »
Crap, i find the hardest way around stuff, i feel very smart right now. Thank You




Re: Danmakufu Intermediate Tutorial
« Reply #718 on: May 07, 2010, 05:38:11 PM »
wut that looks like my script? :V
If you want to know how time stopping *works*, then let's look at this:
TimeStop(120*, 1**, 0***, 1****);
* How many frames to stop time (or whatever you like to call it)
** stops the player if true, doesn't if false
*** stops all bullets (if true, not if false)
**** stops the background
also 1 should be true and 0 should be false, but it still works, I guess

ascent(variable in min..max) { stuff; }
it basically means:
let variable = min;
while(variable < max) { stuff; variable++; }

Or something like that.

Sorry if I explained anything incorrectly :V


I Sense Sakuya spell cards in the air
Hey There !

Kylesky

  • *The Unknown*
  • Local Unbalanced Danmakufu Idiot Scripter
    • My useless youtube account... (will be useful in the future *I promise*)
Re: Danmakufu Intermediate Tutorial
« Reply #719 on: May 08, 2010, 02:39:23 AM »

I Sense Sakuya spell cards in the air

Sakuya :V
Danmakufu Script Thread :V Latest Script: Intertwining Mechanical Intervention (temp name)

Yooooouuutuuuubeeee Channel Latest Video: Contest #8 Entry