Jump to content
IGNORED

Life Bar Color Off


Primordial Ooze

Recommended Posts

The life bar is supposed to change color from green(no missed), to yellow(1 miss) to red(2 misses) and then completely disappear(lost 3 misses). However the first time it starts black, then yellow, then red and disappears and then it turns orange, yellow then green. The code that sets the color of the lives counter is pasted below and i have attached the full source to my game as a .bas file.

	rem if the player hasn't missed then set the live bar color to green
if lives > 64 && lives < 97 then lifecolor = 192

rem if the player missed once then set the live bar color to yellow
if lives > 32 && lives < 65 then lifecolor = 30

rem if the player missed twice times then set the life bar color to red
if lives > 0 && lives < 33 then lifecolor = 78

Can anyone tell me what i'm doing wrong?

 

Sincerely,

 

Xlanky

Edited by Open Source Pong
Link to comment
Share on other sites

When I run your program and insert the following into your main loop, the numbers are all wrong:

 

  score=0 : temp5=lives
 if temp5>0 then for temp6=1 to temp5 : score=score+1 : next

 

I don't know if this is a bug or something is wrong somewhere in your program. If nothing is wrong with your program and it's a bug, you'll need to adjust your numbers to match what shows up in the score.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...