That is really bizarre, but hopefully it won't end up being a huge problem...
Okay, I might as well post it now, so I can deal with whatever is making my script blow itself to pieces.
#TouhouDanmakufu[Player]
#ScriptVersion[2]
#Menu[Yuka Kazami]
#Text[]
#Image[.\yukaimage.png]
#ReplayName[Yuka]
script_player_main {
let ImgPlayer = GetCurrentScriptDirectory()~"pl09.png";
let ImgCutIn = GetCurrentScriptDirectory()~"yuka_cutin.png";
let YukaShotData = GetCurrentScriptDirectory()~"Yuka_Shot.txt";
let bslow = false; //Parameter that defines whether Yuka is in focus or not. Presumably it's a boolean where true is focus and false is not.
let CharAlpha = 255; //Alpha of the character, starts out big.
let bShot = false; //The shot button is being depressed.
let bLeft = false;
let bRight = false;
let bSlow = false;
let drawframe = 0;
let drawnext = 1;
let rect = 1;
//I'll get to more variables later
@Initialize {
LoadGraphic(ImgPlayer);
LoadGraphic(ImgCutIn);
SetRibirthFrame(12);
SetGrazeCircle(45);
SetSpeed(2.9, 1.7);
SetItemCollectLine(150); //May have to change this, I only decreased it because Yuka's so damn slow.
SetPlayerLifeImage(NEED_SOMETHING_HERE);
SetTexture(ImgPlayer);
TMain;
}
@MainLoop {
if(OnBomb){SetItemCollectLine(464);} //Auto-collects all items on screen on bombing.
else{SetItemCollectLine(128);}
SetIntersectionCircle(GetPlayerX, GetPlayerY, 1.5); //May have to change this, might be too small.
yield;
}
/*
@SpellCard {
if(!IsLastSpell){
if(bSlow){
UseSpellCard("TwinSpark");
CutIn(YOUMU, "Yokai Sign "\""Twin Spark"\", ImgCutIn, 0, 0, WIDTH, HEIGHT); //Need the width and the height, here.
}
else{
UseSpellCard("RTrap");
CutIn(YOUMU, "Yokai Sign "\""Raspberry Trap"\", ImgCutIn, 0, 0, WIDTH, HEIGHT); //Need the width and the height here too.
}
}
else{
UseSpellCard("Gensokyo"); //Actual name: Gensokyo, Past and Present
CutIn(YOUMU, "Flower Sign "\""Gensokyo, Past and Present"\", ImgCutIn, 0, 0, WIDTH, HEIGHT);
}
}
*/
@DrawLoop{
if(drawframe%6 == 0){
if(GetKeyState(VK_LEFT)==KEY_PUSH || GetKeyState(VK_RIGHT)==KEY_PUSH){rect = 1;}
if(GetKeyState(VK_LEFT)==KEY_FREE && GetKeyState(VK_RIGHT)==KEY_FREE && drawnext==1){
YukaNull(rect);
rect++;
if(rect==8){rect=1;}
}
if(bLeft && !bRight){
YukaLeft(rect);
rect++;
if(drawnext<=4){drawnext++;}
if(rect>=5){
YukaLeft(rect);
if(rect==8){rect=5;
drawnext=5;}
}}
if(bRight){
YukaRight(rect);
rect++;
if(drawnext<=4){drawnext++;}
if(rect>=5){
YukaRight(rect);
if(rect==8){rect=5;
drawnext=5;}
}
if((GetKeyState(VK_LEFT)==KEY_PULL || GetKeyState(VK_LEFT)==KEY_FREE) && drawnext>1){
YukaLeft(rect);
rect--;
drawnext--;
}
if((GetKeyState(VK_RIGHT)==KEY_PULL || GetKeyState(VK_RIGHT)==KEY_FREE) && drawnext>1){
if(rect!=5){rect=5;}
YukaRight(rect);
rect--;
drawnext--;
}
}//drawframe endbracket
DrawGraphic(GetPlayerX, GetPlayerY);
drawframe++;
}
}
@Finalize {
DeleteGraphic(ImgPlayer);
DeleteGraphic(ImgCutIn);
}
//TASK TIME OHOHOH
task TMain {
TKeyInput; //Task that checks for important movement parameters.
TShot; //Task for shootin's.
yield;
}
task TKeyInput{
let state;
loop {
state = GetKeyState(VK_SHOT);
bShot = (state == KEY_PUSH || state == KEY_HOLD);
state = GetKeyState(VK_LEFT);
bLeft = (state == KEY_PUSH || state == KEY_HOLD);
state = GetKeyState(VK_RIGHT);
bRight = (state == KEY_PUSH || state == KEY_HOLD);
state = GetKeyState(VK_SLOWMOVE);
bSlow = (state == KEY_PUSH || state == KEY_HOLD);
yield;
}
}
task TShot{
if(!bSlow){}
function YukaNull(let nframe){
alternative(nframe)
case(1){SetGraphicRect(0, 0, 32, 48);}
case(2){SetGraphicRect(32, 0, 64, 48);}
case(3){SetGraphicRect(64, 0, 96, 48);}
case(4){SetGraphicRect(96, 0, 128, 48);}
case(5){SetGraphicRect(128, 0, 160, 48);}
case(6){SetGraphicRect(160, 0, 192, 48);}
case(7){SetGraphicRect(192, 0, 224, 48);}
case(8){SetGraphicRect(224, 0, 256, 48);}
}
function YukaLeft(let lframe){
alternative(lframe)
case(1){SetGraphicRect(0, 48, 32, 96);}
case(2){SetGraphicRect(32, 48, 64, 96);}
case(3){SetGraphicRect(64, 48, 96, 96);}
case(4){SetGraphicRect(96, 48, 128, 96);}
case(5){SetGraphicRect(128, 48, 160, 96);}
case(6){SetGraphicRect(160, 48, 192, 96);}
case(7){SetGraphicRect(192, 48, 224, 96);}
case(8){SetGraphicRect(224, 48, 256, 96);}
}
function YukaRight(let rframe){
alternative(rframe)
case(1){SetGraphicRect(0, 96, 32, 144);}
case(2){SetGraphicRect(32, 96, 64, 144);}
case(3){SetGraphicRect(64, 96, 96, 144);}
case(4){SetGraphicRect(96, 96, 128, 144);}
case(5){SetGraphicRect(128, 96, 160, 144);}
case(6){SetGraphicRect(160, 96, 192, 144);}
case(7){SetGraphicRect(192, 96, 224, 144);}
case(8){SetGraphicRect(224, 96, 256, 144);}
//FUCK MY LIFE AAAAHHHHHHH.
}
}
I did in fact call her spellcards later in the script, but they're so fragmentary that it's redundant to insert them. Oh, and that huge drawloop mess is supposed to be animations for Yuka turning one way or another, proceeding through the frames. Obviously I used a spritemap for this.
Basically, the problem is: every time I try to load a stage with this character, some weird blippy nonsense happens, and it reverts back to the stage select screen. ... halp?