Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #TouhouDanmakufu
- #Title [Test script]
- #Text [gravity affected bullets example]
- #ScriptVersion [2]
- #Player[FREE]
- script_enemy_main {
- let imgBoss = "script\img\ExRumia.png";
- let CSD = GetCurrentScriptDirectory;
- let gravity = 0.02;
- @Initialize {
- SetX(GetCenterX);
- SetY(GetCenterY);
- SetLife(2000);
- SetTimer(60);
- SetScore(1000000);
- LoadGraphic(imgBoss);
- SetText("Test sign: gravity testing");
- MainTask;
- }
- @MainLoop {
- SetCollisionA(GetX, GetY, 24);
- SetCollisionB(GetX, GetY, 24);
- yield;
- }
- @DrawLoop {
- SetTexture(imgBoss);
- SetGraphicRect(0, 0, 63, 63);
- DrawGraphic(GetX, GetY);
- }
- @BackGround {
- }
- @Finalize {
- DeleteGraphic(imgBoss);
- }
- task MainTask{
- yield;
- fire;
- }
- task fire{
- loop{
- loop(5){
- CreateShotA(1,GetX,GetY,0);
- SetShotDataA_XY(1,0,rand(-2,2),rand(-3,-1),0,gravity,99,99,RED01);
- FireShot(1);
- yield;
- }
- wait(60);
- yield;
- }
- }
- function wait(w) {
- loop(w){yield;}
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement