Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /// @description Execute Code\n
  2. if keyboard_check_pressed(vk_down){
  3.     if extraHp < 1 {
  4.     hp --
  5.     }
  6.     else{
  7.     extraHp --
  8.         }
  9. }
  10.  
  11. if keyboard_check_pressed(vk_up) {
  12.     if hp != maxHp {
  13.     hp ++
  14.     }
  15.     else{
  16.     extraHp ++
  17.     }
  18. }
  19.  
  20. hp = clamp(hp,0,maxHp);
  21. extraHp = clamp(extraHp,0,extraMaxhp);
  22.  
  23. if keyboard_check_pressed(vk_left) {
  24.     extraMaxhp --
  25. }
  26.  
  27. if keyboard_check_pressed(vk_right) {
  28.     extraMaxhp ++
  29. }
  30.  
  31. extraMaxhp = clamp(extraMaxhp,0,20)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement