thousande Posted December 13, 2017 Share Posted December 13, 2017 (edited) Hi I am experimenting with a little quest where I have a Quest script that runs a timer every 5 seconds to check if my essential NPC actoris 'down' With 'down' I mean the actor is sitting on the ground (as essentials can not die) I guess my problem is that I do not have a better term at the moment :wink: If the actor is not essential I guess I could use the Actor#isDead() method which always returns false inmy case which makes sense. So I tried ObjectReference#GetValuePercentage() which yields 'is not a function' in the compiler output. I have also tried Actor#GetValue(HealthAV) which is a step in the right direction but returns 231 somethingwhen the actor is sitting on the ground. Not sure what the value means as I expect it to be 0 My questions are: Is there a method for the state I am looking for?Why can't I call Actor#GetValuePercentage() or friends on my Actor? What is it I do not understand :smile: Here is a simplified version of my script Scriptname TV_MyQuestScript extends Quest Actor Property NPCActor Auto Const ActorValue property HealthAV Auto int timerId = 10 int delay = 5 Function CheckStatus() int npcHealth = NPCActor.GetValue(HealthAV) as int Debug.Notification("health" + npcHealth) if npcHealth == 0 SetCurrentStageID(20) else StartTimer(delay, timerId) endif EndFunction Event OnTimer(Int aiTimerID) CheckStatus() EndEvent Thank you in advance and forgive my horrible English (it is not my first language) Thomas Edited December 13, 2017 by thousande Link to comment Share on other sites More sharing options...
SKKmods Posted December 13, 2017 Share Posted December 13, 2017 If the NPC is assigned to a quest alias (it should be) then attach a script to the quest alias with something like: Event OnEnterBleedout() Self.GetOwningQuest().SetCurrentStageID(20) EndEvent Link to comment Share on other sites More sharing options...
thousande Posted December 14, 2017 Author Share Posted December 14, 2017 ah! Thanks! .isBleedingOut() it is Thank you very much! Link to comment Share on other sites More sharing options...
Recommended Posts