Guest User

variables.dnh

a guest
Aug 29th, 2013
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.73 KB | None | 0 0
  1.  
  2. function wait(let frames) { loop(frames) { yield; } }
  3. function ExMove01_(nBaseHeight, nHorizontal, nAddHeight, nVelocity) {
  4. if(GetPlayerX < GetX) {
  5. if(GetX - nHorizontal <= GetClipMinX) {
  6. SetMovePosition01(GetX+nHorizontal, nBaseHeight+rand(-nAddHeight, nAddHeight), nVelocity);
  7. } else {
  8. SetMovePosition01(GetX-nHorizontal, nBaseHeight+rand(-nAddHeight, nAddHeight), nVelocity);
  9. }
  10. } else {
  11. if(GetX + nHorizontal >= GetClipMaxX) {
  12. SetMovePosition01(GetX-nHorizontal, nBaseHeight+rand(-nAddHeight, nAddHeight), nVelocity);
  13. } else {
  14. SetMovePosition01(GetX+nHorizontal, nBaseHeight+rand(-nAddHeight, nAddHeight), nVelocity);
  15. }
  16. }
  17. }
  18. function ExMove02_(nBaseHeight, nHorizontal, nAddHeight, nFrame) {
  19. if(GetPlayerX < GetX) {
  20. if(GetX - nHorizontal <= GetClipMinX) {
  21. SetMovePosition02(GetX+nHorizontal, nBaseHeight+rand(-nAddHeight, nAddHeight), nFrame);
  22. } else {
  23. SetMovePosition02(GetX-nHorizontal, nBaseHeight+rand(-nAddHeight, nAddHeight), nFrame);
  24. }
  25. } else {
  26. if(GetX + nHorizontal >= GetClipMaxX) {
  27. SetMovePosition02(GetX-nHorizontal, nBaseHeight+rand(-nAddHeight, nAddHeight), nFrame);
  28. } else {
  29. SetMovePosition02(GetX+nHorizontal, nBaseHeight+rand(-nAddHeight, nAddHeight), nFrame);
  30. }
  31. }
  32. }
  33. function ExMove03_(nBaseHeight, nHorizontal, nAddHeight, nWeight, nVelocity) {
  34. if(GetPlayerX < GetX) {
  35. if(GetX - nHorizontal <= GetClipMinX) {
  36. SetMovePosition03(GetX+nHorizontal, nBaseHeight+rand(-nAddHeight, nAddHeight), nWeight, nVelocity);
  37. } else {
  38. SetMovePosition03(GetX-nHorizontal, nBaseHeight+rand(-nAddHeight, nAddHeight), nWeight, nVelocity);
  39. }
  40. } else {
  41. if(GetX + nHorizontal >= GetClipMaxX) {
  42. SetMovePosition03(GetX-nHorizontal, nBaseHeight+rand(-nAddHeight, nAddHeight), nWeight, nVelocity);
  43. } else {
  44. SetMovePosition03(GetX+nHorizontal, nBaseHeight+rand(-nAddHeight, nAddHeight), nWeight, nVelocity);
  45. }
  46. }
  47. }
  48. sub ExMove01 { ExMove01_(GetCenterY-100, rand(15, 50), 30, 1); }
  49. sub ExMove01Slow { ExMove01_(GetCenterY-100, rand(5, 30), 10, 1/2); }
  50. sub ExMove02 { ExMove02_(GetCenterY-100, rand(15, 50), 30, 60); }
  51. sub ExMove02B { ExMove02_(GetCenterY-100, rand(30, 50), 50, 60); }
  52. sub ExMove02Slow { ExMove02_(GetCenterY-100, rand(5, 30), 10, 90); }
  53. sub ExMove03 { ExMove03_(GetCenterY-100, rand(15, 50), 30, 10, 2); }
  54. sub ExMove03Slow { ExMove03_(GetCenterY-100, rand(5, 30), 10, 15, 1); }
  55. sub ExMove { ExMove03; }
  56. sub ExMoveSlow { ExMove03Slow; }
  57.  
  58. sub setGraphicStop { SetGraphicRect( 0, 0, 64, 64); } // stopping
  59. sub setGraphicPose { SetGraphicRect( 64, 0, 128, 64); } // special pose
  60. sub setGraphicLeft { SetGraphicRect(128, 0, 192, 64); } // move left
  61. sub setGraphicRight { SetGraphicRect(192, 0, 256, 64); } // move right
Advertisement
Add Comment
Please, Sign In to add comment