Parallel code confusion

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.
Post Reply
Message
Author
SovereignClock
Newbie
Posts: 4
Joined: Thu Aug 27, 2015 12:07 pm
Contact:

Parallel code confusion

#1 Post by SovereignClock »

Sorry for the cheesy name. Anyway, I'm attempting to hide three images at the same time. I tried to just put in:
hide MainCharacter with fade
hide Demetri with fade
hide GrassyField with fade

Everything was just peachy, but the problem was that the game faded three times, to hide each image separately. I want to make them fade at the same time. In the tutorial, which I frequented until I found it doesn't work exactly the same as this version, it says to use parallel. Unfortunately it doesn't give any examples while going through the tutorial, so I looked in the code for the tutorial. There were very few times it used parallel, and when I tried the ways it used my game threw up a screen saying:

'comma or expected end of line' not found

And it had a little arrow pointing away from the code that I had written, which was essentially the same as above, except I had 'parallel:' before each and those above were indented after each parallel. I looked to the tutorial again and it also used parallel in an image, so I defined it as an image:

image fade1:
parallel:
hide MainCharacter with fade

And so one with the others above. It said "= or expected statement not found". So I turn to here, with all kinds of people who frequent this site and Ren'Py, in the hopes that they can help. Also, a bit of a side question, how does one switch from one script file to another, like the tutorial has a different script file for each demo it has, and then it has the main script file. Would you be able to use label and jump to switch, or is there something the tutorial didn't go over?

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: Parallel code confusion

#2 Post by trooper6 »

You want:

Code: Select all

hide MainCharacter
hide Demetri
hide GrassyField
with fade
Though I think this looks better:

Code: Select all

hide MainCharacter
hide Demetri
hide GrassyField
with dissolve
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

SovereignClock
Newbie
Posts: 4
Joined: Thu Aug 27, 2015 12:07 pm
Contact:

Re: Parallel code confusion

#3 Post by SovereignClock »

I just put it in, and it worked. Thank you, Good One. There was no need for parallel at all. Thank you ever so much.

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: Parallel code confusion

#4 Post by trooper6 »

My pleasure!
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]