![]() Since in the first method you are working with the variable global.bossHealth, which was defined by you, instead of health, a built-in variable modeled around the GM:S framework functionalities, there's absolutely no chance your No More Health Events will be triggered. Used to reduce the number of lives or to restart the game or room. Whenever the health becomes less than or equal to 0. Variable as well as to draw a health-bar, with code available toĬhange them too should you prefer to use GML. ![]() There are actions to set and change the health GameMaker: Studio has a built-in health system, which, like LivesĪbove, is basically a global scope variable that is created for you at The No More Health Event is triggered by checking for the value of variable health. The reason your obj_GameOver and obj_BtnOK won't appear is because you are checking the wrong variable. How can I fix this? Please explain your answer. ![]() ![]() Step Event: if global.bossHealth is equal to 0 then create instance of obj_GameOver and create instance of obj_BtnOK No More Health: create instance of obj_GameOver create instance of obj_BtnOK When obj_Boss has no more health, obj_GameOver and obj_BtnOK will appear.Ĭreate Event: set var global.bossHealth to 100Ĭollision with obj_rec2: set var global.bossHealth relative to -1.5 destroy the instance (other) I have five objects: obj_Boss, obj_bossHealth, obj_GameOver, obj_BtnOK, and obj_rec2. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |