~Hakurei Shrine~ > Rika and Nitori's Garage Experiments
A newbie with a problem
(1/1)
Nuos:
Title says it all, I've read through the beginner tutorial and some of the Intermediate, didn't have any trouble figuring them out after a bit of testing, but I'm still having a reoccurring problem.

The boss sprite wont appear, at all, the hit box is there, but no boss its self. Cut-in's work
without a problem.

It's probably something that I've completely missed somewhere, but I can't figure out what it is.
This is the code I've been using to try to figure the problem out, its more or less parts of the tutorial put together.


--- Code: ---#TouhouDanmakufu
#Title[Wheres the boss?]
#Text[...?]
#Player[FREE]
#ScriptVersion[2]

script_enemy_main {
    let BossImage = "script\img\ExRumia.bmp";
    let frame = 0;
    @Initialize {
        LoadGraphic(BossImage);
        SetLife(100);
        SetDamageRate(10, 10);
        SetTimer(50);
        SetInvincibility(30);
        SetScore(500000);
        SetEnemyMarker(true);
        Concentration01(60);
        Concentration02(60);
        MagicCircle(false);
        SetEffectForZeroLife(180, 100, 1);
SetMovePosition02(GetCenterX, GetCenterY - 100, 120);
    }

    @MainLoop {
        SetCollisionA(GetX, GetY, 32);
        SetCollisionB(GetX, GetY, 24);
frame++;
        if(frame==60){
        CreateShot01(GetX, GetY, 3, GetAngleToPlayer, RED01, 10);
frame = 0;
}
    }

    @DrawLoop {       
    SetTexture(BossImage);
    DrawGraphic(GetX, GetY);

    }

    @Finalize {
    }
}
--- End code ---

Any help at all would be greatly appreciated.
(From the looks of the preview, some of the indenting of the script looks off, but its not actually like that ><)
Henry:
There is an obvious problem there - your script is lacking the CutIn function.
Add this line and everything will be OK.

--- Code: ---CutIn(YOUMU, "Test Sign "\""Test"\", "", 0, 0, 0, 0);
--- End code ---

By the way, please use the thread here to ask questions about Danmakufu.
Naut:
SetGraphicRect(0, 0, 64, 64); in @DrawLoop, inbetween SetTexture and DrawGraphic.

DeleteGraphic(BossImage); in @Finalize.

ExRumia is a .png image, not .bmp.
Nuos:
Yea, I noticed the .bmp problem a little after I posted >< and I did what you both said, and it
worked like a charm, thank you both so much!
Navigation
Message Index

Go to full version