Search found 113 matches

by DannyGMaster
Mon Sep 18, 2017 4:06 pm
Forum: Ren'Py Questions and Announcements
Topic: imagebuttons with timer element [SOLVED]
Replies: 20
Views: 1213

Re: imagebuttons with timer element

You cannot control screen variable using a function like that. Functions have their own (local) namespace (that means that what happens inside of a function, stays inside of a function :D ). Global variables or objects passed into a a function are the exceptions. I know this, that's why I had to us...
by DannyGMaster
Mon Sep 18, 2017 3:39 pm
Forum: Ren'Py Questions and Announcements
Topic: imagebuttons with timer element [SOLVED]
Replies: 20
Views: 1213

Re: imagebuttons with timer element

Right... and I thought it was ok to point out that your implementation is a bad idea. Even if your guess about how Ren'Py would handle onscreen timer was correct, without special checks, clicking those buttons can simply crash the engine. Any advice that can crash the engine should generally be con...
by DannyGMaster
Mon Sep 18, 2017 3:21 pm
Forum: Ren'Py Questions and Announcements
Topic: imagebuttons with timer element [SOLVED]
Replies: 20
Views: 1213

Re: imagebuttons with timer element

I edited my post a little, taking into account xela's suggestions.

viewtopic.php?f=8&t=45818&p=465361#p465361

Can't test it right now, but would this work better?
by DannyGMaster
Mon Sep 18, 2017 2:35 pm
Forum: Ren'Py Questions and Announcements
Topic: imagebuttons with timer element [SOLVED]
Replies: 20
Views: 1213

Re: imagebuttons with timer element

That is a bad way of doing it that is not very likely to work. I know it probably won't work right off the bat, that's why I wrote this: (NOT tested, probably will need a bit of tweaking) Reading through timdonehy200's description of what he wanted to achieve, I devised an idea of how this system c...
by DannyGMaster
Mon Sep 18, 2017 12:14 pm
Forum: Ren'Py Questions and Announcements
Topic: imagebuttons with timer element [SOLVED]
Replies: 20
Views: 1213

Re: imagebuttons with timer element

I believe it will be something like action (SetVariable...) SetVariable could work but not for taking out an x time of seconds from the timer, for that, you could make a variable to hold the time left, and write a function to change that variable's value, it could be something like this (NOT tested...
by DannyGMaster
Thu Sep 14, 2017 2:45 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Gallery images do not unlock
Replies: 3
Views: 2953

Re: gallery images do not unlock

Testing with the code you provided, I've encountered the problem you describe. I've only found a way so far: seems like the images can be unlocked manually using a method call from inside the script. "Hello, world." show image1 $ g.unlock_image("image1") e "You've created a new Ren'Py game." show im...
by DannyGMaster
Thu Sep 14, 2017 11:47 am
Forum: Ren'Py Questions and Announcements
Topic: labels with arguments?[SOLVED]
Replies: 2
Views: 291

Re: labels with arguments?

There could be better ways to do it, but so far the simplest way I've found to accomplish this is to store each argument inside global variables, and then, pass them to the label using the call statement. default ally1 = None default ally2 = None default enemy1 = None default enemy2 = None label bat...
by DannyGMaster
Wed Sep 06, 2017 4:07 pm
Forum: Ren'Py Questions and Announcements
Topic: Adding Speed System In Game
Replies: 2
Views: 254

Re: Adding Speed System In Game

If I understand correctly, you want to check each of the enemies in enemy party's separate speed with the player's? Something like: init python: class Player(renpy.store.object): def __init__(self, SPEED=0): self.SPEED = SPEED #This should be equal to SPEED, not self.SPEED #A method for checking the...
by DannyGMaster
Wed Sep 06, 2017 11:56 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Help with showing save FileTime in a custom Save Load screen
Replies: 1
Views: 795

Re: Help with showing save FileTime in a custom Save Load screen

You can show the date on screen using a persistent variable and a function using the time module, included in Python. It works for now in my testing, but the way persistent works is a little confusing right now, I'll have to study it deeper but that would be a different issue. If I get the code to w...
by DannyGMaster
Thu Aug 31, 2017 11:35 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED]Making hp heal potions
Replies: 18
Views: 963

Re: Making hp heal potions

I see, they are not the problem then, you can return the $ and the rest of the code as it was. Sadly right now I have to leave so I hope someone else can help you, or that you can find a solution on your own, I suggest you read the documentation on Screens and Screen Language, I still have to write ...
by DannyGMaster
Thu Aug 31, 2017 11:10 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED]Making hp heal potions
Replies: 18
Views: 963

Re: Making hp heal potions

Okay, you probably did not understand, sorry about that. Just to be sure, I wanted you to take out only the $, not the entire lines. It would end up looking like this: name = item[0].name desc = item[0].desc value = item[0].value qty = str(item[1]) hbox: if item[0].icon: icon = item[0].icon hover_ic...
by DannyGMaster
Thu Aug 31, 2017 10:25 am
Forum: Ren'Py Questions and Announcements
Topic: Displaing preference variables
Replies: 2
Views: 224

Re: Displaing preference variables

They're defined in every project in a file called options.rpy. For the text speed specifically it can be found around line 116:

Code: Select all

default preferences.text_cps = 0
To convert it into text, you would place that name in a string, and within square brackets:

Code: Select all

text "[preferences.text_cps]"
by DannyGMaster
Thu Aug 31, 2017 10:18 am
Forum: Ren'Py Questions and Announcements
Topic: Can't show images over screens?
Replies: 5
Views: 408

Re: Can't show images over screens?

Ok thanks, that works for my events. My specific issue I guess was that I was trying to follow one of the clock tutorials and have it overlaid on the screen on all screens, but all of the tutorials have the clocks being called as another screen or multiple images, which I can't get to show and I ca...
by DannyGMaster
Thu Aug 31, 2017 10:05 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED]Making hp heal potions
Replies: 18
Views: 963

Re: Making hp heal potions

Okay, the only suspicious part I see is still the $ marks here: $ name = item[0].name $ desc = item[0].desc $ value = item[0].value $ qty = str(item[1]) hbox: if item[0].icon: $ icon = item[0].icon $ hover_icon = im.Sepia(icon) Remove them and see if it now works correctly. If it doesn't, then the p...
by DannyGMaster
Thu Aug 31, 2017 9:36 am
Forum: Ren'Py Questions and Announcements
Topic: Can't show images over screens?
Replies: 5
Views: 408

Re: Can't show images over screens?

When you use call screen, the game stops at that line, shows whatever the screen has and doesn't go to the next line until the screen you called finishes executing. The only way of exiting the screen in your case is jumping to another label using your imagebuttons, and when you do that the show dog ...