Search found 11 matches
- Thu Apr 07, 2022 3:55 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Is it possible to put an if else statement into a screen button?
- Replies: 1
- Views: 392
Is it possible to put an if else statement into a screen button?
Ladies and gentlemen, is it possible to put an if-else statement into a screen button? I want to translate this into screen language: if (d6roll_1_combat + d6roll_2_combat + d6roll_3_combat + brawn_points) >= (d10roll_1_npc + d10roll_2_npc + d10roll_3_npc + 5 - armorvalue): $ npchealth -= 1 else: $ ...
- Sat Apr 02, 2022 2:06 pm
- Forum: Ren'Py Questions and Announcements
- Topic: [Solved] Call python function through textbutton
- Replies: 4
- Views: 538
Re: Call python function through textbutton
Did you read reference? It explains syntax: Function(callable, *args, **kwargs) This Action calls callable with args and kwargs . callable Callable object. That means you place what you call (the thing before brackets) as callable: Function(player_inv.take ... args position arguments to be passed t...
- Sat Apr 02, 2022 5:51 am
- Forum: Ren'Py Questions and Announcements
- Topic: [Solved] Call python function through textbutton
- Replies: 4
- Views: 538
Re: Call python function through textbutton
Yes, I know this much. But I don't know the syntax beyond "action Function(args...)"emz911 wrote: ↑Fri Apr 01, 2022 7:39 pm You want to give the button an "action Function(...)" https://www.renpy.org/doc/html/screen_a ... l#Function
It's fine though. I've about given up on this
- Fri Apr 01, 2022 7:25 pm
- Forum: Ren'Py Questions and Announcements
- Topic: [Solved] Call python function through textbutton
- Replies: 4
- Views: 538
[Solved] Call python function through textbutton
Please help. This might be a simple solution but I'm having problems. I have this: $ player_inv.take(potion) which is a function inside a class here: def take(self, item, qty=1): if self.qty(item): item_location = self.check(item) self.inv[item_location][1] += qty else: self.inv.append([item,qty]) B...
- Fri Apr 01, 2022 11:47 am
- Forum: Ren'Py Questions and Announcements
- Topic: [SOLVED!] Moving an image by pressing a button?
- Replies: 4
- Views: 418
Re: Moving an image by pressing a button?
An example: image cross = Crop((0, 0, 30, 30), Solid("#F00")) image marker = Crop((0, 0, 20, 50), Solid("#0F0")) default marker_pos = (0.1, 0.5) screen move_example(): imagebutton: idle "cross" action SetVariable("marker_pos", (0.1, 0.5)) pos (0.1, 0.5) anch...
- Fri Apr 01, 2022 11:03 am
- Forum: Ren'Py Questions and Announcements
- Topic: [SOLVED!] Moving an image by pressing a button?
- Replies: 4
- Views: 418
Re: Moving an image by pressing a button?
A kind soul on the Renpy discord gave me the solution! Thanks guys! transform move_to_right: on show: linear 1.0 xoffset 200 #aka the new position screen yourscreen: default move_me = False showif move_me: add 'abstract' at move_to_right else: add 'abstract' textbutton "A button": action S...
- Fri Apr 01, 2022 10:40 am
- Forum: Ren'Py Questions and Announcements
- Topic: [SOLVED!] Moving an image by pressing a button?
- Replies: 4
- Views: 418
[SOLVED!] Moving an image by pressing a button?
Okay, this might be a bit of an ask here, but is it in any way possible for me to make a function that will move the image on the left to the X on the right with "linear" animation when clicking on the X on the right?
- Sat Mar 26, 2022 6:29 am
- Forum: Ren'Py Questions and Announcements
- Topic: Displaying text lines in a screen one at a time
- Replies: 4
- Views: 481
Re: Displaying text lines in a screen one at a time
define words = """According to all known laws of aviation, there is no way a bee should be able to fly.{p=3} Its wings are too small to get its fat little body off the ground.{p=3} The bee, of course, flies anyway because bees don't care what humans think is impossible.""&q...
- Sat Mar 26, 2022 1:08 am
- Forum: Ren'Py Questions and Announcements
- Topic: Displaying text lines in a screen one at a time
- Replies: 4
- Views: 481
Re: Displaying text lines in a screen one at a time
you can put them into their own text or \n for the next line text "[caster] has rolled poorly. \nThe pot goes to [player_name]." text "[caster] has rolled poorly." text "The pot goes to [player_name]." While I see your logic, this still displays all the text instantane...
- Fri Mar 25, 2022 11:47 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Displaying text lines in a screen one at a time
- Replies: 4
- Views: 481
Displaying text lines in a screen one at a time
Hi there! This might be a basic fix, it might not be, but I'm looking to display a bunch of lines inside a screen one by one instead of all at once. https://i.imgur.com/Xlj1IlV.png When the player clicks "roll dice" all this text is displayed at once, but I would like the lines of text to ...
Re: Guestbook
Hi everyone. My name is Michael Regal, author of the books Talbot Company and the Czarina's Buccaneer, both of which are available on Amazon (or you could google my name.) I'm currently working to make a sequel to my novel in Visual Novel format. Even though I have a degree in computer science, I ha...