Guest User

Script

a guest
Sep 10th, 2015
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var hBounce = 14;
  2.  
  3. if (image_angle !=0){ //If moving platform upside down
  4. if instance_touch(obj_player){
  5.         if (!obj_player.bbox_top < bbox_bottom){
  6.             if obj_player.Key_Left{
  7.             obj_player.hsp = hBounce;}
  8.             if obj_player.Key_Right{
  9.             obj_player.hsp = -hBounce;}
  10.         }
  11.     }
  12. }
  13.  
  14. if (image_angle = 0){
  15. if instance_touch(obj_player){
  16.         if (!obj_player.bbox_bottom >= bbox_top){
  17.             if obj_player.Key_Left{
  18.             obj_player.hsp = hBounce;}
  19.             if obj_player.Key_Right{
  20.             obj_player.hsp = -hBounce;}
  21.         }
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment