Advertisement
Guest User

MMX

a guest
Nov 27th, 2011
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. #TouhouDanmakufu
  2. #Title [Test script]
  3. #Text [gravity affected bullets example]
  4. #ScriptVersion [2]
  5. #Player[FREE]
  6.  
  7. script_enemy_main {
  8. let imgBoss = "script\img\ExRumia.png";
  9. let CSD = GetCurrentScriptDirectory;
  10. let gravity = 0.02;
  11.  
  12. @Initialize {
  13. SetX(GetCenterX);
  14. SetY(GetCenterY);
  15. SetLife(2000);
  16. SetTimer(60);
  17. SetScore(1000000);
  18. LoadGraphic(imgBoss);
  19. SetText("Test sign: gravity testing");
  20. MainTask;
  21. }
  22.  
  23. @MainLoop {
  24. SetCollisionA(GetX, GetY, 24);
  25. SetCollisionB(GetX, GetY, 24);
  26. yield;
  27. }
  28.  
  29. @DrawLoop {
  30. SetTexture(imgBoss);
  31. SetGraphicRect(0, 0, 63, 63);
  32. DrawGraphic(GetX, GetY);
  33. }
  34.  
  35. @BackGround {
  36. }
  37.  
  38. @Finalize {
  39. DeleteGraphic(imgBoss);
  40. }
  41.  
  42. task MainTask{
  43. yield;
  44. fire;
  45. }
  46.  
  47. task fire{
  48. loop{
  49. loop(5){
  50. CreateShotA(1,GetX,GetY,0);
  51. SetShotDataA_XY(1,0,rand(-2,2),rand(-3,-1),0,gravity,99,99,RED01);
  52. FireShot(1);
  53. yield;
  54. }
  55. wait(60);
  56. yield;
  57. }
  58. }
  59.  
  60.  
  61. function wait(w) {
  62. loop(w){yield;}
  63. }
  64. }
  65.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement