Author Topic: Danmakufu Q&A/Problem thread number 4  (Read 206061 times)

Re: Danmakufu Q&A/Problem thread number 4
« Reply #930 on: April 12, 2011, 06:07:24 PM »
You're following instructions on how to install it on Windows 7. Just double click apploc.msi to install it on Windows XP, don't bother moving it around or anything like that.

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: Danmakufu Q&A/Problem thread number 4
« Reply #931 on: April 12, 2011, 06:55:14 PM »
Do people even read the FAQ thread I wonder. As Applocal thing is like extremely frequently asked.

Like Naut said, stop fooling around with the msi and just install it. XP does not have any UAC-like protection. Unless you are on a computer with administrator restrictions, but I highly doubt that.

touhouplayer

  • Your youngest Touhou Addict!
Re: Danmakufu Q&A/Problem thread number 4
« Reply #932 on: April 13, 2011, 12:24:32 AM »
I made a very simple danmakufu script using CreateLaser01 and CreateShot01.
Was wondering how to manage "SetText" and "#BGM"
Here is my script.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
#TouhouDanmakufu
#Title [Christmas Sign "The Tree and the Ornament"]
#Text [Test Script]
#ScriptVersion [2]

script_enemy_main {
    let imgBoss = "script\img\ExRumia.png";
    let angle = 90;
    let frame = 0;
    @Initialize {
        SetX(GetCenterX);
        SetY(GetClipMinY + 120);
        SetLife(5000);

        LoadGraphic(imgBoss);
        SetTexture(imgBoss);
        SetGraphicRect(0, 0, 63, 63);
    }

    @MainLoop {
        SetCollisionA(GetX, GetY, 24);
        SetCollisionB(GetX, GetY, 24);

        frame++;
        if (frame == 5) {
            CreateLaser01(GetX, GetY, 2, GetAngleToPlayer, 200, 16, GREEN01, 20);
            CreateShot01(GetX, GetY, 1, angle, RED04, 0);
            angle += 2;
            frame = 0;
        }
    }

    @DrawLoop {
        DrawGraphic(GetX, GetY);
    }

    @Finalize {
        DeleteGraphic(imgBoss);
    }
}
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Pls help
(I would Appriciate those who would try to help)
 :P
« Last Edit: April 13, 2011, 12:26:11 AM by touhouplayer »
Touhou Games 4-Ever!

Re: Danmakufu Q&A/Problem thread number 4
« Reply #933 on: April 13, 2011, 12:40:51 AM »
Was wondering how to manage "SetText" and "#BGM"

#BGM goes in the top of your script along with all the other lines that begin with #, in it's bracket you specify the path directory of your background music. If your background music is in the same directory as your script and is called bgm.mp3, it would look like this:

#BGM[.\bgm.mp3]



What do you mean by SetText? DrawText?

DrawText("text goes here", x, y, size, alpha); draws a text string at the x and y coordinates you specify, with the size and transparency you give it (12 is a nice average size for text, and 255 alpha means the text is completely solid, 0 alpha means it's completely invisible). DrawText must be put in @DrawLoop.

touhouplayer

  • Your youngest Touhou Addict!
Re: Danmakufu Q&A/Problem thread number 4
« Reply #934 on: April 13, 2011, 12:53:36 AM »
@Naut:
The #BGM dosen't work.
and forget what i said about SetText...

The Title of the danmaku is what im talking about...(e.g. Impossible Request "Rainbow Danmaku")
Touhou Games 4-Ever!

Chronojet ⚙ Dragon

  • The Oddity
  • 今コソ輝ケ、我ガ未来、ソノ可能性!!
Re: Danmakufu Q&A/Problem thread number 4
« Reply #935 on: April 13, 2011, 01:08:19 AM »
PASTEBIN

What is it about the #BGM? Is the music not playing? There a big pause before the script starts?

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 number 4
« Reply #936 on: April 13, 2011, 01:13:41 AM »
I'm not so sure, but you might have to add quotation marks to the bgm path...

also, for the spell card title, just use the CutIn function:

CutIn(*insert KOUMA or YOUMU*, *insert spell card name as a string*, *insert path to cutin image, leave as 0 if no image*, *insert left, top, right, bottom coordinates of cutin image, leave as 0 if none*);
Danmakufu Script Thread :V Latest Script: Intertwining Mechanical Intervention (temp name)

Yooooouuutuuuubeeee Channel Latest Video: Contest #8 Entry

touhouplayer

  • Your youngest Touhou Addict!
Re: Danmakufu Q&A/Problem thread number 4
« Reply #937 on: April 13, 2011, 05:30:12 AM »
@Mewkyuu:
There isn't a big stop...
It's just that when i play the script, there are no sounds...

@Kylesky
I tried to put
 CutIn(YOUMU,"Christmas Sign"\""Tree and Ornament"\",0,0,200,600);
all i get when i play it is a window saying:
-----------------------------------------------------------------------------------------------------|
Error                                                                                                                              |
CutIn,(17s-U)                                                                                                              |
                                                                                                                                       |
       CutIn(YOUMU,"Christmas Sign"\""Tree and Ornament"\",0,0,200,600);  |
-----------------------------------------------------------------------------------------------------|

Touhou Games 4-Ever!

Chronojet ⚙ Dragon

  • The Oddity
  • 今コソ輝ケ、我ガ未来、ソノ可能性!!
Re: Danmakufu Q&A/Problem thread number 4
« Reply #938 on: April 13, 2011, 05:36:59 AM »
@Mewkyuu:
It's just that when i play the script, there are no sounds...
Check the names and file extensions of your files. They should also be in the right folder.

@Kylesky
-----------------------------------------------------------------------------------------------------|
Error                                                                                                                              |
CutIn,(17s-U)                                                                                                              |
                                                                                                                                       |
       CutIn(YOUMU,"Christmas Sign"\""Tree and Ornament"\",0,0,200,600);  |
-----------------------------------------------------------------------------------------------------|
That shouldn't happen.

touhouplayer

  • Your youngest Touhou Addict!
Re: Danmakufu Q&A/Problem thread number 4
« Reply #939 on: April 13, 2011, 05:58:47 AM »
Here is a picture to the  one where i failed in putting the title of spellcard.
(I Tried again, and slightly different but still error.)

http://a3.sphotos.ak.fbcdn.net/hphotos-ak-snc6/205564_1993664846373_1385971258_32372512_2556099_n.jpg
Touhou Games 4-Ever!

Drake

  • *
Re: Danmakufu Q&A/Problem thread number 4
« Reply #940 on: April 13, 2011, 06:43:53 AM »
Yes it should happen, you're missing a parameter.

CutIn(TYPE,"name","image",L,T,R,B);

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

Atfyntify

  • Danmakufu worshipper
  • I worship Danmakufu
Re: Danmakufu Q&A/Problem thread number 4
« Reply #941 on: April 13, 2011, 06:57:33 AM »
Do people even read the FAQ thread I wonder. As Applocal thing is like extremely frequently asked.

Like Naut said, stop fooling around with the msi and just install it. XP does not have any UAC-like protection. Unless you are on a computer with administrator restrictions, but I highly doubt that.
I actually did read it but I didn't find the FAQ on what happens when I can't open the installer and was interrupt. it says that the error code is 2755.
I CAN'T WAIT FOR TOUHOU 14!

touhouplayer

  • Your youngest Touhou Addict!
Re: Danmakufu Q&A/Problem thread number 4
« Reply #942 on: April 13, 2011, 08:52:39 AM »
Yes it should happen, you're missing a parameter.

CutIn(TYPE,"name","image",L,T,R,B);

Thanks. It Worked!
And now, i got the bgm working!
« Last Edit: April 13, 2011, 09:00:45 AM by touhouplayer »
Touhou Games 4-Ever!

Re: Danmakufu Q&A/Problem thread number 4
« Reply #943 on: April 13, 2011, 06:04:06 PM »
For some reason, danmakufu crashes after the dialogue when I run this script. There is no trouble with the event itself because if I comment it out then it just crashes instantly instead. What could be wrong?

Code: [Select]
script_enemy_main {
//General Variables
    let BossImage = GetCurrentScriptDirectory~"Remilia Scarlet Sprite.png";
let BossStill = [0, 0, 64, 64];
let BossMove = [64, 64, 128, 128];
let BossMusic = GetCurrentScriptDirectory~"BGM_Remilia";

    @Initialize {
        LoadGraphic(BossImage);
LoadMusic(BossMusic);
        SetLife(1);
        SetDamageRate(0, 0);
        MagicCircle(false);
        SetEnemyMarker(true);
CreateEventFromScript("Talk");
    }

    @MainLoop {
        SetCollisionA(GetX, GetY, 24);
if(GetEventStep==1){
PlayMusic(BossMusic);
}
if(OnEvent==false){
SetLife(0);
}
yield;
    }

    @DrawLoop {
DrawText("Boss Name", 36, 30, 12, 225);
if(GetSpeedX>=1){
SetTexture(BossImage);
SetGraphicAngle(0, 0, 0);
SetGraphicRect(BossMove[0], BossMove[1], BossMove[2], BossMove[3]);
DrawGraphic(GetX, GetY);
}else if(GetSpeedX<=-1){
SetTexture(BossImage);
SetGraphicAngle(180, 0, 0);
SetGraphicRect(BossMove[0], BossMove[1], BossMove[2], BossMove[3]);
DrawGraphic(GetX, GetY);
}else{
SetTexture(BossImage);
SetGraphicAngle(0, 0, 0);
SetGraphicRect(BossStill[0], BossStill[1], BossStill[2], BossStill[3]);
DrawGraphic(GetX, GetY);
}
    }

    @Finalize {
       DeleteGraphic(BossImage);
    }
}

script_event Talk{
//General Variables
let CharGraphic = GetCurrentScriptDirectory~"0.png";
let BossGraphic = GetCurrentScriptDirectory~"Remilia Scarlet.png";

@Initialize{
LoadGraphic(CharGraphic);
LoadGraphic(BossGraphic);
}

@MainLoop{
SetChar(LEFT, CharGraphic);
SetGraphicRect(LEFT, 0, 0, 256, 512);
MoveChar(LEFT, BACK);
SetChar(RIGHT, BossGraphic);
SetGraphicRect(RIGHT, 0, 0, 256, 512);
MoveChar(RIGHT, BACK);
TextOutA("You won!");
SetStep(1);
End;
}

@Finalize{
DeleteGraphic(CharGraphic);
DeleteGraphic(BossGraphic);
}
}

PS. Never mind the dialogue, it's just a test.

Atfyntify

  • Danmakufu worshipper
  • I worship Danmakufu
Re: Danmakufu Q&A/Problem thread number 4
« Reply #944 on: April 13, 2011, 08:18:15 PM »
hey err....guys  recently started my own script and I don't know stuff so I just made a test on the background and I FAIL :fail:. all my projects are easy and FAIL with errors. I have 2 projects too but they're also with errors so here's my test:

Code: [Select]
#TouhouDanmakufu
#Title[BG test]
#Text[testing the background abilitie in danmakufu]
#Player[FREE]
#ScriptVersion[2]

script_enemy_main{

        let CSD =  GetCurrentScriptDirctory;

        let bg = CSD ~ "bg\hakureishrine.png";

        @Initialize{
              SetLife(1000)
              SetMovePosition01(GetCenterX,GetCenterY,5);

              mainTask;

        }

        @MainLoop{

        }

        @DrawLoop{

        }

        @Background{
               SetTexture(bg);
               SetRenderState(ALPHA);
               SetAlpha(255);
               SetGraphicRect(0,0,832,539);
               SetGraphicScale(1,1);
               SetGraphicAngle(0,0,0)
               DrawGraphic(GetCenterX,GetCenterY);

        }

        @Finalize{

        }

}

And I kept getting this error:
« Last Edit: April 13, 2011, 08:20:02 PM by Atfyntify »
I CAN'T WAIT FOR TOUHOU 14!

Re: Danmakufu Q&A/Problem thread number 4
« Reply #945 on: April 13, 2011, 08:44:42 PM »
You misspelled directory. Fix that and it will probably work.

Atfyntify

  • Danmakufu worshipper
  • I worship Danmakufu
Re: Danmakufu Q&A/Problem thread number 4
« Reply #946 on: April 14, 2011, 09:58:59 AM »
You misspelled directory. Fix that and it will probably work.
I did correct directory but for some what reason hakureishrine.png keeps getting errors.
I CAN'T WAIT FOR TOUHOU 14!

TheMasterSpark

  • Lunatic lemurialist
Re: Danmakufu Q&A/Problem thread number 4
« Reply #947 on: April 14, 2011, 10:17:47 AM »
I did correct directory but for some what reason hakureishrine.png keeps getting errors.

Does it generate an actual error message or does it just not show up at all? You seem to have left out your LoadGraphic(bg), which means that your background image won't ever exist in DNF's memory. Add it in your @Initialize to set things right.

Stuffman

  • *
  • We're having a ball!
Re: Danmakufu Q&A/Problem thread number 4
« Reply #948 on: April 14, 2011, 10:36:39 AM »
JmLyan - This has me completely stumped, it won't stop crashing no matter what I comment out ???

Anyone else want to take a look at this?

Atfyntify

  • Danmakufu worshipper
  • I worship Danmakufu
Re: Danmakufu Q&A/Problem thread number 4
« Reply #949 on: April 14, 2011, 10:52:31 AM »
Does it generate an actual error message or does it just not show up at all? You seem to have left out your LoadGraphic(bg), which means that your background image won't ever exist in DNF's memory. Add it in your @Initialize to set things right.
I CAN'T WAIT FOR TOUHOU 14!

Re: Danmakufu Q&A/Problem thread number 4
« Reply #950 on: April 14, 2011, 10:54:59 AM »
You have forgotten a semicolon after SetLife(1000).

Atfyntify

  • Danmakufu worshipper
  • I worship Danmakufu
Re: Danmakufu Q&A/Problem thread number 4
« Reply #951 on: April 14, 2011, 11:02:58 AM »
You have forgotten a semicolon after SetLife(1000).
OH! darn it. I always forget semicolons. *_*

Also:
I CAN'T WAIT FOR TOUHOU 14!

TheMasterSpark

  • Lunatic lemurialist
Re: Danmakufu Q&A/Problem thread number 4
« Reply #952 on: April 14, 2011, 11:08:42 AM »
Is there actually a task named mainTask? Please use Pastebin to show us your entire code.

Atfyntify

  • Danmakufu worshipper
  • I worship Danmakufu
Re: Danmakufu Q&A/Problem thread number 4
« Reply #953 on: April 14, 2011, 11:34:56 AM »
Is there actually a task named mainTask? Please use Pastebin to show us your entire code.
like this? http://pastebin.com/bEMCWKQ6
I CAN'T WAIT FOR TOUHOU 14!

Atfyntify

  • Danmakufu worshipper
  • I worship Danmakufu
Re: Danmakufu Q&A/Problem thread number 4
« Reply #954 on: April 14, 2011, 11:41:22 AM »
Is there actually a task named mainTask? Please use Pastebin to show us your entire code.
I CAN'T WAIT FOR TOUHOU 14!

Re: Danmakufu Q&A/Problem thread number 4
« Reply #955 on: April 14, 2011, 11:42:59 AM »
Now you forgot the semicolon on SetGraphicAngle.

TheMasterSpark

  • Lunatic lemurialist
Re: Danmakufu Q&A/Problem thread number 4
« Reply #956 on: April 14, 2011, 11:46:50 AM »
like this? http://pastebin.com/bEMCWKQ6

Yup, just like that. You're calling for the task mainTask to start in your @Initialize, but there's actually nothing named mainTask in your script.

That's an error, mate.  :3

Atfyntify

  • Danmakufu worshipper
  • I worship Danmakufu
Re: Danmakufu Q&A/Problem thread number 4
« Reply #957 on: April 14, 2011, 12:14:16 PM »
Yup, just like that. You're calling for the task mainTask to start in your @Initialize, but there's actually nothing named mainTask in your script.

That's an error, mate.  :3
thanks. but anyway the hakureishrine.png isn't appearing at all! also I didn't put SetTimer(60) you can download my epic FAIL script at: http://bulletforge.org/u/atfyntify/p/one-epic-bg-fail-test/v/1
I CAN'T WAIT FOR TOUHOU 14!

Re: Danmakufu Q&A/Problem thread number 4
« Reply #958 on: April 14, 2011, 12:21:55 PM »
@BackGround only functions in either stage scripts or spellcards.

TheMasterSpark

  • Lunatic lemurialist
Re: Danmakufu Q&A/Problem thread number 4
« Reply #959 on: April 14, 2011, 12:23:57 PM »
Two things:

First, you need to make the G capital in @BackGround. Second, you must put a SetScore(*some number here*) statement in your @Initialize. Like Jm said just now, what you draw in @BackGround doesn't work in non-spellcard attacks - SetScore turns your script into a spellcard attack.