Jump to content

I need help scripting


bioshards

Recommended Posts

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

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

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...