Search found 1628 matches

by Remix
Fri Jun 04, 2021 9:35 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] How can I pass an argument to a Label from an anchor tag?
Replies: 7
Views: 942

Re: How can I pass an argument to a Lable from an anchor tag?

config.hyperlink_handlers['call_args'] = call_with_arguments or config.hyperlink_handlers.update( {'call_args', call_with_arguments} ) *should* work there... .append is really a list method whereas config.hyperlink_handlers is a dictionary... Once you learn those sequences (dict/list/tuple/set) etc ...
by Remix
Fri Jun 04, 2021 5:42 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED]Changing the position of imagebuttons in call statement?
Replies: 2
Views: 460

Re: Changing the position of imagebuttons in call statement?

Pass any variable parameters you want into the screen, then use as needed... screen GoThere2(pos=(0.5, 0.5), retval="invalid")): imagebutton: pos pos idle "but_gothere_idle" hover "but_gothere_hover" action Return(retval) label x: call screen GoThere2( (0.5, 0.2), "...
by Remix
Tue Jun 01, 2021 10:36 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] How can I pass an argument to a Label from an anchor tag?
Replies: 7
Views: 942

Re: How can I pass an argument to a Lable from an anchor tag?

The simplest way is to just hijack the anchor call: handler and add some logic... init python: def my_call_handler(value): vals = value.split() renpy.call(vals[0], *vals[1:]) config.hyperlink_handlers["call"] = my_call_handler label anchor_jump(arg1=0, arg2=): "Jumped to with [arg1] a...
by Remix
Thu May 27, 2021 1:08 pm
Forum: Ren'Py Questions and Announcements
Topic: Best coding practice for efficient dialogue structure from 16 different possible roleplays for the protagonist?
Replies: 10
Views: 1455

Re: Best coding practice for efficient dialogue structure from 16 different possible roleplays for the protagonist?

Lastly... Character instances can have the condition parameter set to a string which is evaluated to a boolean... default pc_class = "Mage" default pc_alignment = "Good" define evil_mage = Character("Evil Mage", condition = "pc_class=='Mage' and pc_alignment=='Evil...
by Remix
Sun May 23, 2021 5:37 am
Forum: Ren'Py Questions and Announcements
Topic: Viewport vertical length very long. How to reduce?( Using images with zoom statement inside)
Replies: 6
Views: 793

Re: Viewport vertical scrolling area very long.

You have not shown the part of the code that has the images... It is likely that those are what is making the viewport content so large.
by Remix
Fri May 21, 2021 12:38 pm
Forum: Ren'Py Questions and Announcements
Topic: Reversing a list in a vbox
Replies: 5
Views: 714

Re: Reversing a list in a vbox

for i in range(end, start - 1, -1):

begins at end... steps using minus 1 (the 3rd parameter) and ends at one step before start - 1, aka start
by Remix
Wed May 12, 2021 6:22 pm
Forum: Ren'Py Questions and Announcements
Topic: Passwords hidden as Asterisks in renpy?
Replies: 5
Views: 1306

Re: Passwords hidden as Asterisks in renpy?

Or put the input in a fixed with a text (with solid background) directly over it that just shows * times the input length.
by Remix
Tue May 11, 2021 2:25 pm
Forum: Ren'Py Questions and Announcements
Topic: Grayscaling & focus for tutorial?
Replies: 5
Views: 1222

Re: Grayscaling & focus for tutorial?

Ren'Py 7.4.5 onwards... screen highlight_area(pos, size, bg="#455"): fixed: ## You could position and size this to just obscure a part of the screen add Transform( Flatten(Composite( (1280, 720), ## The size of the screen (or the obscured area) (0,0), Solid(bg), pos, Solid("#FFF"...
by Remix
Sun May 09, 2021 6:45 am
Forum: Ren'Py Questions and Announcements
Topic: Grayscaling & focus for tutorial?
Replies: 5
Views: 1222

Re: Grayscaling & focus for tutorial?

Seems you can use blend "multiply" in 7.4.5 to use an overlay image where-in the pixel colour values are used to multiply against the pixel behind... Not quite grayscale though certainly usable for darkening areas that are not active. I might run up an example if I get time this afternoon.
by Remix
Sun May 09, 2021 4:46 am
Forum: Ren'Py Questions and Announcements
Topic: Grayscaling & focus for tutorial?
Replies: 5
Views: 1222

Re: Grayscaling & focus for tutorial?

The professional approach (Ren'Py 7.4 and above) would be to add a transform to the master (and maybe screen/overlay too) layer that used a conditional grayscale shader to calculate whether to draw each pixel with colour or not. That would still have the caveat that any buttons would still be clicka...
by Remix
Sun May 02, 2021 5:30 am
Forum: Ren'Py Questions and Announcements
Topic: How to change an Image variable in the middle of label?
Replies: 3
Views: 803

Re: How to change an Image variable in the middle of label?

With your key actions, both variables can be True, which seems suspect. I would suggest a dynamic image that responds to a single variable... default circle_color = "yellow" image circle = "[circle_color]_circle" ## the [] part makes this respond dynamically to changes in the var...
by Remix
Sat May 01, 2021 5:46 am
Forum: Ren'Py Questions and Announcements
Topic: Show viewport scrollbars only if needed?
Replies: 4
Views: 682

Re: Show viewport scrollbars only if needed?

Use "hide" on the unscrollable style... viewport: scrollbars "vertical" mousewheel True draggable True ymaximum 600 vscrollbar_unscrollable "hide" for itm in my_list: text itm.name size 20
by Remix
Thu Apr 29, 2021 1:23 pm
Forum: Ren'Py Questions and Announcements
Topic: Changing Angle of an Animation, Can't Figure This out
Replies: 1
Views: 490

Re: Changing Angle of an Animation, Can't Figure This out

You could consider defining your images beforehand and then showing a conditionswitch that chose which to display at any moment... Basic code to show what I mean ## define images with actual name image red_sq = Solid("F00") image blu_sq = Solid("00F") ## set a base variable value...
by Remix
Wed Apr 14, 2021 6:37 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Textbox animations, but specifically when a character changes
Replies: 6
Views: 1060

Re: Textbox animations, but specifically when a character changes

Transient screens do not recognize the hide event so will not play nicely with transforms like that. One approach might be to use show_layer_at to affect an entire layer... (this example plops the say screen on a new layer so as not to bork other screens) init python: renpy.add_layer(layer='say_scre...