Pygan Posted September 8, 2010 Share Posted September 8, 2010 Is there any kind of function to modify the health percentage of a person/creature? I want to be able to drop someones health by 50% if i wanted to. As far as i can tell i can only modify the value by a given amount not a percentage.It would also be nice if there was a function that could return the health as a percentage. I feel like this has to be possible and i'm just missing something. Link to comment Share on other sites More sharing options...
Hickory Posted September 8, 2010 Share Posted September 8, 2010 This is totally untested, and is not a final script, but comes to mind (need to find your ActorREF, obviously): Short PercentageShort HealthAmountFloat ReduceHealthAmount Begin GameMode set Percentage to 50 set HealthAmount to <ActorREF>.GetActorValue Health set ReduceHealthAmount to HealthAmount * ( Percentage / 100 ) <ActorREF>.ModActorValue Health ReduceHealthAmount set HealthAmount to 0 set ReduceHealthAmount to 0 End Link to comment Share on other sites More sharing options...
Recommended Posts