Alright, so I have a script that's calling special functions and the special function is being called just fine (I think), but it's not reading my inventory right. My health is initially set to 100, but no matter what, it always thinks my health is at 0. Anyone know hy it's doing this?
if func.Name = "H- Check" Then
With ProjectObj.gamePlayer
'>= 80% health
If .InvQuantityOwned(4) > 79 Then
.ActivateFunction .rmap.Specials("H- f80")
'>= 60% health
ElseIf .InvQuantityOwned(4) > 59 Then
.ActivateFunction .rmap.Specials("H- f60")
'>= 40% health
ElseIf .InvQuantityOwned(4) > 39 Then
.ActivateFunction .rmap.Specials("H- f40")
'> 0% health
ElseIf .InvQuantityOwned(4) > 19 Then
.ActivateFunction .rmap.Specials("H- f20")
'Dead
ElseIf .InvQuantityOwned(4) = 0 Then
.ActivateFunction .rmap.Specials("H- f0")
End If
End with
End If
My health inventory item is index 4 and I have it displayed in text on my screen and it does say 100.
-edit-
I've tried setting my health inventory item to various value and it always wants to go to 0 on the if thens.