Hi, im new to this software and im trying to desing a level where most common soldiers can be killed but some of them can not. Im trying using this script:
-- AI : Soldier Behavior
ai_soldierprueba2_combatshoot = require "scriptbank\\ai\\module_combatshoot"
g_KillCount = 0
function ai_soldierprueba2_init(e)
ai_soldierprueba_combatshoot.init(e,ai_combattype_regular)
end
function ai_soldierprueba2_main(e)
ai_soldierprueba_combatshoot.main(e,ai_combattype_regular,ai_movetype_usespeed,ai_attacktype_canfire)
end
function module_combatcore.headshot(e)
if string.find(string.lower(g_Entity[e]['limbhit']), "head") ~= nil then
SetEntityHealth(e,0)
ResetLimbHit(e)
end
end
function ai_soldierprueba2_exit(e)
g_KillCount = g_KillCount + 1 -- Normal kill - Change to your specs
end
For the soldiers that are unkillable i use "SetEntityHelath(e,10000)" so they wont die when they get headshot.
So far i can make a level where all enemies are unkillable OR a level where all enemies can be killed. But i cant combine them.
Can someone help me with this? PLEASE
The author of this post has marked a post as an answer.
Go to answer