Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Hello all, I feel like the solution is more obvious than what I'm making it out to be, but I'm at a mental block filtering through/implementing to no success similar codes.
So what I'm trying to design is a mechanic where performing certain actions cost certain stats (i.e. map navigation costs x stamina, interacting with an npc costs x stamina). In other words, there's an imagemap/navigation mode and and ADV/choice mode. I'm thinking this can be done within the block of code related to that particular stat change; however, I'm not sure on how to proceed. T.T...
def sta_earn(self, amount):
self.stamina+= amount
if self.stamina< 0:
self.stamina= 0
"????" <--- Not sure what to do here
elif self.stamina> 100:
self.stamina= 100
*I've thought about a renpy.jump ("label for being to tired"), but I'm not sure how to route it to jump back/handle every situation.