Neu7ral Posted July 27, 2015 Share Posted July 27, 2015 Hello people, i need help in something for my mod.¿How i can make my character loss healt on fail a hit?Example: When you attack a pig and didn't hit because he ran awayI don't know how i can make this thing, but if you know i will be glad on help you. Also. Sorry for my bad english, Still learning. Link to comment Share on other sites More sharing options...
Finerlobster Posted July 28, 2015 Share Posted July 28, 2015 inst:ListenForEvent("onmissother", function() local damage = 10 --the amount of damage inst.components.health:DoDelta(-damage) end) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.