Guest User

Untitled

a guest
Jan 13th, 2015
250
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. // //Создание худа// //
  2. /mob
  3. New(loc, var/CKEY)
  4. ..()
  5. ckey = CKEY
  6. new /obj/hud/hit_point(client)
  7.  
  8. obj/hud
  9. hit_point
  10. layer = MOB_LAYER
  11. icon = 'hit_point.dmi'
  12. icon_state = "hit_point_1"
  13.  
  14. New(client/C)
  15. screen_loc = "3,1"
  16. C.screen += src
  17. client
  18. New()
  19. ..()
  20. new /obj/hud/hit_point(src)
  21.  
  22. // //Создание хп// //
  23. mob/var/
  24. MaxHP = 100
  25. HP = 100
  26.  
  27. // //Процесс отнимания хпшек// //
  28.  
  29. mob
  30. proc/Attack()
  31. for(var/mob/M in oview())
  32. M.life -= 10
  33. view() << "[src] bitten [M]"
  34. if(M.life <= 0)
  35. view() << "[M] dies!"
  36. del M
  37. sleep(8)
  38. break
  39.  
  40. // Процесс отображения здоровья на худе //
  41. obj/hud/hit_point
  42. proc/HP_proc(mob/M)
  43. if(M.life <= 80)
  44. icon_state = "hp_2"
  45. if(M.life <= 40)
  46. icon_state = "hp_3"
  47. if(M.life <= 10)
  48. icon_state = "hp_4"
  49. if(M.life == 0)
  50. icon_state = "hp_dead"
Advertisement
Add Comment
Please, Sign In to add comment