Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #TouhouDanmakufu
- #Title[Knife Sign "Tick Of the Eternal Clock" ]
- #Text[first independent script]
- #Image[.\img\Danmakufu_sample01.png]
- #Player[FREE]
- #ScriptVersion[2]
- script_enemy_main {
- let Name = "Knife Sign"\""The Tick Of Time"\";
- let ImgBoss = "script\img\ExRumia.png";
- // start position
- let XIni = GetClipMaxX - 32;
- let YIni = GetClipMaxY - 32;
- // Start attack position
- let XStart = GetClipMinX + 48;
- let YStart = GetClipMinY + 96;
- }
- @intialize{
- SetLife(6000);
- SetTimer(150);
- SetScore(9000000);
- SetDamageRate(10,10);
- LoadGraphic(ImgBoss);
- SetTexture(ImgBoss);
- setGraphicsStop;
- Concentration01(90);
- Cutin(SAKUYA, NAME, "", 0, 0);
- TMain;
- }
- @MainLoop{
- SetCollisionA (GetX, GetY, 32);
- SetCollisionB (GetX, GetY, 16);
- yield;
- }
- @DrawLoop{
- DrawGraphic(GetX, GetY);
- }
- @BackGround{
- }
- @Finalize{
- DeleteGraphic(ImgBoss);
- loop(500) {
- let x = GetX + rand(-64, 64);
- let y = GetY + rand(-64, 64);
- CreateItem(ITEM_SCORE, x, y);
- }
- }
- // Meat and Potatoes?
- task TMain {
- yield;
- //Prepare
- appear;
- levitate;
- ready;
- loop{
- move;
- concentrate;
- fire;
- }
- }
- // The slow beginning
- sub appear {
- let wIni =120;
- SetMovePosition02(XIni, YIni, wIni);
- setGraphicMove;
- }
- //Levi
- sub levitate{
- let wLev = 30;
- setGraphicStop;
- SetMovePosition02(XIni, YIni + 10, wLev);
- wait(wLev);
- SetMovePosition02(XIni, YIni, wLev);
- wait(wLev);
- }
- // ready
- sub ready{
- let wMove = 120;
- let wStop = 60;
- SetMovePosition02(XStart, YStart, wMove);
- setGraphicMove;
- wait(wMove);
- setGraphicStop;
- wait(wStop);
- ` SetDamageRate(40, 40);
- }
- //Movement
- sub move{
- let wMove = 60;
- moveToPlayer(rand(40, 80), rand(-40, 40), wMove,
- GetClipMinX + 48, GetClipMinY + 32,
- GetClipMaxX - 48, GetClipMinY + 128);
- setGraphicMove;
- }
- // Lock and load
- sub fire{
- let base = GetAngleToPlayer; // base direction
- let interval = 10; // interval of the aiming shot
- let nShot = 130; // number of the shots
- let wFire = 1; // firing interval
- let delay = wFire * nShot/8; // delay frames
- let wBefore = 60 - delay; // waiting frames before firing
- let v = 10; // velocity
- setGraphicPose;
- wait(wBefore);
- loop(nShot)
- }
Advertisement
Add Comment
Please, Sign In to add comment