Search found 741 matches

by Milkymalk
Wed May 01, 2024 5:46 am
Forum: Ren'Py Questions and Announcements
Topic: how to create a draggroup in a python function?
Replies: 1
Views: 5026

Re: how to create a draggroup in a python function?

I'm not that proficient with drags myself, but "xypos" is not a keyword for the Drag class. You either have to make the drag in screen language using xpos and ypos, or you have to snap it to the coordinates you want using Drag.snap(x, y, time).
by Milkymalk
Tue Apr 30, 2024 10:49 am
Forum: Ren'Py Questions and Announcements
Topic: Defining Drag as displayable
Replies: 4
Views: 185

Re: Defining Drag as displayable

Hm, that would work, but defeats the point of being able to reference the Drag via an object name.
by Milkymalk
Mon Apr 29, 2024 4:40 am
Forum: Ren'Py Questions and Announcements
Topic: Defining Drag as displayable
Replies: 4
Views: 185

Re: Defining Drag as displayable

I didn't think of using a block for the as-attribute, thank you. In your example, you either set the position in the Drag() declaration or with a button. How would I set the position when I create the drag? I want to use the Drag() as a template, but add it at a dynamic position without having to cl...
by Milkymalk
Sun Apr 28, 2024 3:40 pm
Forum: Ren'Py Questions and Announcements
Topic: Defining Drag as displayable
Replies: 4
Views: 185

Defining Drag as displayable

The docs say that if I want to reference a Drag after creating it, I should create it as a displayable. So I did this: init: image bento_rice = "Bento/bento_rice.png" init python: bento_ingredients["rice"] = Drag(d="bento_rice", droppable=False, dragged=bento_dragged) s...
by Milkymalk
Sat Apr 27, 2024 7:20 pm
Forum: Ren'Py Questions and Announcements
Topic: How to use functions defined inside screen?
Replies: 4
Views: 207

Re: How to use functions defined inside screen?

That's funny. I always imagined screens to behave like classes in that regard, so that I *can* define local functions that exist in the namespace of that screen only; and I'm sure I already used this to have small specialized functions there, probably small and straightforward enough (like a pythago...
by Milkymalk
Sat Apr 27, 2024 5:33 pm
Forum: Ren'Py Questions and Announcements
Topic: How to use functions defined inside screen?
Replies: 4
Views: 207

Re: How to use functions defined inside screen?

Not that I don't believe you, but why is it then that the callback function works?
by Milkymalk
Sat Apr 27, 2024 6:50 am
Forum: Ren'Py Questions and Announcements
Topic: How to use functions defined inside screen?
Replies: 4
Views: 207

How to use functions defined inside screen?

How can I use functions that are inside screens? I tried understanding dragging when I wrote this, and the card_dragged function that is the drag callback works flawlessly, but when it wants to call the function snapcard , I get an error that it is not defined. I know I can just put the functions ou...
by Milkymalk
Wed Jan 18, 2023 9:24 am
Forum: Creator Discussion
Topic: Do you prefer to have an established MC or self insert?
Replies: 13
Views: 8876

Re: Do you prefer to have an established MC or self insert?

My thoughts: A fully customizable self-insert blank slate MC can never be an integral part of the story. Sure, he/she experiences it and takes part in it, but so could anybody else. A pre-set MC can have a character background that is deeply connected to the events in the game. Past, personality, qu...
by Milkymalk
Sun Apr 03, 2022 2:48 pm
Forum: Ren'Py Questions and Announcements
Topic: How to use the Screen Input not during the game?
Replies: 2
Views: 494

Re: How to use the Screen Input not during the game?

Look at the description for input:
https://renpy.org/doc/html/screens.html ... nput#input

You are only showing the console screen, but you need to call it. You can scrap the function for toggling the screen completely, a called screen will hide when it returns something, which input does.
by Milkymalk
Sun Apr 03, 2022 2:42 pm
Forum: Ren'Py Questions and Announcements
Topic: X-ray effect around cursor?
Replies: 3
Views: 855

Re: X-ray effect around cursor?

Why not make it the other way around? Instead of making the top image transparent, you could paste a portion of the "lower" image on top of the top image where the cursor is. First get the mouse coordinates, then crop the X-ray image to whatever it should show at these coordinates, then di...
by Milkymalk
Sun Apr 03, 2022 2:32 pm
Forum: Ren'Py Questions and Announcements
Topic: Undertale-Like Game
Replies: 3
Views: 549

Re: Undertale-Like Game

You can randomize using renpy.random: https://www.renpy.org/doc/html/other.html#renpy-random You can put anything pretty much anywhere on the screen. A minigame is usually confined to its own screen (that is, Renpy "screen"), which contains objects that you can place with attributes like a...
by Milkymalk
Fri Apr 01, 2022 7:24 pm
Forum: Ren'Py Questions and Announcements
Topic: "return" to specific label?
Replies: 2
Views: 372

Re: "return" to specific label?

Oh, thank you, that's handy!
I've been absent for a while so I probably missed a lot of little additions.
by Milkymalk
Fri Apr 01, 2022 6:53 pm
Forum: Ren'Py Questions and Announcements
Topic: "return" to specific label?
Replies: 2
Views: 372

"return" to specific label?

Is there a way to use the "return" statement to return not to the point where the label was called, but to any other label? Alternatively, is there a way to remove the last call from the stack so I can just "jump" where I want to be? Otherwise I need to use variables and do stran...
by Milkymalk
Wed Jun 17, 2020 4:46 pm
Forum: Ren'Py Questions and Announcements
Topic: Adding 'tags' to objects in my Inventory ...
Replies: 2
Views: 385

Re: Adding 'tags' to objects in my Inventory ...

variable = ["hat"] means it is a list. With variable.append("socks"), you can add more elements to the list, or you make it variable = ["hat", "socks", "shirt"] from the beginning. Basically the same as in Twine, just minor changes to syntax.