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.
This seemed like a different enough topic from my other post to make it separate but I'm trying to call a label based on some variables. I thought that I could use [] but since I don't know renpy, I learned that was wrong fast.
Hers the long and short: During a minigame I want to call in cutcenes. So for example after round 1 it will call
# before the game
$ challenger = Annette
# Then durning the game
...
label won_the_round:
"You win"
$ roundsWon += 1
call [challenger]_win[roundsWon]
jump game
# and what I'd be calling
label Annette_win1:
"some text here, blah blah..."
return
label Annette_win2:
"some text here, blah blah..."
return
But clearly this is wrong. Any I coding it incorrectly or is what I'm trying to do not possible?
i am sorry if i sound rude but isn't this thread is posted on the wrong section?
this section is only for completed game, you should post question here: Ren'Py Questions and Announcements
I am lurking behind every corner of the world just to seek one special spice for my life.
damonRuru wrote: ↑Sat Jul 20, 2019 9:31 pm
i am sorry if i sound rude but isn't this thread is posted on the wrong section?
this section is only for completed game, you should post question here: Ren'Py Questions and Announcements
cr@p... you're right...
I went to the wrong category. Can I delete my post?
default challenger = "anne"
default round = 5
# str() converts the int variable into a string -- I don't know if call expression will convert variables into strings for you
call expression challenger + "_round_" + str(round)
## would call this:
label anne_round_5:
#stuff
return
##i'm placing variables here since I don't know what yours are
default challenger = "anne"
default match = "match1"
call expression challenger + "_" + match + "_intro"
## would call this:
label anne_match1_intro:
#stuff
return