Advertisement
Guest User

My borked stage script :/

a guest
Nov 7th, 2014
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. #TouhouDanmakufu[Stage]
  2. #ScriptVersion[3]
  3. #Title["How do I danmakufu?"]
  4. #Text["No clue."]
  5.  
  6. function wait(w) { loop(w) { yield; } }
  7.  
  8. let place = GetCurrentScriptDirectory ~ "/img/Placeholder.png";
  9. @Initialize {
  10. LoadTexture(place);
  11. StageStart;
  12. }
  13.  
  14. @MainLoop {
  15.  
  16. yield;
  17. }
  18.  
  19. @Finalize {
  20.  
  21. }
  22.  
  23. task StageStart {
  24. let dir = GetCurrentScriptDirectory();
  25. let Script = dir ~ "Stage 1 Boss.txt";
  26. loop(60) {yield;} //something about one second to compile?
  27. Enemy01;
  28. StartScript(Script);
  29.  
  30. while(!IsCloseScript(Script) && GetPlayerState() != STATE_END)
  31. {
  32.  
  33. yield;
  34. }
  35. wait(240);
  36. CloseStgScene();
  37. }
  38.  
  39. task Enemy01 {
  40.  
  41. let Enm1 = ObjEnemy_Create(OBJ_ENEMY);
  42. ObjEnemy_Regist(Enm1);
  43. ObjEnemy_SetLife(Enm1,10);
  44. ObjPrim_SetTexture(Enm1, place); //This is a picture of a poorly drawn potato (Placeholder)
  45. ObjRender_SetScaleXYZ(Enm1, 0.5, 0.5, 1);
  46. ObjSprite2D_SetSourceRect(Enm1, 0, 0, 63, 116);
  47. ObjSprite2D_SetDestCenter(Enm1);
  48. ObjMove_SetDestAtSpeed(Enm1, 200, 200, 3);
  49. loop{
  50. ObjEnemy_SetIntersectionCircleToShot(Enm1, ObjMove_GetX(Enm1), ObjMove_GetY(Enm1), 10);
  51. yield;
  52. }
  53.  
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement