example:
...if ( Button == 0 ) if player.GetItemCount ItemA == 0 || player.GetActorValue Health < 150 ShowMessage FailureMsg elseif player.GetItemCount ItemA >= 1 && player.GetActorValue Health >= 151 player.RemoveItem ItemA 1 1 player.CastImmediateOnSelf WDIngestibleEffect player.AddItem ItemB 1 set Button to -1 endifendif...
If the player has none of ItemA in their inventory or less than 150hp of health a failure message should display. Else, If I have 1 or more of ItemA and more than 151hp of health, the new item should be added to their inventory and an effect triggered. The effect is not triggering and I'm not sure why, it's a modified ingestible I used successfully in a non-button script so I'm wondering if I've missed something. Also am I using GetActorValue correctly to test against the player's health? I'd prefer to get an exact health amount than something like "GetHealthPercentage".
Final Edit (Grammar and typos)