Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function wait(let frames) { loop(frames) { yield; } }
- function ExMove01_(nBaseHeight, nHorizontal, nAddHeight, nVelocity) {
- if(GetPlayerX < GetX) {
- if(GetX - nHorizontal <= GetClipMinX) {
- SetMovePosition01(GetX+nHorizontal, nBaseHeight+rand(-nAddHeight, nAddHeight), nVelocity);
- } else {
- SetMovePosition01(GetX-nHorizontal, nBaseHeight+rand(-nAddHeight, nAddHeight), nVelocity);
- }
- } else {
- if(GetX + nHorizontal >= GetClipMaxX) {
- SetMovePosition01(GetX-nHorizontal, nBaseHeight+rand(-nAddHeight, nAddHeight), nVelocity);
- } else {
- SetMovePosition01(GetX+nHorizontal, nBaseHeight+rand(-nAddHeight, nAddHeight), nVelocity);
- }
- }
- }
- function ExMove02_(nBaseHeight, nHorizontal, nAddHeight, nFrame) {
- if(GetPlayerX < GetX) {
- if(GetX - nHorizontal <= GetClipMinX) {
- SetMovePosition02(GetX+nHorizontal, nBaseHeight+rand(-nAddHeight, nAddHeight), nFrame);
- } else {
- SetMovePosition02(GetX-nHorizontal, nBaseHeight+rand(-nAddHeight, nAddHeight), nFrame);
- }
- } else {
- if(GetX + nHorizontal >= GetClipMaxX) {
- SetMovePosition02(GetX-nHorizontal, nBaseHeight+rand(-nAddHeight, nAddHeight), nFrame);
- } else {
- SetMovePosition02(GetX+nHorizontal, nBaseHeight+rand(-nAddHeight, nAddHeight), nFrame);
- }
- }
- }
- function ExMove03_(nBaseHeight, nHorizontal, nAddHeight, nWeight, nVelocity) {
- if(GetPlayerX < GetX) {
- if(GetX - nHorizontal <= GetClipMinX) {
- SetMovePosition03(GetX+nHorizontal, nBaseHeight+rand(-nAddHeight, nAddHeight), nWeight, nVelocity);
- } else {
- SetMovePosition03(GetX-nHorizontal, nBaseHeight+rand(-nAddHeight, nAddHeight), nWeight, nVelocity);
- }
- } else {
- if(GetX + nHorizontal >= GetClipMaxX) {
- SetMovePosition03(GetX-nHorizontal, nBaseHeight+rand(-nAddHeight, nAddHeight), nWeight, nVelocity);
- } else {
- SetMovePosition03(GetX+nHorizontal, nBaseHeight+rand(-nAddHeight, nAddHeight), nWeight, nVelocity);
- }
- }
- }
- sub ExMove01 { ExMove01_(GetCenterY-100, rand(15, 50), 30, 1); }
- sub ExMove01Slow { ExMove01_(GetCenterY-100, rand(5, 30), 10, 1/2); }
- sub ExMove02 { ExMove02_(GetCenterY-100, rand(15, 50), 30, 60); }
- sub ExMove02B { ExMove02_(GetCenterY-100, rand(30, 50), 50, 60); }
- sub ExMove02Slow { ExMove02_(GetCenterY-100, rand(5, 30), 10, 90); }
- sub ExMove03 { ExMove03_(GetCenterY-100, rand(15, 50), 30, 10, 2); }
- sub ExMove03Slow { ExMove03_(GetCenterY-100, rand(5, 30), 10, 15, 1); }
- sub ExMove { ExMove03; }
- sub ExMoveSlow { ExMove03Slow; }
- sub setGraphicStop { SetGraphicRect( 0, 0, 64, 64); } // stopping
- sub setGraphicPose { SetGraphicRect( 64, 0, 128, 64); } // special pose
- sub setGraphicLeft { SetGraphicRect(128, 0, 192, 64); } // move left
- sub setGraphicRight { SetGraphicRect(192, 0, 256, 64); } // move right
Advertisement
Add Comment
Please, Sign In to add comment