bioshards Posted August 29, 2014 Share Posted August 29, 2014 how do i make this script only activate when TargetHit's health reaches a certain point, i dont know what the command for that is Ref TargetHit Begin ScriptEffectStart Set TargetHit to GetSelf If TargetHit.GetIsCreatureType 6 != 1 player.PushActorAway TargetHit 1 TargetHit.damageav Fatigue 100 End Link to comment Share on other sites More sharing options...
PKarch Posted August 29, 2014 Share Posted August 29, 2014 Hey Bio, I'm not a scripter but I looked some stuff up and I think I might have found something to point you in the general direction. If I'm understanding your script, it says to target the person that you hit and then run this script, but you want it to check if the health is below a certain amount before it runs the script. To check the health of a target I think you you would use player.getav <variable> with the variable being health in this situation.So it might look like this. (I don't know how you specify less than in script) If player.getav health = (under this amount of health) I'm also not sure where in your script this would go. Just an idea from looking at commands. I might be completely wrong though, sorry I can't hep anymore. Link to comment Share on other sites More sharing options...
Ladez Posted August 29, 2014 Share Posted August 29, 2014 PKarch is right about GetAV. Just add it as another condition in your if statement. This will run if TargetHits health is at or below 50. I also added a missing EndIf so your script will compile. Ref TargetHit Begin ScriptEffectStart Set TargetHit to GetSelf If TargetHit.GetIsCreatureType 6 != 1 && TargetHit.GetAV Health <= 50 player.PushActorAway TargetHit 1 TargetHit.damageav Fatigue 100 EndIf End Link to comment Share on other sites More sharing options...
bioshards Posted August 30, 2014 Author Share Posted August 30, 2014 PKarch is right about GetAV. Just add it as another condition in your if statement. This will run if TargetHits health is at or below 50.this right here, when i publish this mod i will put your name in the credits, much appreciated Link to comment Share on other sites More sharing options...
Recommended Posts