Jump to content



0

Multiple Lives?


1 reply to this topic

#1 MausGames OFFLINE  

MausGames

    Dragonstomper

  • 851 posts
  • Location:MO, USA

Posted Sat Mar 22, 2008 4:34 PM

wrong forum...

Edited by MausGames, Sat Mar 22, 2008 4:43 PM.


#2 SeaGtGruff OFFLINE  

SeaGtGruff

    River Patroller

  • 4,543 posts
  • Location:Georgia, USA

Posted Sat Mar 22, 2008 5:04 PM

View PostMausGames, on Sat Mar 22, 2008 6:34 PM, said:

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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users