If there is no addhook for that, can anyone develope a function for me that can returns breakable entity health when a player are attacking the entity?
edited 1×, last 12.12.17 04:11:34 pm
Scripts
Return breakable entity Health
Return breakable entity Health
1

entity(x,y,"typename") == "Env_Breakable"
entity(x,y,"int1")
local list = entitylist()
for _,e in pairs(list) do
print("entity @ ("..e.x..","..e.y..") - "..entity(e.x,e.y,"typename") .. " = " .. entity(e.x,e.y,"int1"))
end
entitylist and add the known breakable entities to a table with their x/y coordinates, and their health value. Then in the
attack hook, interate through each one and check if the health value has changed.
VaiN: Thank you for you took your time to write the code Vain. But i have though about that i can make a list and name them after their health value. But my biggest problem is to identify the damage a players dealt to the entity.
1
