Skip to content
User Avatar
#3879
Auto-translated
JustPeasant
Good afternoon. Does anyone know if it's possible to redefine a unit's behavior in hooks? For example, a unit fires, and then a certain effect is applied to the unit that received the damage.
I only saw UnitMove, which is then divided into "sub-hooks."
But in all of them, only the sUnitName parameter is passed.
So, it seems that you can only control the attacking unit, but not the unit being attacked.
Is it possible to somehow find out which unit is being attacked and how much damage it received?
Unfortunately, this cannot be controlled. There is one workaround: add a check in a new thread while 1 do, which counts the number of creatures in each stack and checks if this value matches the previously calculated one. If not, it calls some function, passing the stack name to it.
С уважением, }{0TT@6bI4
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________