#TouhouDanmakufu
#Title[maxwell - "D-A-N-M-A-K-U"]
#Text[Maxwell gets out his notepad and summons danmaku by simply writing it.]
#ScriptVersion[1]
script_enemy_main {
let D = "script\D.png";
let A = "script\A.png";
let N = "script\N.png";
let M = "script\M.png";
let K = "script\K.png";
let U = "script\U.png";
let count1=0;
let life = 1600;
let crap = 200;
let time = 140;
let l = 0;
let reqmaxX = GetClipMaxX;
let reqminX = GetClipMinY;
let reqmaxY = GetClipMaxY;
let reqminY = GetClipMinY;
let kee = 0;
@Initialize {
SetLife(1600);
SetDamageRate(10, 0);
SetScore(210000);
SetTimer(130);
SetInvincibility( 200 );
LoadGraphic(ImgBoss);
LoadGraphic(D);
LoadGraphic(A);
LoadGraphic(N);
LoadGraphic(M);
LoadGraphic(K);
LoadGraphic(U);
CutIn(KOUMA, "Maxwell "\""D-A-N-M-A-K-U"\", "", 0, 0, 0, 0);
LoadUserShotData("\script\extrabosses_mcxd\images\supershot.txt");
SetMovePosition02(GetCenterX, GetClipMinY + 120, 120);
SetGraphicRect(0, 0, 64, 64);
}
@MainLoop {
if (!OnBomb) {
SetCollisionA(GetX, GetY, 32);
SetCollisionB(GetX, GetY, 16);
}
if (count1 == 150){
kill;
controller;
}
count1++;
time = GetTimer;
life = GetEnemyLife;
yield;
}
@DrawLoop {
if (!OnBomb) {
SetGraphicAngle(0, 0, 0);
SetGraphicRect(0, 0, 44, 50);
SetGraphicScale(1, 1);
}
}
@Finalize {
DeleteGraphic(ImgBoss);
}
task controller(){
loop{
if (l == 0){
if (life < 650){
crap = 170;
l++;
}
}
if (l == 1){
if (life < 500){
crap = 140;
l++;
}
}
if (l == 2){
if (life < 350){
crap = 110;
l++;
}
}
if (time < 20){
if (l != 20){
l = 20;
crap = 70;
}
}
yield;
}
}
task kill(){
let x;
let y;
let a;
loop{
x = rand(GetClipMinX + 100, GetClipMaxX - 100);
y = rand(GetClipMinY + 80, GetClipMinY + 160);
ascent(a in 0..20){
Slowbie((GetClipMaxX-GetClipMinX)*2/14, GetY, 3.5, atan2(GetPlayerY - GetY, GetPlayerX - (GetClipMaxX-GetClipMinX)*2/14)+a*18, 240, 50, 0);
Slowbie((GetClipMaxX-GetClipMinX)*2/14, GetY, 3, atan2(GetPlayerY - GetY, GetPlayerX - (GetClipMaxX-GetClipMinX)*2/14)+9+a*18, 240, 50, 0);
Slowbie((GetClipMaxX-GetClipMinX)*2/14, GetY, 2.5, atan2(GetPlayerY - GetY, GetPlayerX - (GetClipMaxX-GetClipMinX)*2/14)+a*18, 240, 50, 0);
Slowbie((GetClipMaxX-GetClipMinX)*2/14, GetY, 2, atan2(GetPlayerY - GetY, GetPlayerX - (GetClipMaxX-GetClipMinX)*2/14)+9+a*18, 240, 50, 0);
SetTexture(D);
SetGraphicRect( 0, 0, 44, 50 );
DrawGraphic(((GetClipMaxX-GetClipMinX)*2/14), GetClipMinX + 95);
}
if (GetLife<1400){
ascent(a in 0..100){
Slowbie((GetClipMaxX-GetClipMinX)*4/14, GetY, rand(1, 3), rand(0, 360), 46, 50, 0);
SetTexture(A);
DrawGraphic(((GetClipMaxX-GetClipMinX)*4/14), GetClipMinX + 95);
SetGraphicRect( 0, 0, 44, 50 );
}
}
if (GetLife<1200){
ascent(a in 0..85){
Slowbie((GetClipMaxX-GetClipMinX)*6/14, GetY, 2.5, atan2(GetPlayerY - GetY, GetPlayerX - (GetClipMaxX-GetClipMinX)*6/14)+180-a*2, 52, a, 0);
Slowbie((GetClipMaxX-GetClipMinX)*6/14, GetY, 2.5, atan2(GetPlayerY - GetY, GetPlayerX - (GetClipMaxX-GetClipMinX)*6/14)+180+a*2, 52, a, 0);
SetTexture(N);
SetGraphicRect( 0, 0, 44, 50 );
DrawGraphic(((GetClipMaxX-GetClipMinX)*6/14), GetClipMinX + 95);
}
}
if (GetLife<1000){
ascent(a in 6..21){
Slowbie((GetClipMaxX-GetClipMinX)*8/14, GetY, a/3, GetAngleToPlayer-30, 81, 50, 0);
Slowbie((GetClipMaxX-GetClipMinX)*8/14, GetY, a/3, GetAngleToPlayer, 81, 50, 0);
Slowbie((GetClipMaxX-GetClipMinX)*8/14, GetY, a/3, GetAngleToPlayer+30, 81, 50, 0);
SetTexture(M);
SetGraphicRect( 0, 0, 44, 50 );
DrawGraphic(((GetClipMaxX-GetClipMinX)*8/14), GetClipMinX + 95);
}
}
if (GetLife<800){
ascent(a in 0..20){
Slowbie((GetClipMaxX-GetClipMinX)*10/14, GetY, 2, atan2(GetPlayerY - GetY, GetPlayerX - (GetClipMaxX-GetClipMinX)*14/14)+a*18, 130, 50, 0);
Slowbie((GetClipMaxX-GetClipMinX)*10/14, GetY, 2.1, atan2(GetPlayerY - GetY, GetPlayerX - (GetClipMaxX-GetClipMinX)*14/14)-1+a*18, 130, 50, 0);
Slowbie((GetClipMaxX-GetClipMinX)*10/14, GetY, 2.2, atan2(GetPlayerY - GetY, GetPlayerX - (GetClipMaxX-GetClipMinX)*14/14)-2+a*18, 130, 50, 0);
Slowbie((GetClipMaxX-GetClipMinX)*10/14, GetY, 2.3, atan2(GetPlayerY - GetY, GetPlayerX - (GetClipMaxX-GetClipMinX)*14/14)-3+a*18, 130, 50, 0);
Slowbie((GetClipMaxX-GetClipMinX)*10/14, GetY, 2.4, atan2(GetPlayerY - GetY, GetPlayerX - (GetClipMaxX-GetClipMinX)*14/14)-4+a*18, 130, 50, 0);
Slowbie((GetClipMaxX-GetClipMinX)*10/14, GetY, 2.5, atan2(GetPlayerY - GetY, GetPlayerX - (GetClipMaxX-GetClipMinX)*14/14)-5+a*18, 130, 50, 0);
Slowbie((GetClipMaxX-GetClipMinX)*10/14, GetY, 2.6, atan2(GetPlayerY - GetY, GetPlayerX - (GetClipMaxX-GetClipMinX)*14/14)-6+a*18, 130, 50, 0);
SetTexture(A);
SetGraphicRect( 0, 0, 44, 50 );
DrawGraphic(((GetClipMaxX-GetClipMinX)*10/14), GetClipMinX + 95);
}
}
if (GetLife<600){
ascent(a in 0..20){
Home((GetClipMaxX-GetClipMinX)*12/14, GetY, 2, GetAngleToPlayer+a*18, 111, 50+a*4, a);
SetTexture(K);
SetGraphicRect( 0, 0, 44, 50 );
DrawGraphic(((GetClipMaxX-GetClipMinX)*12/14), GetClipMinX + 95);
}
}
if (GetLife<400){
ascent(a in 0..30){
Slowbie((GetClipMaxX-GetClipMinX)*14/14, GetY, 2.5, GetAngleToPlayer+a*12, 59, 50, 4);
Slowbie((GetClipMaxX-GetClipMinX)*14/14, GetY, 2.5, GetAngleToPlayer+a*12, 59, 50, -4);
SetTexture(U);
SetGraphicRect( 0, 0, 44, 50 );
DrawGraphic(((GetClipMaxX-GetClipMinX)*14/14), GetClipMinX + 95);
}
}
_Wait(200);
}
}
task Slowbie(x, y, v, angle, graphic, delay, let turn){
let obj = Obj_Create(OBJ_SHOT);
let bounce = 0;
let i = 0;
Obj_SetX(obj, x);
Obj_SetY(obj, y);
Obj_SetSpeed(obj, v);
Obj_SetAngle(obj, angle);
ObjShot_SetGraphic(obj, graphic);
ObjShot_SetDelay(obj, delay);
Obj_SetAutoDelete(obj, false);
ObjShot_SetBombResist(obj, true);
while (!Obj_BeDeleted(obj)){
if (bounce == 0){
if ((Obj_GetX(obj) > 420) || (Obj_GetX(obj) < 30)){
Obj_SetAngle(obj, Obj_GetAngle(obj));
bounce++;
}
if (Obj_GetY(obj) < 15){
Obj_SetAngle(obj, Obj_GetAngle(obj));
bounce++;
}
}
if ((i > 10+delay) && (i < 70+delay)){
Obj_SetAngle(obj, Obj_GetAngle(obj)+turn);
}
if ((i > 140+delay)){
Obj_SetAutoDelete(obj, true);
}
i++;
yield;
}
}
task Home(x, y, v, angle, graphic, delay, let turn){
let obj = Obj_Create(OBJ_SHOT);
let bounce = 0;
let i = 0;
Obj_SetX(obj, x);
Obj_SetY(obj, y);
Obj_SetSpeed(obj, v);
Obj_SetAngle(obj, angle);
ObjShot_SetGraphic(obj, graphic);
ObjShot_SetDelay(obj, delay);
Obj_SetAutoDelete(obj, false);
ObjShot_SetBombResist(obj, true);
while (!Obj_BeDeleted(obj)){
if (bounce == 0){
if ((Obj_GetX(obj) > 420) || (Obj_GetX(obj) < 30)){
Obj_SetAngle(obj, Obj_GetAngle(obj));
bounce++;
}
if (Obj_GetY(obj) < 15){
Obj_SetAngle(obj, Obj_GetAngle(obj));
bounce++;
}
}
if ((i == 40+delay)){
Obj_SetAngle(obj, atan2(GetPlayerY - Obj_GetY(obj), GetPlayerX - Obj_GetX(obj)))
}
if ((i > 140)){
Obj_SetAutoDelete(obj, true);
}
i++;
yield;
}
}
task YamaReflect(num, spe, turn, graph, delay){
let offset=0;
loop{
ascent(i in 0..num){
CreateShot01(GetX, GetY, spe, (360)/num*i+offset, graph, 10);
}
offset+=turn;
loop(delay){yield;}
PlaySE("script\extrabosses_mcxd\sound\Shot6.wav");
}
}
task Permashot(x, y, v, angle, graphic, delay){
let obj = Obj_Create(OBJ_SHOT);
Obj_SetX(obj, x);
Obj_SetY(obj, y);
Obj_SetSpeed(obj, v);
Obj_SetAngle(obj, angle);
ObjShot_SetGraphic(obj, graphic);
ObjShot_SetDelay(obj, delay);
Obj_SetAutoDelete(obj, false);
ObjShot_SetBombResist(obj, true);
while (!Obj_BeDeleted(obj)){
yield;
}
}
function _Wait( let frame ){
loop( frame ){ yield; }
}
}
How can I draw all the letters on their destinated spots? Now they don't appear at all, but before I deleted certain parts of the code they all appeared on the D.