Search found 786 matches

by kivik
Sun Jun 17, 2018 5:51 am
Forum: Ren'Py Questions and Announcements
Topic: Declare persistent variables?
Replies: 2
Views: 461

Re: Declare persistent variables?

Personally I see each persistent variable having 3 states: None: Player never hit the code that sets the variable True: Player hit the code that sets the variable once False: Player has hit the code at some point, but it's been reset to False You'd test the 3 states by: if persistent.var: "True...
by kivik
Sun Jun 17, 2018 5:43 am
Forum: Ren'Py Questions and Announcements
Topic: Using a variable in a different script file
Replies: 12
Views: 2930

Re: Using a variable in a different script file

Pent wrote: Sat Jun 16, 2018 4:01 pm What exactly do you mean with "in the Main Menu Screen"?
In your screens.rpy file you can see all the screens in the game, look for:

Code: Select all

screen main_menu():
by kivik
Sun Jun 17, 2018 5:39 am
Forum: Ren'Py Questions and Announcements
Topic: if statement always false
Replies: 6
Views: 922

Re: if statement always false

On a side note if i may ask (learning coding still) what exactly does this part do: python: a = renpy.random.randint(0, 10) b = renpy.random.randint(0, 10) del a del b a = renpy.random.randint(0, 10) b = renpy.random.randint(0, 10) I understand the first two lines chose a random number between 0 an...
by kivik
Fri Jun 15, 2018 9:09 pm
Forum: Ren'Py Questions and Announcements
Topic: if statement always false
Replies: 6
Views: 922

Re: if statement always false

So mitoky's nailed it I think that the issue is because renpy.input returns a string, so you'd be comparing "10" == 10 for example and they don't equal. Casting the value into an int would work: int("10") == 10 However, if you cast the renpy.input directly as an int, then this st...
by kivik
Fri Jun 15, 2018 3:00 am
Forum: Ren'Py Questions and Announcements
Topic: "Glowing" text in Ren'Py? [solved]
Replies: 14
Views: 7531

Re: "Glowing" text in Ren'Py? [solved]

Haven't tried this myself but I think you need to create a text displayable (https://www.renpy.org/doc/html/text.html#Text) and add it to your dialogue. You'd add the outline property to the Text() arguments as PyTom showed above. You'd then add it with the image tag: https://www.renpy.org/doc/html/...
by kivik
Fri Jun 15, 2018 2:52 am
Forum: Ren'Py Questions and Announcements
Topic: How to display text on top of a video loop?
Replies: 5
Views: 1722

Re: How to display text on top of a video loop?

Have you looked at the documentation on how movies work? Your code doesn't look the same as the documentation here: https://www.renpy.org/doc/html/movie.html#movie-displayables-and-movie-sprites I don't know what actually happens when you use the play command, but if you define your movie as a displ...
by kivik
Fri Jun 15, 2018 2:48 am
Forum: Ren'Py Questions and Announcements
Topic: [Resolved] List item bug
Replies: 2
Views: 558

Re: List item bug

Change this: text "[temp]" To this: text "[temp.item]" Better yet, use for loop as intended for lists of items: for item in backpack.inventory: text "[item.item]" The way for loop in python works is, it iterates over a list and put the content into your iterator variabl...
by kivik
Fri Jun 15, 2018 2:43 am
Forum: Ren'Py Questions and Announcements
Topic: Adding/defining Numerical Variables
Replies: 5
Views: 614

Re: Adding/defining Numerical Variables

You just create the multiple script files (make sure they have extension .rpy) and put it anywhere inside your game/ folder. Renpy automatically crawl through your folders looking for .rpy files. Be careful if you ever rename your .rpy files, you'll need to rename / delete the corresponding .rpyc fi...
by kivik
Fri Jun 15, 2018 2:37 am
Forum: Ren'Py Questions and Announcements
Topic: Adding text strings between quick menu buttons?
Replies: 5
Views: 738

Re: Adding text strings between quick menu buttons?

That'll be because textbuttons have things like padding even if they're invisible. You can put your pipe inside a textbutton: hbox: textbutton _("back") action Rollback() textbutton " | " action Null textbutton _("history") action ShowMenu('history') # and so on You may...
by kivik
Fri Jun 15, 2018 2:34 am
Forum: Ren'Py Questions and Announcements
Topic: Is there add parameter to nvl_narrator?
Replies: 4
Views: 912

Re: Is there add parameter to nvl_narrator?

Have you tried this:

Code: Select all

define m = Character("", kind=nvl)
by kivik
Thu Jun 14, 2018 12:34 pm
Forum: Ren'Py Questions and Announcements
Topic: How to display text on top of a video loop?
Replies: 5
Views: 1722

Re: How to display text on top of a video loop?

Oh so you're trying to show character dialogues over a video? How are you showing the video at the moment?
by kivik
Thu Jun 14, 2018 11:18 am
Forum: Ren'Py Questions and Announcements
Topic: How to display text on top of a video loop?
Replies: 5
Views: 1722

Re: How to display text on top of a video loop?

Not sure if there's some sort of special circumstances of what you're doing, but the easiest thing to do is to create a screen and add the text on top.

I assumed your video is being displayed on the master layer.
by kivik
Thu Jun 14, 2018 11:17 am
Forum: Ren'Py Questions and Announcements
Topic: How to Have Previous Endings and Playthroughs Affect the Ones After?
Replies: 3
Views: 587

Re: How to Have Previous Endings and Playthroughs Affect the Ones After?

1 - that's just a case of using a persistent variable to store previous endings, and during your game code you add conditions to check the persistent variables to determine what to show. If you have lots of endings, it's probably worth storing it as a dict in a persistent variable. Also, it's probab...
by kivik
Thu Jun 14, 2018 4:34 am
Forum: Ren'Py Questions and Announcements
Topic: Audio Files Won't Play
Replies: 9
Views: 3838

Re: Audio Files Won't Play

I placed them in the game folder instead and it works now :D I'll put all of my audio files in my game folder from now on. Thanks so much for your help! You can also put them in a sound folder (for ease of organisation), but make sure you add the sound folder to your file references, e.g. define au...
by kivik
Wed Jun 13, 2018 5:42 pm
Forum: Ren'Py Questions and Announcements
Topic: "expected statement" error
Replies: 6
Views: 3595

Re: "expected statement" error

Yeah, perhaps you should ask what you're stuck on?

Did you click on the link I mentioned? It's got the entire imagemap sample code there. Perhaps you need to read more of the online document itself to understand the basics of how screens work first if you're stuck at not knowing where to start?