Jump to content
IGNORED

Multiple Lives?


MausGames

Recommended Posts

Is it possible to use multiple sprite definitions with the 6lives HUD? I would like to use it as a timer, ammo counter, and power meter all in the same game, with a different graphic for each.

 

I don't mean multiple graphics at the same time, but that would be extremely awesome. I mean different sprite definitions that can be switched between in different parts of a game.

The bB online help manual says: "When you assign a number of lives, you ALWAYS need to define (or redefine) the life icon using lives: or the icon won't display correctly." That means you can change the life icon at any time by setting the number of lives and (re)defining the life icon. Note that you can set the number of lives to a variable:

 

   rem * test lives
  include 6lives.asm
  dim frames = a
  dim hearts = b
  dim flasks = c
  frames = 0
  hearts = 5 * 32
  flasks = 3 * 32
first
  lifecolor = $44
  lives = hearts
  lives:
  %00010000
  %00111000
  %01111100
  %11111110
  %11111110
  %11111110
  %11111110
  %01101100
end
loop1
  drawscreen
  a = a + 1
  if a <> 0 then loop1
second
  lifecolor = $94
  lives = flasks
  lives:
  %01111100
  %11111110
  %11111110
  %01111100
  %00111000
  %00111000
  %00111000
  %01111100
end
loop2
  drawscreen
  a = a + 1
  if a <> 0 then loop2
  goto first

Michael

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...