I'm adding a new comment to this as I'd like to follow up on this for the Accompany Quest code. I've tried to write something myself, but I'm not a coder, and I can't figure out how to get the script to display the "failed" message and then kill the player.
This is what I've tried:
thisentityhealth = {}
ObjBeingAttacked = 1
function showentityhealthglow1_init(e)
end
function showentityhealthglow1_main(e)
PromptLocal(1,"Health: " ..g_Entity[EntObjNogate]['health'])
newhealth= g_Entity[1].health
if newhealth<1 then TextColor( 45, 80, 1, "Your Friend Died - You Failed!", 255, 0, 0 )
then HurtPlayer(e,g_PlayerHealth)
end
end
But it doesn't work. Can anyone see where it's going wrong and offer any solutions? I'm just stumped as to making things work in sequence with the right parsing. Would be nice to get this working, I think, as there's a lot of potential in this, but I just don't have the coding skills myself.