Author Topic: A newbie with a problem  (Read 4820 times)

Nuos

A newbie with a problem
« on: July 21, 2009, 09:01:08 AM »
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: [Select]
#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 {
    }
}

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

  • The observer
  • Exploring to the new world of Danmaku
Re: A newbie with a problem
« Reply #1 on: July 21, 2009, 01:41:43 PM »
There is an obvious problem there - your script is lacking the CutIn function.
Add this line and everything will be OK.
Code: [Select]
CutIn(YOUMU, "Test Sign "\""Test"\", "", 0, 0, 0, 0);
By the way, please use the thread here to ask questions about Danmakufu.
Old/Forgotten member.

Old Patchouli Project was outdated but new one is in progress.

Re: A newbie with a problem
« Reply #2 on: July 21, 2009, 08:44:08 PM »
SetGraphicRect(0, 0, 64, 64); in @DrawLoop, inbetween SetTexture and DrawGraphic.

DeleteGraphic(BossImage); in @Finalize.

ExRumia is a .png image, not .bmp.

Nuos

Re: A newbie with a problem
« Reply #3 on: July 21, 2009, 11:06:36 PM »
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!