Search found 2437 matches

by Alex
Wed Mar 04, 2020 3:00 pm
Forum: Ren'Py Questions and Announcements
Topic: How to add +1 to a variable every second
Replies: 4
Views: 218

Re: How to add +1 to a variable every second

Just a minor adding... default iron = 0 screen counter_scr(): on "show" action Function(renpy.retain_after_load) # <--- timer 1.0 action SetVariable("iron", iron + 1) repeat True text "iron: [iron]" align (0.05, 0.05) label start: show screen counter_scr "?!" https://www.renpy.org/doc/html/save_load...
by Alex
Mon Mar 02, 2020 4:42 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED]ToggleDict in a loop
Replies: 5
Views: 236

Re: ToggleDict in a loop

The logic of action is quite simple, but you have many variables named '_var', that might confuse the program. Also, you need to track if two lists have the same length... And screens are refreshed from time to time - that makes code run again and again. So, this might be easyer to operate single li...
by Alex
Mon Mar 02, 2020 4:26 pm
Forum: Ren'Py Questions and Announcements
Topic: For loop inside ATL
Replies: 4
Views: 211

Re: For loop inside ATL

So, try it like

Code: Select all

transform repeat_tr(x=7, t=0.5):
    rotate 0
    linear t/2.0 rotate -10
    block:
        linear t rotate 10
        linear t rotate -10
        repeat x
    linear t/2.0 rotate 0
by Alex
Mon Mar 02, 2020 2:54 pm
Forum: Ren'Py Questions and Announcements
Topic: For loop inside ATL
Replies: 4
Views: 211

Re: For loop inside ATL

You can set how many times animation should repeat

Code: Select all

    parallel:
        linear 0.2 zoom 1.2
        pause(1.5)
        linear 0.2 zoom 1.0
        pause(1.3)
        repeat 3 # <---
by Alex
Mon Mar 02, 2020 2:26 pm
Forum: Ren'Py Questions and Announcements
Topic: Creating Character Profiles
Replies: 2
Views: 227

Re: Creating Character Profiles

PandaLulz wrote:
Sun Mar 01, 2020 7:33 pm
I am trying to create a system where it would display a series of 'pages/profiles' which would list some basic information about a wide array of characters ...
This might help you to start - viewtopic.php?f=8&t=53959&p=505785#p505785
by Alex
Mon Mar 02, 2020 2:02 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED]ToggleDict in a loop
Replies: 5
Views: 236

Re: ToggleDict in a loop

If you have a list of 'spells' and those spells are objects, why won't you try to add another property to spell object (like 'selected') and toggle its value upon clicking?
by Alex
Sun Mar 01, 2020 2:56 pm
Forum: Ren'Py Questions and Announcements
Topic: Statement Error in script
Replies: 1
Views: 162

Re: Statement Error in script

They should be 'menu' not 'label' - https://www.renpy.org/doc/html/menus.html label start: "blah-blah" menu hoodie: "Space {i}is{/i} in, so..": jump out_we_go "Pass": pass menu sweater_weather: "This is cuter, so..": jump out_we_go
by Alex
Sat Feb 29, 2020 8:39 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] NameError: 'fight_overlay' not defined
Replies: 3
Views: 166

Re: NameError: 'fight_overlay' not defined

Name of the screen should be in quotes, otherwise Ren'Py treat it as a variable that store the name of screen and throw an error if this variable didn't set.

Code: Select all

action Show("fight_overlay", None, curopponenthp, opponentatk)
by Alex
Sat Feb 29, 2020 3:35 pm
Forum: Ren'Py Questions and Announcements
Topic: Jump or call under define ?
Replies: 7
Views: 190

Re: Jump or call under define ?

Riky35800 wrote:
Sat Feb 29, 2020 3:13 pm
..., but there is no message comes up ...
In python blocks of code you ought to use python equivalents of Ren'Py statements - https://www.renpy.org/doc/html/statemen ... lents.html
by Alex
Sat Feb 29, 2020 7:33 am
Forum: Ren'Py Questions and Announcements
Topic: AttributeError: 'int' object has no attribute 'addHP'
Replies: 7
Views: 246

Re: AttributeError: 'int' object has no attribute 'addHP'

Search some about python strings formatting (like https://pyformat.info ) It works in Ren'Py alongside with data interpolation - https://www.renpy.org/doc/html/text.html#interpolating-data Try for each_item in inventory: text "'{}' - value = {}".format(each_item.name, each_item.value) add each_item....
by Alex
Sat Feb 29, 2020 5:11 am
Forum: Ren'Py Questions and Announcements
Topic: AttributeError: 'int' object has no attribute 'addHP'
Replies: 7
Views: 246

Re: AttributeError: 'int' object has no attribute 'addHP'

So, you've made a list 'inventory' to store items in it. Each item is an object that has some fields (like 'name', 'value', etc.). To show this inventory to player, you need to iterate through this list and show the apropriate property of an item (like showing its name or associated image). Try some...
by Alex
Fri Feb 28, 2020 6:51 pm
Forum: Ren'Py Questions and Announcements
Topic: AttributeError: 'int' object has no attribute 'addHP'
Replies: 7
Views: 246

Re: AttributeError: 'int' object has no attribute 'addHP'

Looks like it should be

Code: Select all

$ apple.use(eileen)
'cause eileen is an instance of Player class and thus has addHP function, but eileen.hp is just 10 (an integer).
(edit: sloooowly go to sleep...)
by Alex
Fri Feb 28, 2020 3:19 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Having trouble hiding screens and images automatically during choice menu
Replies: 9
Views: 305

Re: Having trouble hiding screens and images automatically during choice menu

What's the actual code you are using (the part that shows hud_bottom screen and choices menu and some lines around this part of code)?
by Alex
Fri Feb 28, 2020 3:08 pm
Forum: Ren'Py Questions and Announcements
Topic: Game fails to detect the start label
Replies: 6
Views: 324

Re: Game fails to detect the start label

Check the archive options in options.rpy to see what files are archived and what are not. This might be that your script file with start label not included in distribution somehow... Or I don't know what else...
(edit: I'm sloooow...)