AmenMoses its this part that you are talking about.
function module_combatcore.hurt(e,PlayerDist,responsestate)
if ai_bot_state[e] == ai_state_idle or ai_bot_state[e] == ai_state_patrol or ai_bot_state[e] == ai_state_move or ai_bot_state[e] == ai_state_fireonspot or ai_bot_state[e] == ai_state_recover or ai_bot_state[e] == ai_state_punch or ai_bot_state[e] == ai_state_duck then
if g_Entity[e]['health'] < ai_bot_oldhealth[e] then
if ai_bot_state[e] == ai_state_duck then
ai_bot_state[e] = ai_state_unduckstart
else
if (ai_bot_state[e] == ai_state_move or ai_bot_state[e] == ai_state_idle or ai_bot_state[e] == ai_state_fireonspot) and PlayerDist > 300 then
if math.random(1,3) == 1 then
ai_bot_state[e] = ai_state_rollstart
else
ai_bot_state[e] = ai_state_crouchdashstart
end
else
if ai_bot_state[e] == ai_state_roll then
-- AI is immune to damage when rolling
SetEntityHealth(e,ai_bot_oldhealth[e])
else
local flinch = math.random(1,3)
if flinch == 1 then
ai_bot_state[e] = ai_state_hurt
SetAnimationSpeed(e,3.0)
SetAnimation(3)
PlayAnimation(e)
SetAnimationSpeedModulation(e,1.0)
end
end
end
end
ai_bot_oldhealth[e] = g_Entity[e]['health']
ai_bot_angryhurt[e] = 1
PlaySound(e,math.random(3,4))
module_agro.alertallwithinradius(g_Entity[e]['x'],g_Entity[e]['y'],g_Entity[e]['z'],250.0)
end
end
if ai_bot_state[e] == ai_state_hurt then
MoveForward(e,0.0)
RotateToPlayerSlowly(e,10.0)
tFrame = GetAnimationFrame(e)
tStart = GetEntityAnimationFinish(e,3)
if tFrame >= tStart then
SetAnimationSpeed(e,1.0)
ai_bot_state[e] = responsestate
end
end
end
i have tried to put my indication , PromptLocal( e, g_Entity[ e ].health ) in this part of the script on some places
but with out success. ,mabye i put in in the incorrect places. lol
Windows 7 Professional 64-bit
Intel(R) Pentium(R) CPU G3260 @ 3.30GHz (2 CPUs), ~3.3GHz RAM 16GB NVIDIA GeForce GT 730
DirectX Version: DirectX 11