Multiple vboxes in one screen, possible?

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
User avatar
Biotikos
Regular
Posts: 33
Joined: Sat Jan 19, 2013 4:50 pm
Projects: Eien no Mirai
Organization: Biotikos Development
Skype: aleatory-22
Contact:

Multiple vboxes in one screen, possible?

#1 Post by Biotikos »

Okay so I asked about making quicktime events with Python, if it was possible and how, and they answered me with this code:

Code: Select all

 call screen qte_one
       screen qte_one:
                    vbox xalign 0.3 yalign 0.7:
                           imagebutton idle "cg/coco.png" hover "cg/coco ok.png" action Jump("qte_one_success")

                    timer 3.0 action Jump("qte_one_fail")
And it worked; so I wondered if adding another vbox and assigning it a variable $ you could make two QTE appear in the same screen, so I did this:

Code: Select all

call screen qte_two
           screen qte_two:
                    vbox xalign 0.4 yalign 0.3:
                           imagebutton idle "cg/coco.png" hover "cg/coco ok.png" 
                           $ coco1 = True
                    vbox xalign 0.6 yalign 0.7:
                           imagebutton idle "cg/coco.png" hover "cg/coco ok.png" 
                           $ coco2 = True 
                           
                    timer 2.0 action Jump("qte_two_fail")
                    
           label qte_two_success if coco1 and coco2 == True:
And it throws me this:

Code: Select all

File "game/script.rpy", line 1460: expected ':' not found.
    label qte_two_success if coco1 and coco2 == True:
I knew you couldn't place two variables (coco1 and coco2) in the same string, but I still tried, and obviously it didn't work.
How can I make it work?

Asceai
Eileen-Class Veteran
Posts: 1258
Joined: Fri Sep 21, 2007 7:13 am
Projects: a battle engine
Contact:

Re: Multiple vboxes in one screen, possible?

#2 Post by Asceai »

Code: Select all

if coco1 and coco2 == True:
    label qte_two_success

Post Reply

Who is online

Users browsing this forum: No registered users