Advertisement
Guest User

Untitled

a guest
Oct 13th, 2012
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. #TouhouDanmakufu
  2. #ScriptVersion[3]
  3. #Title["Tester"]
  4. #Text["Example"]
  5.  
  6. let ObjEnemy;
  7. let ObjPlayer;
  8. Task MotionTask() //moves the boss every 250 frames
  9. {
  10. loop
  11. {
  12. let x_random= rand_int(0, 100);
  13. let y_random= rand_int(0, 100);
  14. MoveBoss(x,y); //dummy task, define this yourself
  15. loop(250) {yield;}
  16. }
  17. }
  18. task BulletTask() //does a random bullet pattern every 300 frames
  19. {
  20. loop
  21. {
  22. let pattern_id= rand_int(1, 3);
  23. DoBulletPattern(pattern_id); //dummy task
  24. loop(300) {yield;}
  25. }
  26. }
  27. function Do_Routines()
  28. {
  29. MotionTask();
  30. BulletTask();
  31. }
  32.  
  33. @Event
  34. {
  35. alternative(GetEventType())
  36. {
  37. case(EV_REQUEST_LIVE)
  38. {
  39. SetScriptResult(100);
  40. }
  41. }
  42. }
  43.  
  44. @Initialize
  45. {
  46. Do_Routines();
  47. }
  48.  
  49. @MainLoop
  50. {
  51. yield; //so our tasks have a turn each frame
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement