SHARE
TWEET

Untitled

tyrz939 Jan 6th, 2017 84 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     /*==========================
  2.     Input from player or replay
  3.     ==========================*/
  4. if global.replay == false {
  5.     // Player input
  6.     if input.up == true {up=true;}
  7.     else if input.up == false {up=false;}
  8.    
  9.     if input.down == true {down=true;}
  10.     else if input.down == false {down=false;}
  11.    
  12.     if input.left == true {left=true;}
  13.     else if input.left == false {left=false;}
  14.    
  15.     if input.right == true {right=true;}
  16.     else if input.right == false {right=false;}
  17.    
  18.     if input.focus == true {focus=true;}
  19.     else if input.focus == false {focus=false;}
  20.    
  21.     if input.bomb_press == true {bomb_press=true;}
  22.     else if input.bomb_press == false {bomb_press=false;}
  23.    
  24.     if input.shoot_press == true {shoot_press=true;}
  25.     else if input.shoot_press == false {shoot_press=false;}
  26. } else {
  27.     // Replay Input
  28.     while replay[FRAME,pos] < global.frame && pos < replay_length {
  29.         pos++;
  30.     }
  31.     if global.frame == replay[FRAME,pos]{
  32.         if replay[UP,pos]==1 {up=true;}
  33.         else if replay[UP,pos]==0 {up=false;}
  34.        
  35.         if replay[DOWN,pos]==1 {down=true;}
  36.         else if replay[DOWN,pos]==0 {down=false;}
  37.        
  38.         if replay[LEFT,pos]==1 {left=true;}
  39.         else if replay[LEFT,pos]==0 {left=false;}
  40.        
  41.         if replay[RIGHT,pos]==1 {right=true;}
  42.         else if replay[RIGHT,pos]==0 {right=false;}
  43.        
  44.         if replay[FOCUS,pos]==1 {focus=true;}
  45.         else if replay[FOCUS,pos]==0 {focus=false;}
  46.        
  47.         if replay[SHOOT,pos]==1 {shoot_press=true;}
  48.         else if replay[SHOOT,pos]==0 {shoot_press=false;}
  49.        
  50.         if replay[BOMB,pos]==1 {bomb_press=true;}
  51.         else if replay[BOMB,pos]==0 {bomb_press=false;}
  52.     }
  53. }
RAW Paste Data
Challenge yourself this year...
Learn something new in 2017
Top