Here's an example of a social link.
[youtube]https://www.youtube.com/watch?v=hjl59hB ... hom%C3%A9t[/youtube]
Any suggestions would be appreciated.
script.rpy
Code: Select all
label start:
$ librank = 0
#This sets librank's value to 0.
label morning:
scene cafeteria
"Where shall I go today?"
menu:
"How shall I spend my morning."
#choose one of the two choices.
#Alone has no problems
"Alone":
scene myroom
"I spent time organizing my notes."
#What I want Library to do is to jump to the library label in sociallinks.rpy
"Library":
jump library
label afternoon:
"Now what?"
#I repeat the previous step so that I can test if the social link ranks stack.
menu:
"How shall I spend my afternoon."
"Alone":
scene myroom
"I spent time organizing my notes."
"Library":
jump library
label evening:
"now what?"
menu:
"How shall I spend my evening."
"Alone":
scene myroom
"I spent time organizing my notes."
"Library":
jump library
label done:
"We're done!"
return
Code: Select all
#Social Links
#When the player chooses library, it jumps to the library label. Then it should check the librank. if it's 1 then it should jump to the librank1 label. 2 then it jumps to librank 2. If 0 then it should jump down to the librank0 label.
label library:
if librank = 1:
jump librank1
elif librank = 2:
jump librank2
else:
jump librank0
#After jumping down to one of the labels below, the scene associated with the right label should play then assign librank a new value. Then I would like it to return to script.rpy and play the scene after the chosen choice.
label librank0:
"Yay rank 1"
$ librank = 1
label librank1:
"Rank 2"
$ librank = 2
label librank2:
"Rank 3"
$ librank = 3
Code: Select all
I'm sorry, but an uncaught exception occurred.
While running game code:
File "game/sociallinks.rpy", line 4, in script
if librank = 1:
SyntaxError: invalid syntax (game/sociallinks.rpy, line 4)
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "game/sociallinks.rpy", line 4, in script
if librank = 1:
File "C:\Users\Wesley\Desktop\Renpy\renpy-6.99.3-sdk\renpy\ast.py", line 1656, in execute
if renpy.python.py_eval(condition):
File "C:\Users\Wesley\Desktop\Renpy\renpy-6.99.3-sdk\renpy\python.py", line 1748, in py_eval
code = py_compile(code, 'eval')
File "C:\Users\Wesley\Desktop\Renpy\renpy-6.99.3-sdk\renpy\python.py", line 584, in py_compile
raise e
SyntaxError: invalid syntax (game/sociallinks.rpy, line 4)
Windows-8-6.2.9200
Ren'Py 6.99.12.4.2187
SocialLinks 1.0