Scripts / [SOLVED] Respawn AI Script update

Author
Message
Tiger1980
User Offline
Joined: 21st Mar 2021
Location:
Posted: 28th Mar 2021 14:15
Can someone help me to update this script, because GetEntityLUAHealth no longer exist

gr David

-------------------------------------------------------------------

spawnmaker_cycle = 0

function spawnmaker_init(e)
spawnmaker_cycle = 0
end

function spawnmaker_main(e)
Prompt ("GetEntityLUAHealth(1) = " ..GetEntityLUAHealth(1) .. " spawnmaker_cycle=" .. spawnmaker_cycle )
if g_Time > spawnmaker_cycle then
spawnmaker_cycle = g_Time + 500
if GetEntityLUAHealth(1) <= 0 then
Spawn(1)
end
end
end

The author of this post has marked a post as an answer.

Go to answer
PM
AmenMoses
GameGuru Master
5
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 28th Mar 2021 17:50
This post has been marked by the post author as the answer.
g_Entity[e].health gives you the health of an entity.

So just add:
function GetEntityLUAHealth( e )
return g_Entity[ e ].health
end

to the top of the script.
Been there, done that, got all the T-Shirts!
PM
Tiger1980
User Offline
Joined: 21st Mar 2021
Location:
Posted: 28th Mar 2021 20:25
Thx for help
PM

Login to post a reply

Server time is: 2022-01-25 04:48:52
Your offset time is: 2022-01-25 04:48:52