~Hakurei Shrine~ > Rika and Nitori's Garage Experiments
Custom scripts by Frazer
Naut:
Pretty cool. Could use a little dressing up, but it's surprisingly fun to play as is. Nice one.
Frazer:
I messed around with a few more tests and along the way got some simplistic ideas for possible spell cards.
Clamping Oyster
--- Code: ---#TouhouDanmakufu
#Title[Clamping Oyster]
#Text[Test script]
#Player[FREE]
#ScriptVersion[2]
script_enemy_main {
let ImgBoss = "script\img\ExRumia.png";
let count = -60;
let count2 = -60;
let count3 = -60;
@Initialize {
SetLife(2000);
SetTimer(60);
SetScore(10000000);
SetInvincibility(90);
SetEnemyMarker(true);
SetMovePosition02(225, 120, 60);
CutIn(YOUMU, "Clamping Oyster", "", 0, 0, 0, 0);
LoadGraphic(ImgBoss);
SetTexture(ImgBoss);
SetGraphicRect(0, 0, 64, 64);
}
@MainLoop {
SetCollisionA(GetX, GetY, 32);
SetCollisionB(GetX, GetY, 16);
if(count < 30 && count > 0) {
CreateShot01(GetClipMinX, rand(GetClipMinY, GetClipMaxY), rand(1, 2), rand(-60, 60), AQUA11, 10);
}
if(count > 60 && count < 90) {
CreateShot01(GetClipMaxX, rand(GetClipMinY, GetClipMaxY), rand(1, 2), rand(120, 240), GREEN11, 10);
}
if(count == 120) {
count=0;
}
if(count2 == 60){
SetMovePositionRandom01(50,20,5,GetClipMinX()+100,30,GetClipMaxX()-100,100);
}
if(count2 > 60){
CreateShot01(rand(GetClipMinX, GetClipMaxX), GetClipMinY, rand(1, 2), rand(30, 150), RED11, 10);
}
if(count2 == 90){
count2 = 0;
}
if(count3 > 70 && count3 < 100){
CreateShot01(GetX, GetY, 3, GetAngleToPlayer+40, ORANGE01, 10);
CreateShot01(GetX, GetY, 3, GetAngleToPlayer+20, BLUE12, 10);
CreateShot01(GetX, GetY, 3, GetAngleToPlayer, WHITE31, 10);
CreateShot01(GetX, GetY, 3, GetAngleToPlayer-20, BLUE12, 10);
CreateShot01(GetX, GetY, 3, GetAngleToPlayer-40, ORANGE01, 10);
}
if(count3 == 100){
count3 = 0;
}
count++;
count2++;
count3++;
}
@DrawLoop {
DrawGraphic(GetX, GetY);
}
@Finalize {
DeleteGraphic(ImgBoss);
}
}
--- End code ---
Distortion Sign "Four-Colored Border"
--- Code: ---#TouhouDanmakufu
#Title[Distortion Sign "Four-colored Border"]
#Text[Test script]
#Player[FREE]
#ScriptVersion[2]
script_enemy_main {
let ImgBoss = "script\img\ExRumia.png";
let count = 540;
let count2 = 0;
let delay = 0;
let delay2 = 0;
let delay3 = 0;
let delay4 = 0;
let minx = 0;
let minx2 = 0;
let miny = 0;
let miny2 = 0;
@Initialize {
SetLife(4000);
SetTimer(60);
SetScore(10000000);
SetInvincibility(120);
SetMovePosition02(225, 120, 60);
CutIn(YOUMU, "Distortion Sign"\""Four-Colored Border"\", "", 0, 0, 0, 0);
LoadGraphic(ImgBoss);
SetTexture(ImgBoss);
SetGraphicRect(0, 0, 64, 64);
}
@MainLoop {
SetCollisionA(GetX, GetY, 32);
SetCollisionB(GetX, GetY, 16);
SetShotAutoDeleteClip(16, 32, 464, 416);
if(count == 600){
SetShotDirectionType(PLAYER);
loop(192){
CreateShotA(1, GetClipMinX, GetClipMinY+miny, delay);
SetShotDataA(1, delay, 0, rand(-180, 180), 0, 0, 0, PURPLE01);
SetShotDataA(1, delay+180, 5, NULL, 0, -0.075, 0, PURPLE01);
SetShotDataA(1, delay+240, 0, NULL, 0, 0.0025, 2, PURPLE01);
delay += 0.5;
miny += 3;
FireShot(1);
}
loop(224){
CreateShotA(2, GetClipMinX+minx, GetClipMinY, delay2);
SetShotDataA(2, delay2, 0, rand(-90, 90), 0, 0, 0, GREEN01);
SetShotDataA(2, delay2+180, 5, NULL, 0, -0.075, 0, GREEN01);
SetShotDataA(2, delay2+240, 0, NULL, 0, 0.0025, 2, GREEN01);
delay2 += 0.5;
minx += 3;
FireShot(2);
}
loop(192){
CreateShotA(3, GetClipMaxX, GetClipMaxY-miny2, delay3);
SetShotDataA(3, delay3, 0, rand(-90, 90), 0, 0, 0, AQUA01);
SetShotDataA(3, delay3+180, 5, NULL, 0, -0.075, 0, AQUA01);
SetShotDataA(3, delay3+240, 0, NULL, 0, 0.0025, 2, AQUA01);
delay3 += 0.5;
miny2 += 3;
FireShot(3);
}
loop(224){
CreateShotA(4, GetClipMaxX-minx2, GetClipMaxY, delay4);
SetShotDataA(4, delay4, 0, rand(-90, 90), 0, 0, 0, ORANGE01);
SetShotDataA(4, delay4+180, 5, NULL, 0, -0.075, 0, ORANGE01);
SetShotDataA(4, delay4+240, 0, NULL, 0, 0.0025, 2, ORANGE01);
delay4 += 0.5;
minx2 += 3;
FireShot(4);
}
delay = 0;
delay2 = 0;
delay3 = 0;
delay4 = 0;
minx = 0;
minx2 = 0;
miny = 0;
miny2 = 0;
count=0
}
count++;
}
@DrawLoop {
DrawGraphic(GetX, GetY);
}
@Finalize {
DeleteGraphic(ImgBoss);
}
}
--- End code ---
Trickster Sign "Indecisive Guide"
--- Code: ---#TouhouDanmakufu
#Title[Trickster Sign "Indecisive Guide"]
#Text[Test script]
#Player[FREE]
#ScriptVersion[2]
script_enemy_main {
let ImgBoss = "script\img\ExRumia.png";
let count = -60;
let a = 0;
let b = 0;
let c = 0;
let d = 0;
@Initialize {
SetLife(4000);
SetTimer(60);
SetScore(10000000);
SetInvincibility(120);
SetMovePosition01(GetCenterX, GetClipMinY + 120, 5);
CutIn(YOUMU, "Trickster Sign"\""Indecisive Guide"\", "", 0, 0, 0, 0);
LoadGraphic(ImgBoss);
SetTexture(ImgBoss);
SetGraphicRect(0, 0, 64, 64);
}
@MainLoop {
SetCollisionA(GetX, GetY, 32);
SetCollisionB(GetX, GetY, 16);
SetShotAutoDeleteClip(500, 500, 500, 500);
if(count == 1) {
ascent( i in 1..34)
{
CreateShotA(i, GetX, GetY, 10);
SetShotDataA(i, 0, 3, i+a, 0, -0.05, 0, GREEN12);
SetShotDataA(i, 60, 3, i+a-80, 0, -0.01, 0, GREEN12);
SetShotDataA(i, 280, 2, i+a+100, -0.25, 0, 2, GREEN12);
SetShotDirectionType(ABSOLUTE);
FireShot(i);
a += 10;
}
ascent( j in 1..34)
{
CreateShotA(j, GetX, GetY, 10);
SetShotDataA(j, 0, 3, j+a, 0, -0.05, 0, GREEN12);
SetShotDataA(j, 60, 3, j+a+80, 0, -0.01, 0, GREEN12);
SetShotDataA(j, 280, 2, j+a-100, 0.25, 0, 2, GREEN12);
SetShotDirectionType(ABSOLUTE);
FireShot(j);
a += 10;
}
ascent( k in 1..400)
{
CreateShotA(k, GetX, GetY, 10);
SetShotDataA(k, 0, 3, k+c, 0, -0.05, 0, BLUE12);
SetShotDataA(k, 60, 4.5, NULL, 0, -0.05, 0, BLUE12);
SetShotDataA(k, 150+(k*0.25), 3, NULL, 0, -0.05, 1, BLUE12);
SetShotDirectionType(ABSOLUTE);
FireShot(k);
c += 187;
}
}
if(count >= 90 && count <= 220){
loop(2){
CreateShot01(GetX, GetY, 3, d, PURPLE12, 10);
d += 360/2;
d += 13.2;
}
}
if(count == 240){
SetMovePosition02(rand(50, 350), rand(50, 200), 30);
loop(15){
CreateLaser01(GetX, GetY, 5, b, 1500, 10, RED01, 0);
b += 360/15;
}
}
if(count == 270){
SetMovePosition02(rand(50, 350), rand(50, 200), 30);
loop(15){
CreateLaser01(GetX, GetY, 5, b, 1500, 10, RED01, 0);
b += 360/15;
}
}
if(count == 300){
SetMovePosition03(GetCenterX, GetClipMinY + 120, 10, 5);
loop(15){
CreateLaser01(GetX, GetY, 5, b, 1500, 10, RED01, 0);
b += 360/15;
}
}
if(count == 360){
count=0;
}
count++;
}
@DrawLoop {
DrawGraphic(GetX, GetY);
}
@Finalize {
DeleteGraphic(ImgBoss);
}
}
--- End code ---
Naut:
Clamping Oyster is pretty simple, not much to look at and no real pattern. Could be turned into a regular attack but it's not really the kind of thing you'd see for a spellcard. Meh playablility.
Four Colored Barrier is pretty awesome, I like the Cranberry Trap feel to it. However looping so many bullets in one frame (192... 224...) could be hazardous to some people's inferior computers. Keep this in mind: try not to loop more than 100 bullets a frame, if possible. A great way to prevent this is to split the action into two frames, spawning half the bullets one frame and half the bullets another frame, just subtracting one frame delay off the latter bullets. This effect can get pretty awesome if you start spawning little amounts of bullets each frame instead of them all at once (a really cool drawing effect), plus it's smoother to process on low grade computers yet still maintains aesthetic appeal.
Same issue for Indecisive Guide, 468 bullets in one frame could cause a noticable fps spike on most single core processors. Try to break up spawning the bullets into different frames. This spell has a few levels to it, which makes it instantly appealing. It's a good surprise the first time you play it, but realively simple once you see the pattern. I like it anyway, definately spellcard worthy, but it would make a nice regular attack too.
Frazer:
Okay. I will take the advice into mind. Thank you.
DgBarca:
I started to edit your script because I've never created a spell before, and I don't really read the tutorial...I was just bored...
But after...I read the tutorial...and it ended up with a totally different card.
--- Code: ---#TouhouDanmakufu
#Title[Fate of the stoled script]
#Text[Test script]
#PlayLevel[Normal]
#Image[.\img\Scarletsign.png]
#BGM[.\bgm\th06_03.wav]
#Player[FREE]
#ScriptVersion[2]
script_enemy_main {
let ImgBoss = "script\img\ExRumia.png";
let count = 0;
let count2 = 0;
let count3 = 0;
let num = 36;
let num2 = 180;
let num3 = 210;
let a = 0;
let b = 180;
let c = 180;
let speed = 1;
@Initialize {
SetLife(4000);
SetTimer(99);
SetScore(10000000);
SetMovePosition02(225, 120, 60);
CutIn(YOUMU, "Stoled Card "\""First Danmakufu experiment"\", "", 0, 0, 0, 0);
LoadGraphic(ImgBoss);
SetTexture(ImgBoss);
SetGraphicRect(0, 0, 64, 64);
}
@MainLoop {
SetCollisionA(GetX, GetY, 32);
SetCollisionB(GetX, GetY, 16);
SetShotAutoDeleteClip(200, 200, 200, 200);
if(count == 60){
loop(num){
CreateShotA(1, GetX, GetY, 0);
SetShotDataA(1, 0, speed+1, a, 0, -0, 0, WHITE03);
SetShotDataA(1, 120, speed-2, a+180, 1, 1, 0, YELLOW03);
SetShotDataA(1, 280, speed+1, a, 0, 0, 1, ORANGE03);
a += 10;
FireShot(1);
}
PlaySE(GetCurrentScriptDirectory~"sound\Shot1.wav")}
speed = 1;
if(count == 120){
loop(num2){
CreateShotA(2, GetX, GetY, 0);
SetShotDataA(2, 0, speed-3, b, -4, -0.15, 0, WHITE22);
SetShotDataA(2, 180, speed-2.1, b+180, 0.05, 0.01, 6, RED22);
SetShotDataA(2, 180, speed-3, NULL, -0, 0, 6, RED22);
b -= 10;
speed += 0.01;
FireShot(2);
}
speed = 1;
if(count == 120){
PlaySE(GetCurrentScriptDirectory~"sound\BulletWave.wav")}
}
if(count == 180){
loop(num3){
CreateShotA(3, GetX, GetY, 0);
SetShotDataA(3, 0, speed, c, -3, -0.15, 0, WHITE11);
SetShotDataA(3, 180, speed-2, c+180, -0.09, 0, 3, YELLOW11);
SetShotDataA(3, 180, speed, NULL, 0, 1, 4, YELLOW11);
c += 10;
speed += 0.008;
FireShot(3);
}
if(count == 180){
PlaySE(GetCurrentScriptDirectory~"sound\shot4.wav")}
speed = 1;
count=0
}
if(count2 == 60){
SetMovePositionRandom01(50,20,5,GetClipMinX()+100,30,GetClipMaxX()-100,100);
count2 = 0;
}
count++;
count2++;
}
@DrawLoop {
DrawGraphic(GetX, GetY);
}
@Finalize {
DeleteGraphic(ImgBoss);
}
}
--- End code ---
Now I can create card myself, I will not stole stuff anymore, but this helped me a lot, thanks.
EDIT : Hu ! What I have done ? How did I manage to do that ?
Update : Lunatic mode WTF