Search found 734 matches

by Milkymalk
Tue May 05, 2020 3:50 am
Forum: Ren'Py Questions and Announcements
Topic: Finding items in list [SOLVED]
Replies: 3
Views: 304

Re: Finding items in list

list.index(x)
Return the index in the list of the first item whose value is x. It is an error if there is no such item.
So:

Code: Select all

$ playerpos = moveSlots.index(1)
show player1:
    xalign 0.01+0.1*playerpos
by Milkymalk
Tue May 05, 2020 3:28 am
Forum: Ren'Py Questions and Announcements
Topic: Sprite Position Issue [SOLVED]
Replies: 10
Views: 866

Re: Sprite Position Issue

Thank you, that's nice to hear, since I actually am a teacher :D If you feel that you want to credit me then go ahead. I'm happy that you learned something from my explanations. As for the original problem, it's strange that ATL is messed up by skipping. I tried your script (deleted the at focus and...
by Milkymalk
Tue May 05, 2020 3:07 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Transparency of a part of an image
Replies: 7
Views: 382

Re: Transparency of a part of an image

Ah, so you don't want the rest to be black? That's more complicated. You could use AlphaMask and for the mask use a Crop (https://www.renpy.org/doc/html/displayables.html#Crop) of the mask file, snipping it so that its hole is where you need it. I don't know if that works dynamically, though. Maybe ...
by Milkymalk
Tue May 05, 2020 2:56 am
Forum: Ren'Py Questions and Announcements
Topic: LiveComposite (blink and arm movement animation) question
Replies: 3
Views: 362

Re: LiveComposite (blink and arm movement animation) question

You could also keep them separate, make a composite image from them and then composite the image into another composite.
by Milkymalk
Mon May 04, 2020 3:15 pm
Forum: Ren'Py Questions and Announcements
Topic: randomizing transitions in game
Replies: 13
Views: 504

Re: randomizing transitions in game

No problem. Learning python, ATL, screen language and Ren'Py script all at once is hard, especially when your English is less than perfect. It's a lot of trying and failing :D But that's also the fun part, finding out how it's done.
by Milkymalk
Mon May 04, 2020 3:04 pm
Forum: Ren'Py Questions and Announcements
Topic: Character variables within dialogue/text?
Replies: 2
Views: 296

Re: Character variables within dialogue/text?

Code: Select all

default something = "a ball"

label start:
    "This is [something]."
by Milkymalk
Mon May 04, 2020 3:01 pm
Forum: Ren'Py Questions and Announcements
Topic: randomizing transitions in game
Replies: 13
Views: 504

Re: randomizing transitions in game

Yes, that definitely works. Not the most elegant way, but probably the most low-tech one. One point of advice though to remove clutter is to define a variable with that list and only give renpy.random.choice that variable. Unless you want to change the list of available transitions from case to case...
by Milkymalk
Mon May 04, 2020 2:43 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Transparency of a part of an image
Replies: 7
Views: 382

Re: Transparency of a part of an image

How about you take a LARGE black image and make a transparent hole in the middle, then anchor (.5, .5) and position it exactly where you need the hole?
by Milkymalk
Mon May 04, 2020 2:42 pm
Forum: Ren'Py Questions and Announcements
Topic: randomizing transitions in game
Replies: 13
Views: 504

Re: randomizing transitions in game

Yes, because the content of randomtransition is decided upon its definition. That's probably renpy.curry territory, something that I never fully got to work and that is thankfully largely unnecessary nowadays with all those screen actions (it used to be used inside screens to avoid execution by scre...
by Milkymalk
Mon May 04, 2020 2:37 pm
Forum: Ren'Py Questions and Announcements
Topic: randomizing transitions in game
Replies: 13
Views: 504

Re: randomizing transitions in game

No, forget the "choice" stuff ^^; define translist = ['trans1.png', 'trans2.png', 'trans3.png'] init python: def randompicker(): return random.choice(translist) label start: scene bg street "This is the street." scene bg hospital with ImageDissolve(randompicker(), 3.0, 8) "T...
by Milkymalk
Mon May 04, 2020 2:24 pm
Forum: Ren'Py Questions and Announcements
Topic: randomizing transitions in game
Replies: 13
Views: 504

Re: randomizing transitions in game

Ah, now I understand what you want to do :) No, an image is not a transition, sorry. I was on the wrong track.

Did you try

Code: Select all

scene bg hospital with ImageDissolve(randompicker(), 3.0, 8)
and use the function randompicker to randomly pick something from a list?
by Milkymalk
Mon May 04, 2020 2:05 pm
Forum: Asset Creation: Art
Topic: Ideas about my Map
Replies: 2
Views: 6418

Re: Ideas about my Map

IMO you should focus on developing the northern hemisphere first, since you have the most material for that. If you find you don't have enough content to populate another hemisphere, cut it out of the game. Don't make a continent when a town will do. Thank you, that's what I intent to do. Cut the s...
by Milkymalk
Mon May 04, 2020 1:55 pm
Forum: Ren'Py Questions and Announcements
Topic: [solved]how to reset a variable in renpy
Replies: 2
Views: 183

Re: how to reset a variable in renpy

a) Variables are initiated with default , not in init. b) Your first "else" sets the variable to 1 because it has to be at least 4 to reach that "else". c) "pool" is a label, not a screen. d) capitalization matters. pool is not Pool. e) The way you try to jump to the la...
by Milkymalk
Mon May 04, 2020 9:37 am
Forum: Ren'Py Questions and Announcements
Topic: Is it possible to make animated pose transitions?
Replies: 1
Views: 1697

Re: Is it possible to make animated pose transitions?

Okay, unearthing this old question... You can't animate transitions (easily), but you can animate images into a still image: image eileen normal = "eileen.png" image eileen armscrossed = "eileen_armscrossed.png" image eileen normaltoarmscrossed: "eileen.png" 0.1 "e...
by Milkymalk
Mon May 04, 2020 9:23 am
Forum: Ren'Py Questions and Announcements
Topic: LiveComposite (blink and arm movement animation) question
Replies: 3
Views: 362

Re: LiveComposite (blink and arm movement animation) question

If the closed eyes and the closed arms are always displayed together, why not make eyes and arms a single image and composite armseyes with the rest?