MrEpicIsHere777

Untitled

Jan 4th, 2019
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. ///Variables
  2.  
  3. //First, let's just get some controller vars
  4. vspd_def = 16; //Default Speed
  5. hspd_def = 16;
  6. vspd = vspd_def; //Speed
  7. hspd = hspd_def;
  8.  
  9. moving = 0; //Are we moving the box?
  10. pausing = 0; //Are we in battle moving the box?
  11. vm = true; //Move wall_voff?
  12. tw = 582; //Target width
  13. th = 146; //Target height
  14. dw = 0; //Width left
  15. dh = 0; //Height left
  16.  
  17. //Now, let's decide on a few properties of said walls
  18. wall_size = 6; //The px thick a wall is
  19. wall_width = 582; //The px long the wall is
  20. wall_height = 146; //The px tall the wall is
  21.  
  22. wall_hoff = (640 - wall_width)/2;
  23. wall_voff = 237;
  24.  
  25. //Then, create walls
  26. TLeft = instance_create(wall_hoff,wall_voff,obj_bat_bboxWall);
  27. TRight = instance_create(room_width - wall_hoff,wall_voff,obj_bat_bboxWall);
  28. BRight = instance_create(room_width - wall_hoff,(wall_voff + wall_height) - wall_size,obj_bat_bboxWall);
  29. BLeft = instance_create(wall_hoff,(wall_voff + wall_height),obj_bat_bboxWall);
  30.  
  31. //Then, modify walls
  32. with TLeft
  33. {
  34. image_xscale = other.wall_width;
  35. image_yscale = other.wall_size;
  36. }
  37. with TRight
  38. {
  39. image_xscale = other.wall_size * -1;
  40. image_yscale = other.wall_height;
  41. }
  42. with BRight
  43. {
  44. image_xscale = other.wall_width * -1;
  45. image_yscale = other.wall_size;
  46. }
  47. with BLeft
  48. {
  49. image_xscale = other.wall_size;
  50. image_yscale = other.wall_height * -1;
  51. }
Advertisement
Add Comment
Please, Sign In to add comment