#TouhouDanmakufu
#Title[Lasers Everywhere "Patrick Alexander's Entry"]
#Text[Test script]
#BackGround[User(.\black.png, 1, 1)]
#BGM[script/st6boss2.wav]
#Player[FREE]
#ScriptVersion[2]
script_enemy_main {
let ImgBoss = "script\img\ExRumia.png";
let count = -240;
let SMT = 0;
let fire = 0;
let l = 0;
let life = 600;
@Initialize {
SetLife(1);
SetDamageRate(0, 0);
SetTimer(65);
SetInvincibility( 200 );
ForbidShot(true);
LoadGraphic(ImgBoss);
SetMovePosition02(GetCenterX, GetCenterY-90, 120);
CutIn(YOUMU, "Lasers Everywhere "\""Patrick Alexander's Entry"\", 0, 0, 0, 0, 0);
LoadUserShotData("\lib\SHOT_REPLACE\shot_All.dnh");
SetGraphicRect(0, 0, 64, 64);
}
@MainLoop {
SetCollisionA(GetX, GetY, 32);
SetCollisionB(GetX, GetY, 16);
if ((count == 0)){
Inner;
}
if ((count == 1440)){
InnerTwo;
}
if ((count == 2640)){
InnerThree;
}
count++;
SMT++;
yield;
}
@DrawLoop {
SetTexture(ImgBoss);
DrawGraphic(GetX, GetY);
}
@Finalize {
DeleteGraphic(ImgBoss);
}
task Inner{
let b = 180;
let bup = 3.23;
let reverse = 0;
let lrar = 0;
let kput = 180;
let krar = 360/kput;
let Length = 100;
yield;
let x = 2.3;
let n = 0;
let q = 0;
let RollerX;
let RollerY;
let random;
loop{
PlaySE(GetCurrentScriptDirectory~"SE\se_tan01.wav");
ascent(a in 1..kput+1){
RollerX = GetX + Length * cos((a*krar+b)+1*(360/2));
RollerY = GetY + Length * sin((a*krar+b)+1*(360/2));
CreateLaser01(RollerX, RollerY, 2.5, a*10, 120, 8, 163, 30);
}
if (reverse == 0){
if (bup > -0.7){
bup += 1.3;
}
else{
reverse++;
}
}
else{
if (bup > 120){
bup -= 0;
}
else{
reverse--;
}
}
b += bup;
if (Length > -200){
Length -= 0;
}
loop(180){
yield;
}
}
}
task InnerTwo{
let b = 180;
let bup = 3;
let reverse = 0;
let lrar = 0;
let kput = 2;
let krar = 180;
let Length = 60;
yield;
let x = 2.3;
let n = 0;
let q = 0;
let RollerX;
let RollerY;
let random;
loop{
PlaySE(GetCurrentScriptDirectory~"SE\se_tan01.wav");
ascent(a in 1..kput+1){
RollerX = GetX + Length * sin(count) * cos((a*krar+b)+1*(360/2)) + 60 * cos(count*0.96);
RollerY = GetY + Length * sin(count) * sin((a*krar+b)+1*(360/2)) + 60 * sin(count*0.96);
CreateLaser01(RollerX, RollerY, 5, (a*krar+b)+count*1.34, 200, 10, 162, 30);
}
if (reverse == 0){
if (bup > -0.7){
bup += 0;
}
else{
reverse++;
}
}
else{
if (bup > 120){
bup -= 0;
}
else{
reverse--;
}
}
b += bup;
if (Length > -200){
Length -= 0;
}
loop(5){
yield;
}
}
}
task InnerThree{
let b = 180;
let bup = 3;
let reverse = 0;
let lrar = 0;
let kput = 10;
let krar = 36;
let Length = 100;
yield;
let x = 2.3;
let n = 0;
let q = 0;
let RollerX;
let RollerY;
let random;
loop{
PlaySE(GetCurrentScriptDirectory~"SE\se_tan01.wav");
ascent(a in 1..kput+1){
RollerX = GetX + Length * cos((a*krar+b)+1*(360/2));
RollerY = GetY + Length * sin((a*krar+b)+1*(360/2));
CreateLaser01(RollerX, RollerY, 3.5, atan2(GetPlayerY-RollerY, GetPlayerX-RollerX)+rand(-25, 25), 140, 16, 55, 30);
}
if (reverse == 0){
if (bup > -0.7){
bup += 0;
}
else{
reverse++;
}
}
else{
if (bup > 120){
bup -= 0;
}
else{
reverse--;
}
}
b += bup;
if (Length > -200){
Length -= 0;
}
loop(180){
yield;
}
}
}
task TheshotUp(x, y, v, angle, graphic, delay){
let obj = Obj_Create(OBJ_SHOT);
let a = 0;
let b = 0;
let dir = angle;
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);
while (!Obj_BeDeleted(obj)){
if (a == 120){
Obj_SetAutoDelete(obj, true);
}
a++;
b++;
yield;
}
}
task TheshotCircle(x, y, v, angle, graphic, delay){
let obj = Obj_Create(OBJ_SHOT);
let a = 0;
let b = 0;
let dir = angle;
Obj_SetX(obj, x);
Obj_SetY(obj, y);
Obj_SetSpeed(obj, v);
Obj_SetAngle(obj, angle);
ObjShot_SetGraphic(obj, graphic);
ObjShot_SetDelay(obj, delay);
ObjShot_SetBombResist(obj, true);
while (!Obj_BeDeleted(obj)){
if (a == 120){
Obj_SetSpeed(obj, v*8);
}
a++;
b++;
yield;
}
}
}
My entry, put together just for fun.