To this end I'm trying to set up a system that largely avoids labels in their traditional Ren'Py usage and instead parses its own nodes that it reads from the TweeCode source - I was wondering if anyone has suggestions on what the best way to set this up would be.
The short of the question is this: I've looked at some of the previous threads on the topic of using hyperlinks with an override of the default 'config.hyperlink_callback' function. I'm using this in kind of a weird way in that I'm getting the hyperlink function to set a parameter for what scene it wants to display and always jump to the same 'blank' label, which has a function that gets the scene parameters and displays the appropriate text on the screen.
i.e. It's kind of this setup, where sceneDict is just a dictionary of single-screen labels with a string identifier such as 'start' and some text (with hyperlinks in it):
Code: Select all
def hyperlinkCallback(hyperLink):
global nextScene
nextScene = hyperLink
renpy.jump('blank')
config.hyperlink_callback = hyperlinkCallback
def playScene(scene):
nvl_clear()
narrator(sceneDict[scene])
label start:
python:
playScene('Start')
label blank:
$playScene(nextScene)My only problem is that left-clicking anywhere that's not a hyperlink advances the game - i.e. finishing the game because there are no more say functions left. I suspect I could circumvent this easily enough by adding a jump to 'blank' at the end of blank, but that would be a really dirty way of doing it and would probably duplicate the label lots of times in the rollback buffer =/
So ideally I'd like to figure out a way of disabling left-click to advance while keeping the hyperlinks around! Closest I've found is http://lemmasoft.renai.us/forums/viewto ... f=6&t=3461 which I've gotten to work, but it prevents me from clicking on anything - including the hyperlinks.
Alternatively, interested if anyone has a better idea on how to structure this sort of thing altogether ^^


