Search found 284 matches
- Wed Nov 01, 2017 12:08 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Variables Referenced Before Assignment?
- Replies: 7
- Views: 812
Re: Variables Referenced Before Assignment?
I've copied your code to a new project and I've been testing it for a while, and it hasn't given me any errors. Are you sure you placed the variable asignments (with default) in the same mood.rpy file and just before the init python block? Maybe the problem is in the script or in the menu itself, tr...
- Fri Oct 20, 2017 2:33 pm
- Forum: Ren'Py Cookbook
- Topic: Logo Intro, Opening and Press to Start Screen [Tutorial]
- Replies: 7
- Views: 9940
Re: Logo Intro, Opening and Press to Start Screen
Thank you, this is great!! 
- Fri Oct 20, 2017 11:27 am
- Forum: Ren'Py Questions and Announcements
- Topic: Random events via objects and methods?
- Replies: 20
- Views: 2705
Re: Random events via objects and methods?
Ah, I understand now, you want to simply get all instances of an object? That's a little advanced, I've never done it before so I don't really know if it's possible in Ren'Py. This link refers to Python itself, but it may help you: http://effbot.org/pyfaq/how-do-i-get-a-list-of-all-instances-of-a-gi...
- Fri Oct 20, 2017 11:10 am
- Forum: Ren'Py Questions and Announcements
- Topic: Random events via objects and methods?
- Replies: 20
- Views: 2705
Re: Random events via objects and methods?
You may have to use a function like this (written on the fly, might need tweaking): default eventList = [studyCheck, beautyCheck, charismaCheck] # This should be a list of all events init python: #This goes inside an init python block, but outside of the class Event def getPossibleEvents(): global e...
- Fri Oct 20, 2017 9:52 am
- Forum: Ren'Py Questions and Announcements
- Topic: Random events via objects and methods?
- Replies: 20
- Views: 2705
Re: Random events via objects and methods?
Objects seem like a good idea to me, it's way more organized and easier for you to mantain and debug, it should be possible since you can fully integrate Python code into Ren'Py. As for how would you code it it depends on how complex you want the system to be, what kind of conditions there are (i.e....
- Thu Oct 19, 2017 2:56 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Function executes when it shouldn't
- Replies: 2
- Views: 322
Re: Function executes when it shouldn't
This caused me a lot of headaches in the past... Anyway pretty sure the problem is in the Function action, you need to pass your function's arguments like this:
More on Function() here.
Code: Select all
Function(item_purchase, 0)
- Thu Oct 19, 2017 2:41 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Can't change speed of transitions [solved]
- Replies: 4
- Views: 1232
Re: Can't change speed of transitions
According to the documentation, Pixellate needs an aditional parameter called steps.
https://www.renpy.org/doc/html/transiti ... #Pixellate
So you just need to add it after the time:
https://www.renpy.org/doc/html/transiti ... #Pixellate
So you just need to add it after the time:
Code: Select all
show bg room with Pixellate(2.0, 5)
- Thu Oct 19, 2017 8:19 am
- Forum: Ren'Py Questions and Announcements
- Topic: How to make a character jump?
- Replies: 7
- Views: 820
Re: How to make a character jump?
I would personally use code that's a tiny bit different, if you want to experiment a bit: This version uses easein and easeout to make the movement a little more smooth, and uses yoffset instead of ypos so that the transform can be used from any starting point, not just the bottom of the screen. tr...
- Wed Oct 18, 2017 3:11 pm
- Forum: Ren'Py Questions and Announcements
- Topic: How to make a character jump?
- Replies: 7
- Views: 820
Re: How to make a character jump?
Adjusting the ypos with an ATL transform, supposing you have your characters aligned to the bottom of the screen (that's 1.0 on the y-axis), it could be something like this: transform small_jump: linear .1 ypos .9 #Move the character to 0.9 (a little up, it starts at 1.0) in 0.1 second linear .1 ypo...
- Tue Oct 17, 2017 2:09 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Get the name of the showing image ?
- Replies: 10
- Views: 2362
Re: Get the name of the showing image ?
I've been testing this for a while with different images and I've found that some images are properly added to the list but some are not. The problem seems to be that Ren'Py searches tags in the image file name as well as the variable name. Unfortunately for this approach to work, the image file nam...
- Tue Oct 17, 2017 12:30 pm
- Forum: Ren'Py Questions and Announcements
- Topic: [SOLVED] Please guys !
- Replies: 7
- Views: 585
Re: Please guys !
The commented out jumps didn't seem to be related to the error tc described, it seemed like they knew what the # were for so that's why I didn't mention it. Then again, I realize probably should have mentioned it just in case, sorry about that.
- Tue Oct 17, 2017 12:25 pm
- Forum: Ren'Py Questions and Announcements
- Topic: [SOLVED] Please guys !
- Replies: 7
- Views: 585
Re: Please guys !
You need to add (:) after each menu choice, if you don't Ren'Py won't recognize it as a choice. menu: "Go with Sterenn": # <-- Notice the : symbol here #jump choice_2 "Go with Soleina": #jump choice_1 If you need to post code, it's better to copy it from editra and paste it here between [code] and [...
- Tue Oct 17, 2017 12:07 pm
- Forum: Ren'Py Questions and Announcements
- Topic: [SOLVED] Please guys !
- Replies: 7
- Views: 585
Re: Please guys !
Code: Select all
menu:
"Go with Sterenn":
#jump choice_2
"Go with Soleina":
#jump choice_1
- Tue Oct 17, 2017 11:01 am
- Forum: Ren'Py Questions and Announcements
- Topic: Get the name of the showing image ?
- Replies: 10
- Views: 2362
Re: Get the name of the showing image ?
Hmm, that's strange: I copied - pasted the code, and every answer I get is "None" even if the image is showing. That's odd, I just tried it in a new project and it seems to work fine. EDIT: Wait, no, you're right, that seems to happen when the image has more than one attribute. Looks like we also n...
- Tue Oct 17, 2017 10:05 am
- Forum: Ren'Py Questions and Announcements
- Topic: Get the name of the showing image ?
- Replies: 10
- Views: 2362
Re: Get the name of the showing image ?
You can modify the function to suit your needs, or make another function where you use the previous one as a base, and then do any operation you need with it. For getting a particular image you would do something like this: init python: # I updated the function so it takes a layer parameter, so you ...