Hey,
I’m currently working on a space shooter and I’m starting to add power-ups to it. I had a power-up that gave you an extra life but then i switched from lives to health and I’m having a bit of trouble. I’m sort of familiar with If statements but not sure how to format them using Javascript. I want to be able to add 50 health if the players health is below 50 points, and if their health is at 50 or above i want to just make their health an even 100.
Here’s what I have:
(Scripts Below)
I also tried doing a If/Else statement but I also wasn’t sure how to do that.
Any help is appreciated and if I’m doing it completely wrong then just say so!
Thanks.