A
Anti-Icarus
Guest
Following along a few chapters of The Game Maker's Companion, I was able to create a near-perfect Zool game. Given the fact that said book was written with Game Maker 8 aka GM: Legacy in mind, the prescribed methods I used to make it still hold up well in GameMaker: Studio. But by the end of Chapter 6, I encountered one bug that I've been having trouble fixing: getting the game to draw only 3 units of health. Now, the character, Zool, is supposed to have 3 units of health when the game starts. Technically, the game has only one room and the variable health is supposed to be set to 3 at the Room Start event of obj_zool. Whenever Zool gets hit by a hazard or an enemy, he loses 1 unit of health. If all 3 units of health are lost, Zool dies, loses 1 life, and the room resets. Technically speaking, when Zool loses all 3 units of health, the instance of the zool object is replaced by the instance of obj_zool_dead, a child object parented to obj_zool that is set to perform the following actions at the Create event:
And the Animation end event:
Here is how that works in the Zool game made in the original Game Maker software:
And here is what has been happening when I attempted to get this to work in GameMaker: Studio:
As this image indicates, the unit's of Zool's health go on forever, meaning that he never never loses health and, therefore, cannot die and lose a life no matter how many times Zool gets hit by hazards. There are 2 possible sources of this problem:
And the Animation end event:
Here is how that works in the Zool game made in the original Game Maker software:
And here is what has been happening when I attempted to get this to work in GameMaker: Studio:
As this image indicates, the unit's of Zool's health go on forever, meaning that he never never loses health and, therefore, cannot die and lose a life no matter how many times Zool gets hit by hazards. There are 2 possible sources of this problem:
- The Room Start event of obj_zool where the variable health is initialized to 3, which is supposed to give Zool only 3 units of health when the room starts.
- One of the actions of obj_health in its Step event: