Search found 322 matches

by henvu50
Thu Sep 06, 2018 11:58 am
Forum: Ren'Py Questions and Announcements
Topic: How to return the index of an array in a for loop?
Replies: 5
Views: 926

How to return the index of an array in a for loop?

Code: Select all

for item in arrayTest:
  # what index array number are we on ?
  text arrayTest.index(item) + "\n" 
How do I get the index number the loop is on? When it loops, I should have access to a number that represents what count the loop is on, how do I access the loop count number?
by henvu50
Wed Sep 05, 2018 8:35 pm
Forum: Ren'Py Questions and Announcements
Topic: Can someone post example code of a yes or not prompt box?
Replies: 2
Views: 290

Re: Can someone post example code of a yes or not prompt box?

This code lets you pause and wait until the user click yes or no, then it automatically bypasses the pause when they click yes or no. # the code renpy.curry(renpy.end_interaction)(True) lets you bypass a pause, so it occurs when user presses yes or no $ tutorialEnabled = False $ layout.yesno_screen(...
by henvu50
Wed Sep 05, 2018 8:22 pm
Forum: Ren'Py Questions and Announcements
Topic: Can someone post example code of a yes or not prompt box?
Replies: 2
Views: 290

Re: Can someone post example code of a yes or not prompt box?

This is what I have so far which works. $ tutorialEnabled = False $layout.yesno_screen("Enable tutorial?", yes=SetVariable('tutorialEnabled ', True)) But the problem I have now is that my introduction plays while the yes no prompt is shown. If I add a pause, the start of the game will stay paused ev...
by henvu50
Wed Sep 05, 2018 7:57 pm
Forum: Ren'Py Questions and Announcements
Topic: Can someone post example code of a yes or not prompt box?
Replies: 2
Views: 290

Can someone post example code of a yes or not prompt box?

I need to ask the user if they want the tutorial enabled. If they choose yes, I need to store a true variable and if they choose no, I need to store a false variable. I tried searching the forum & wiki, but there was no examples on this subject. I'm trying to do something like this: #if user clicks ...
by henvu50
Wed Sep 05, 2018 5:46 pm
Forum: Ren'Py Questions and Announcements
Topic: How do I assign a string to an entry in a fixed array?
Replies: 1
Views: 206

Re: How do I assign a string to an entry in a fixed array?

ok solved, hopefully this helps out others in future

Code: Select all


    $ learnArrays = [None] * 32000

    $ learnArrays [31999] = "banana"
    
    eileen "The value of entry 31999 in the array is %(learnArrays[31999])s"

Now to learn if python can do multi dimensional arrays
by henvu50
Wed Sep 05, 2018 5:37 pm
Forum: Ren'Py Questions and Announcements
Topic: Adding label to frame results in align not working.
Replies: 3
Views: 320

Re: Adding label to frame results in align not working.

I don't think we're supposed to put labels, imagebuttons & text into a frame. I think that may have something to do with it.
by henvu50
Wed Sep 05, 2018 5:35 pm
Forum: Ren'Py Questions and Announcements
Topic: How do I assign a string to an entry in a fixed array?
Replies: 1
Views: 206

How do I assign a string to an entry in a fixed array?

How can I do something like this? # set array to a fixed size of 31999 ??? $ learnArrays = [None] * 32000 # assign a string variable to array entry 31999 $ learnArrays (31999) = "banana" eileen "The value of entry 31999 in the array is %(learnArrays(31999))s" I want to declare a fixed array size, as...
by henvu50
Wed Sep 05, 2018 3:44 pm
Forum: Ren'Py Questions and Announcements
Topic: Adding label to frame results in align not working.
Replies: 3
Views: 320

Re: Adding label to frame results in align not working.

This makes no sense. Align is not working. The screen frame ends up at 0,0 ...

Code: Select all

screen test_screen:
    frame:
        align (0.5, 0.2)  #ALIGN IS NOT WORKING?!
        label "wtf"
by henvu50
Wed Sep 05, 2018 3:20 pm
Forum: Ren'Py Questions and Announcements
Topic: Adding label to frame results in align not working.
Replies: 3
Views: 320

Adding label to frame results in align not working.

When I add a label to the frame, the align statement no longer works. If I remove label "wtf" , the frame aligns where it should. screen test_screen: frame: background "testb.png" label "wtf" align (0.5, 0.2) side "c r": area (55, 55, 875, 875) viewport id "viewport_test": draggable True mousewheel ...
by henvu50
Wed Sep 05, 2018 2:12 pm
Forum: Ren'Py Questions and Announcements
Topic: Make viewport only show vertical scrollbar when needed?
Replies: 2
Views: 418

Make viewport only show vertical scrollbar when needed?

This code shows a vertical scrollbar on the right hand side of a viewport. The problem is that the vertical scrollbar is shown at all times. I only want it to appear when the viewport is filled beyond the area limits. screen test_screen: frame: background Solid("#00000090") align (0.5, 0.5) side "c ...
by henvu50
Wed Sep 05, 2018 1:25 pm
Forum: Ren'Py Questions and Announcements
Topic: How do remove hide bottom scrollbar from viewport?
Replies: 1
Views: 285

Re: How do remove hide bottom scrollbar from viewport?

For some reason it's working now.

I removed the following line of code to remove the horizontal scrollbar on the bottom:

remove this line:

Code: Select all

bar value XScrollValue("viewport_test")
by henvu50
Wed Sep 05, 2018 12:58 pm
Forum: Ren'Py Questions and Announcements
Topic: How do remove hide bottom scrollbar from viewport?
Replies: 1
Views: 285

How do remove hide bottom scrollbar from viewport?

I want to hide the bottom horizontal scrollbar. screen test_screen: frame: background Solid("#00000090") align (0.5, 0.5) side "c b r": area (0, 0, 600, 400) viewport id "viewport_test": draggable True mousewheel True vbox: for i in range(25): text "hello [i]" bar value XScrollValue("viewport_test")...
by henvu50
Wed Sep 05, 2018 12:45 pm
Forum: Ren'Py Questions and Announcements
Topic: Hiding the horizontal scrollbar when making a viewport
Replies: 3
Views: 1275

Re: Hiding the horizontal scrollbar when making a viewport

When I change

Code: Select all

 side "c b r": 
to

Code: Select all

 side "c r": 
I get error: "side has been given too many arguments"

This is stupid, I can't get rid of the bottom scrollbar, lol. Jesus.
by henvu50
Tue Sep 04, 2018 11:12 am
Forum: Ren'Py Questions and Announcements
Topic: How to make introduction text?
Replies: 7
Views: 751

Re: How to make introduction text?

another example.. image textv1 = ParameterizedText(xalign=0.5, yalign=0.4) image textv2 = ParameterizedText(xalign=0.5, yalign=0.5) image textv3 = ParameterizedText(xalign=0.5, yalign=0.6) label start: scene black pause 1.0 show textv1 "Welcome." with dissolve pause show textv2 "There are many inte...