Oh boy, so after a few years away from danmakufu I come back to find a new version. I've been playing around with it for a few days, but I have a couple of basic questions:
a) Here is the 'boss defeated' task in the example ExRumiaSpell01 that comes with ph3:
task TEnd
{
while(ObjEnemy_GetInfo(objEnemy, INFO_LIFE) > 0)
{
yield;
}
let ex = ObjMove_GetX(objEnemy);
let ey = ObjMove_GetY(objEnemy);
TExplosionA(ex, ey, 10, 0.6);
DeleteShotAll(TYPE_ALL, TYPE_ITEM);//敵弾を全て削除
Obj_Delete(objEnemy);
loop(30){yield;}
CloseScript(GetOwnScriptID());
}
The problem with it is, during the 30 frames of waiting before the script is closed, any loops that are running will continue running... which is an issue for some cards I've been playing around with to relearn the ropes, because it means that bullets will continue spawning for 30 frames after the boss dies (at 0,0 as it happens, because after the boss object is deleted I guess it defaults a GetX/Y for a non-existant object to 0). I can fix that by removing the 30 frames of waiting and closing the script immediately, but then the cool little explosion animation won't play, because that requires the script to be open. In general, how can you script it so that bullets cease being fired when the boss dies, but there is still time for death animations to occur, without adding an "If (ObjEnemy_GetInfo(objEnemy, INFO_LIFE) > 0)" to every single CreateShot?
If you want a specific example of what I'm talking about; consider the following scenario:
...
@Initialize {
int;
main;
close;
ObjMove_SetDestAtFrame(objBoss, cx, cy, 30);
}
...
task int {
//Boss drawing stuff
}
task main {
loop{
loop(30){yield;}
CreateShotA1(ObjMove_GetX(objBoss),ObjMove_GetY(objBoss),3,90,1,10);
}
}
task close {
//What should I put here so that bullets cease being fired and an explosion animation plays in full when the boss is reduced to 0 life?
}
b) Is there any default/built-in functionality for spell card names and cutins in Ph3, or do you have to code it all yourself now? If you have to do it yourself, does anyone have any cool templates/snipets I can use for it?
c) Is there a good, balanced, generic player script available for ph3? The default one is a bit buggy (deals damage while not firing when holding down shift, for example).