Lemma Soft Forums

Supporting creators of visual novels and story-based games since 2003.


Visit our new games list, blog aggregator, IRC, and wiki.
Activation problem? Email [email protected]
It is currently Wed Jun 19, 2013 11:09 am

All times are UTC - 5 hours [ DST ]


Forum rules


Ask questions about one topic per thread, and use a descriptive subject. "NotImplemented error in script.rpy" is a good subject, "Tom's problems" is not. Remember to include all of traceback.txt or error.txt when reporting a problem, as well as the relevant lines of script. Use the [code] tag to format scripts.



Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Wed May 09, 2012 4:33 pm 
Eileen-Class Veteran
User avatar

Joined: Fri Mar 09, 2012 6:58 pm
Posts: 1173
Location: United States
Projects: Coming Out On Top
Oof. Don't know what I'm doing wrong but I copied this code exactly from the documentation about showing layered sprites. (From here: http://www.renpy.org/wiki/renpy/doc/coo ... t_emotions)

Code:
#Put this in your init section!
init:
#This declares a conditional image with a LiveComposite inside of it
image eileen = ConditionSwitch(
            "e_face == 'happy", LiveComposite(
                #If she's happy, call the LiveComposite
                (375, 480),
                (0, 0), "e.png",
                #This is the size of the sprite in widthxheight of pixels
                #I'm telling it not to move e.png but use the base dimensions and
                #the path to e.png. If I had it in a folder, it would be
                #"/foldername/imagename.format"
                #This is probably the "base" image or body.
                (94, 66), "e_happy.png",
                #This is 94 pixels to the right and 66 pixels down, if I remember correctly
                #This is the alternate face layer, which is put on top of the stack.
                #So the order goes bottom to top when you're listing images.
                ),
            "e_face == 'sad", LiveComposite(
                (375, 480),
                (0, 0), "e.png",
                (94, 66), "e_sad.png",
                #Don't forget your commas at the end here
                ),
            "e_face == None", "e.png")
            #If it's not set to anything, the neutral base "e.png" displays
            #Be sure to close your parentheses carefully

label start:
#This is how you call it during the game itself
show eileen
#This shows the LiveComposite "e.png" when e_face == None. We haven't changed it yet.
e "I'm neutral."
#Now we change the variable to happy.
$ e_face = "happy"
e "Now sprite is happy!"
#You can also declare ConditionSwitches in Character statements to
#change the side image.



The error I'm getting:

Quote:
I'm sorry, but an uncaught exception occurred.

While running game code:
File "game/p1.rpy", line 9, in script
SyntaxError: EOL while scanning string literal (<none>, line 1)

_________________
Coming Out On Top - An Adult B/B Game
Wordpress Tumblr Twitter FB


Top
 Profile Send private message  
 
PostPosted: Wed May 09, 2012 5:30 pm 
Eileen-Class Veteran
User avatar

Joined: Fri Mar 09, 2012 6:58 pm
Posts: 1173
Location: United States
Projects: Coming Out On Top
Um...is the Cookbook in error? There needs to be two apostrophes around 'happy' and 'sad' and not just one?!

The only way I figured this out was because I downloaded Risamo's script code and compared them line by line. (A million thanks to Camille and Auro_Cyanide!!!)

Perhaps I'm wrong...but maybe the Cookbook needs to be edited before another poor newb tears his/her hair out?

:oops:

_________________
Coming Out On Top - An Adult B/B Game
Wordpress Tumblr Twitter FB


Top
 Profile Send private message  
 
PostPosted: Thu May 10, 2012 6:01 am 
Crawling Chaos
User avatar

Joined: Mon Feb 13, 2012 5:37 am
Posts: 1148
Location: Kimashi Tower, Japan
Completed: SMAR,AAA
Projects: DMC
I think the wiki is already outdated and no one maintains it anymore, isn't it?

_________________


Top
 Profile Send private message  
 
PostPosted: Thu May 10, 2012 4:49 pm 
Ren'Py Creator
User avatar

Joined: Mon Feb 02, 2004 10:58 am
Posts: 10849
Location: Kings Park, NY
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Pretty much. It's also very hard to maintain - it was getting a lot of spam, so I now have to approve people to edit it.

_________________
Another Old-Fashioned Bishoujo Gamer
Supporting creators since 2004; Code > Drama
(When was the last time you backed up your game?)
"It is not the critic who counts; not the man who points out how the strong man stumbles, or where the doer of deeds could have done them better. The credit belongs to the man who is actually in the arena, whose face in marred by dust and sweat and blood; who strives valiantly; who errs, who comes short again and again, because there is no effort without error and shortcoming" - Theodore Roosevelt


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: Badriel, Bing [Bot]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Protected by Anti-Spam ACP
Powered by phpBB® Forum Software © phpBB Group