I'm trying to make a stage script, but when I use this script, the boss doesn't appear but the music plays normally. I have checked that the path is correct and WaitForFrames is correctly defined in StageFunctions.dnh. Also, if I use CreateEnemyFromFile in the script, danmakufu crashes. Any idea what could be wrong?
#TouhouDanmakufu[Stage]
#Title[Patchouli Knowledge EX Stage]
#Text[Extra Stage]
#Player[FREE]
#ScriptVersion[2]
script_stage_main{
let StageMusic = "script\Stage BGM\BGM_6-4";
task stage{
PlayMusic(StageMusic);
CreateEnemyBossFromFile("script\Patchouli Knowledge\PatchouliBoss.dnh", GetCenterX, -20, 0, 0, 0);
WaitForFrames(240);
Clear;
}
#include_function "\lib\StageFunctions.dnh";
@Initialize{
LoadMusic(StageMusic);
stage;
}
@MainLoop{
yield;
}
@BackGround{
SetAlpha(255);
SetGraphicScale(1, 1);
SetGraphicAngle(0, 0, 0);
SetViewTo(0, 0, 0);
SetViewFrom(100, 90, 45);
SetFog(100, 300, 0, 0, 0);
}
@Finalize{
DeleteMusic(StageMusic);
}
}