Hey I am struggling with this code to align left but in all ways it always says TextNode is not defined when in some examples I saw this being executed the same way without defining “TextNode” in the code
the hp attribute is an integer thats why I used str() to convert it into a string
I tied it up with some normal text and inserted it into the OnscreenText()
,thx in advance for helping
def renderStats(hp):
hpstr = "HP:", str(hp)
OnscreenText(text = hpstr, pos = (-1.2, -0.65), align= TextNode.ALeft, scale = 0.07)