okay, so I have a few questions about a screen I'm putting together as a python function. basically it just displays the health and the name above a character. I'm pretty sure I got the original code from the rpg frame from the renpy cookbook, in fact.
the whole code of my screen goes like this:
Code:
def EnemyFrame(character, **properties):
ui.frame(xfill=False, yminimum=None, **properties)
ui.vbox()
ui.text([character[1]], size=20)
ui.hbox()
ui.text("HP", size=20)
ui.null(width=5)
ui.vbox()
ui.hbox()
ui.text([character[4]], size=10)
ui.text(" / ", size=10)
ui.text([character[3]], size=10)
ui.close()
ui.bar(character[3], character[4],
xmaximum=100,
left_bar=Frame("art/battlesprites/effects/hpslider_full.png", 12, 0),
right_bar=Frame("art/battlesprites/effects/slider_empty.png", 12, 0),
thumb=None,
thumb_shadow=None)
ui.close()
ui.close()
ui.close()
for starters, is it possible to change the colour of the frame? I want some to be one colour, and others another, but I'm not sure if it's possible to set frames to different colours. and if it is possible, can you also do it in regular screen language? some frames are a little gross to look at because of colour clashing, so it'd be great to be able to change the colours of the frame on the fly.
for secondsies, renpy doesn't seem to like me displaying numbers in ui.text? character[1] is "Bro", and that displays fine. character[3] and character[4] are both 500 atm, no quotes, because I need to edit them in the battle. but when I run it, it says "Exception: Cannot display 500 as text.", so I'm clearly doing something wrong here. putting ""s around the variable names just gives me an "KeyError: 'character'" error, so I don't think that's it either. idk. does anyone have any ideas?
and thirdly and finally, I'm having a bit of trouble with the bar itself. I included a screenshot of the problem, but basically the thing is that although the bar should be full (both character[3] and [4] are the same value), it's not displaying as totally full. it doesn't help that I don't really understand the bar code, so can anyone help me with that? even just understanding what the magic numbers are standing in for would be super great.