Jump to content
Sign in to follow this  
Primordial Ooze

Life Bar Color Off

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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites
I'm pretty sure the bug is in your code, not in bAtariBasic itself, but I haven't found it yet. Maybe someone else can.
You are correct, the problem was not with bB. I replied to the bug report thread, where this question was also asked.

Share this post


Link to post
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.

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...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...