Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.96 KB | None | 0 0
  1. ///draw the player
  2.  
  3. var drawX = x;
  4. var drawY = y;
  5.  
  6. if (global.grav == -1) //need to draw the player a pixel off in the y-axis when flipped for some reason
  7. drawY += 1;
  8.  
  9. draw_sprite_ext(sprite_index,image_index,drawX,drawY,image_xscale*xScale,image_yscale*global.grav,image_angle,image_blend,image_alpha);
  10.  
  11. //draw the player's hitbox
  12. if (global.debugShowHitbox)
  13. draw_sprite_ext(mask_index,image_index,x,y,image_xscale,image_yscale,image_angle,image_blend,image_alpha*0.8);
  14.  
  15. // player outline
  16.  
  17.  
  18. if (global.playerSprite = 0) {
  19. PlayerIdle = sprPlayerIdleOutline0;
  20. PlayerJump = sprPlayerJumpOutline0;
  21. PlayerFall = sprPlayerFallOutline0;
  22. PlayerRunning = sprPlayerRunningOutline0;
  23. PlayerSliding = sprPlayerSlidingOutline0;
  24. } else if (global.playerSprite = 1) {
  25. PlayerIdle = sprPlayerIdleOutline1;
  26. PlayerJump = sprPlayerJumpOutline1;
  27. PlayerFall = sprPlayerFallOutline1;
  28. PlayerRunning = sprPlayerRunningOutline1;
  29. PlayerSliding = sprPlayerSlidingOutline1;
  30. }
  31.  
  32. if (global.playerSprite >= 0) {
  33.  
  34. if (objPlayer.sprite_index == sprPlayerIdle) {
  35. show_debug_message("idle")
  36. sprite_i = PlayerIdle;
  37.  
  38. } else if (objPlayer.sprite_index == sprPlayerJump ) {
  39. show_debug_message("jump")
  40. sprite_i = PlayerJump;
  41.  
  42. } else if (objPlayer.sprite_index == sprPlayerFall ) {
  43. show_debug_message("fall")
  44. sprite_i = PlayerFall;
  45.  
  46. } else if (objPlayer.sprite_index == sprPlayerRunning ) {
  47. show_debug_message("run")
  48. sprite_i = PlayerRunning;
  49.  
  50. } else if (objPlayer.sprite_index == sprPlayerSliding ) {
  51. sprite_i = PlayerSliding;
  52. }
  53.  
  54. image_index = objPlayer.image_index
  55. }
  56.  
  57. /// uuuuugh image blend, make it only on outlines
  58. //image_blend = make_color_rgb(global.cur_col_pr, global.cur_col_pg, global.cur_col_pb)
  59. //image_blend = make_color_rgb(global.cur_col_r, global.cur_col_g, global.cur_col_b)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement