Today I learned how to make a health packs in game by using "if" statement , what i did : I found a sprite from online, then i loaded into gamemaker, I create a object for the healthpacks, then I added a collision event, and I used a "if" statement to make the gain health after the character i've taken damage, whenever my character collided with the healthpack, it will gain 1 value of life. once the character revice a healthpack, it will destroy healthpack itself.
The next day i'm going to create a pause menu ingame, so that whenever the player wants to pause or a break, this function will be useful.
No comments:
Post a Comment