not sure if this is comparable, but Im making a spot the difference game and I need a time bar, can I use something similair to the code of this health bar ? Of course it's not hittest related tho, but it should influence the score
10884 Santa Monica Boulevard, 3rd Floor Los Angeles, CA 90025
Posts
1
Just set up two distinct health variables for them - don't call the variable health, that is taken by default. To draw the health bar use different coloured draw_rectangle, or a sprite based health bar by drawing part of the image.
there are a few ways to make health bar.. my favorite:
1. draw a long rectangle
2. make it a movie clip
3. tween the inside color to make it look like the health is decreasing..
4. at the end of the movie clip where the health runs out.. tell it to go to "fail"
5. at beginning.. tell it to stop.. or else it will just play and not work.
6. where you code collisions and hits to your character.. tell the health bar movie clip to advance one frame..
Just set up two distinct health variables for them - don't call the variable health, that is taken by default. To draw the health bar use different coloured draw_rectangle, or a sprite based health bar by drawing part of the image.