constraining "Hitsleft" number...
Hi everybody,
here i am again asking for a little help: i have an Integer counter attribute for Hits made by a Player, it's set as 3, and everytime the Player hits an Enemy actor (by colliding with it after having been launched, like a ball), -> change Attribute "game.Hits -1", and when the player stops its movement, change Attr. "game.Hits-1".
i have of course another Actor that Displays the Hits left. my problem is that sometimes some Enemy gives an extra Hit to the Player, so change Attr. "game.Hits+1", but when the Player stops it set Hits-1 again, so i see the HitsLeft number growing when player collides with Enemy, and when he stop i see the number going down.
if my explanation was clear, what should i do to have the Display Hits left avoiding to show +1 Hit and then -1 Hit when Player stops? in other words, i would like not to see the Hits number growing... is it possible?
here i am again asking for a little help: i have an Integer counter attribute for Hits made by a Player, it's set as 3, and everytime the Player hits an Enemy actor (by colliding with it after having been launched, like a ball), -> change Attribute "game.Hits -1", and when the player stops its movement, change Attr. "game.Hits-1".
i have of course another Actor that Displays the Hits left. my problem is that sometimes some Enemy gives an extra Hit to the Player, so change Attr. "game.Hits+1", but when the Player stops it set Hits-1 again, so i see the HitsLeft number growing when player collides with Enemy, and when he stop i see the number going down.
if my explanation was clear, what should i do to have the Display Hits left avoiding to show +1 Hit and then -1 Hit when Player stops? in other words, i would like not to see the Hits number growing... is it possible?
Best Answer
-
jn2002dk Posts: 102
I guess you could store the Hits variable in another variable right before you change it and then have a condition where you display it saying If Hits<=OldHits
Answers