Search found 101 matches

by MaydohMaydoh
Thu Jul 12, 2018 11:36 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Trying to create a simple math minigame. Strange list index out of range error?
Replies: 15
Views: 712

Re: Trying to create a simple math minigame. Strange list index out of range error?

Need add "False" to the if statement too as you're searching for a tuple in the list and not a single value.

Code: Select all

if ( ( (correct_value + modifier), False) not in chess_answer_list)
by MaydohMaydoh
Thu Jul 12, 2018 9:59 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Trying to create a simple math minigame. Strange list index out of range error?
Replies: 15
Views: 712

Re: Trying to create a simple math minigame. Strange list index out of range error?

Think the index method for list should use parenthesis

Code: Select all

chess_pieces_values[ chess_pieces_list.index( pieces[ 0 ] ) ]
by MaydohMaydoh
Thu Jul 12, 2018 4:04 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Trying to create a simple math minigame. Strange list index out of range error?
Replies: 15
Views: 712

Re: Trying to create a simple math minigame. Strange list index out of range error?

Might be an idea like in Remix's example to put each renpy.random.choice into a variable before showing it. As for displaying the same image twice, you need to give them a tag to allow for it to be shown more than once, so it should look something like the following. chess1 = renpy.random.choice(che...
by MaydohMaydoh
Thu Jul 12, 2018 1:54 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Trying to create a simple math minigame. Strange list index out of range error?
Replies: 15
Views: 712

Re: Trying to create a simple math minigame. Strange list index out of range error?

You need to put a comma between each item in the lists to separate them like,

Code: Select all

math_signs_list = [
	"x",
	"/",
	"+",
	"-"
]
by MaydohMaydoh
Thu Jul 12, 2018 6:19 am
Forum: Ren'Py Questions and Announcements
Topic: Unaligned button
Replies: 2
Views: 184

Re: Unaligned button

This happened to me a few times, where ui objects seem to get random style properties. Like 2 of my main menu buttons decided to set xfill to true and I couldn't figure out why and in the end I just had to manual set xfill to false. You could try forcing the size with xsize & ysize maybe? But I woul...
by MaydohMaydoh
Wed Jul 11, 2018 5:59 am
Forum: Ren'Py Questions and Announcements
Topic: Align a viewport to bottom of parent element, or scroll viewport to bottom when updated
Replies: 4
Views: 331

Re: Align a viewport to bottom of parent element, or scroll viewport to bottom when updated

If you assign y outside of the screen at the top of your python block, you can change it outside of the screen and then add the y.value to the tweet function meaning it will only scroll to the bottom when that function is called to display a new tweet. That seems to keep the position when you open/c...
by MaydohMaydoh
Mon Jul 09, 2018 3:41 pm
Forum: Ren'Py Questions and Announcements
Topic: Rotate Textbutton for inventory (Design)
Replies: 1
Views: 183

Re: Rotate Textbutton for inventory (Design)

I think you can use a transform here to rotate them. Something like init: transform rotate_btn(): rotate -60 screen inventory(): hbox spacing -10: for evidence_item in evidence_list: textbutton evidence_item.name xysize (300, 25) at rotate_btn: action (SetScreenVariable(name='selected_item', value=e...
by MaydohMaydoh
Mon Jul 09, 2018 7:19 am
Forum: Ren'Py Questions and Announcements
Topic: Align a viewport to bottom of parent element, or scroll viewport to bottom when updated
Replies: 4
Views: 331

Re: Align a viewport to bottom of parent element, or scroll viewport to bottom when updated

Changing

Code: Select all

y.change(9999)
to

Code: Select all

y.value += 9999
in the viewport demo is the only way I can figure out. Hope it helps.
by MaydohMaydoh
Mon Jul 09, 2018 6:04 am
Forum: Ren'Py Questions and Announcements
Topic: Transition from Main Menu to entering the Game?
Replies: 2
Views: 243

Re: Transition from Main Menu to entering the Game?

I just added a transition directly to the Start function. init -2 python: class Start(Action, DictEquality): """ :doc: menu_action Causes Ren'Py to jump out of the menu context to the named label. The main use of this is to start a new game from the main menu. Common uses are: * Start() - Start at t...