Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // //Создание худа// //
- /mob
- New(loc, var/CKEY)
- ..()
- ckey = CKEY
- new /obj/hud/hit_point(client)
- obj/hud
- hit_point
- layer = MOB_LAYER
- icon = 'hit_point.dmi'
- icon_state = "hit_point_1"
- New(client/C)
- screen_loc = "3,1"
- C.screen += src
- client
- New()
- ..()
- new /obj/hud/hit_point(src)
- // //Создание хп// //
- mob/var/
- MaxHP = 100
- HP = 100
- // //Процесс отнимания хпшек// //
- mob
- proc/Attack()
- for(var/mob/M in oview())
- M.life -= 10
- view() << "[src] bitten [M]"
- if(M.life <= 0)
- view() << "[M] dies!"
- del M
- sleep(8)
- break
- // Процесс отображения здоровья на худе //
- obj/hud/hit_point
- proc/HP_proc(mob/M)
- if(M.life <= 80)
- icon_state = "hp_2"
- if(M.life <= 40)
- icon_state = "hp_3"
- if(M.life <= 10)
- icon_state = "hp_4"
- if(M.life == 0)
- icon_state = "hp_dead"
Advertisement
Add Comment
Please, Sign In to add comment