Search found 604 matches

by gas
Sun Mar 29, 2020 11:13 am
Forum: Ren'Py Questions and Announcements
Topic: Using a variable inside a screen
Replies: 1
Views: 23

Re: Using a variable inside a screen

screen doorknob(): tag item imagebutton: xalign 0.2 yalign 0.55 idle "doorknob.png" action If((open), true = Jump("living"), false = Jump("start")) As an extra note, you don't need to check if somethin is True. It's always True if isn't False. That's why 'if open' suffice.
by gas
Sun Mar 29, 2020 10:48 am
Forum: Ren'Py Questions and Announcements
Topic: Rollback and Classes
Replies: 2
Views: 29

Re: Rollback and Classes

Old thing.

Code: Select all

init python:
    class temp_class(store.object):
        def __init__(self):
            self.a = 0
default A = temp_class()

label start:
    "At this point a = 0: [A.a]"
    "Here, too, a = 0: [A.a]"
    $ A.a +=1
    "Now a = 1: [A.a]"
It now should work as intended.
by gas
Sun Mar 29, 2020 8:00 am
Forum: Ren'Py Questions and Announcements
Topic: Avoid overlapping of sounds.
Replies: 1
Views: 43

Re: Avoid overlapping of sounds.

init python: renpy.music.register_channel("mm_sound", "sfx") then in your buttons textbutton "Try!" action ShowMenu("whatever") hovered Play ("mm_sound", "whateverfolder/hover.ogg") The reason is the AUDIO channel actually let you play a lot of sounds the same time, while a music channel don't.
by gas
Sun Mar 29, 2020 7:36 am
Forum: Ren'Py Questions and Announcements
Topic: Voice playback bug? Or perhaps something else...
Replies: 2
Views: 42

Re: Voice playback bug? Or perhaps something else...

Probably that depend on the wait for voice and voice sustain preferences (I only suppose, but that sound logical to me). I don't think you can somehow have an accurate timing anyway, as that depend on the CPS stated by the player (a low CPS have 'Youta!' last for many seconds... the audio file is un...
by gas
Sun Mar 29, 2020 5:15 am
Forum: Ren'Py Questions and Announcements
Topic: Determining the variable based on probable inputs?
Replies: 5
Views: 63

Re: Determining the variable based on probable inputs?

Yes! That helps, eventually I will have a a lot of values and your last code would extrapolate easily. Thanks! I would not build this into a function though, as I find it very confusing and out of my league. :D Basic functions are very easy! A quick tutorial (I'm in quarantine, so I have a lot of t...
by gas
Sat Mar 28, 2020 8:14 pm
Forum: Ren'Py Questions and Announcements
Topic: How to add text blips over character dialogue?
Replies: 4
Views: 37

Re: How to add text blips over character dialogue?

adv is a special character, if you define something into it, all other speakers will inherit that change. BUT I can't actually test it if that work for callbacks. So just try as above. If by adding to just 'adv' character does nothing to other characters, add 'callback = blip_callback' to all your c...
by gas
Sat Mar 28, 2020 8:03 pm
Forum: Ren'Py Questions and Announcements
Topic: Determining the variable based on probable inputs?
Replies: 5
Views: 63

Re: Determining the variable based on probable inputs?

If you want go very overboard and process the thing even further for a lot of values, you can do this. default currencies = {"American currency" : ["dollars","dollar","cent","cents","usd"], "European currency": ["euro","eurocents"], "Asian currency" : ["yen", "yuan", "ruble"]} # enlarging at will......
by gas
Sat Mar 28, 2020 7:31 pm
Forum: Ren'Py Questions and Announcements
Topic: How to add text blips over character dialogue?
Replies: 4
Views: 37

Re: How to add text blips over character dialogue?

init python: def blip_callback(event, **kwargs): if event == "show": renpy.music.play("audio/blipmale.wav", channel="sound", loop=True) elif event == "slow_done" or event == "end": renpy.music.stop(channel="sound") adv = Character(None, callback = blip_callback) By using 'adv' character, all other ...
by gas
Sat Mar 28, 2020 7:22 pm
Forum: Ren'Py Questions and Announcements
Topic: Determining the variable based on probable inputs?
Replies: 5
Views: 63

Re: Determining the variable based on probable inputs?

label currency: $ curr = renpy.input("Which currency do you use?") $ curr = curr.strip().lower() if curr == ("dollar" or "dollars" or "cent" or "cents" or "usd"): $ curr = "American currency" else: $ curr = "International currency" jump nextlabel Or also label currency: $ curr = renpy.input("Which ...
by gas
Sat Mar 28, 2020 6:59 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Is it possible to make a sprite gallery using SetScreenVariable?
Replies: 2
Views: 39

Re: Is it possible to make a sprite gallery using SetScreenVariable?

The easier thing that come to my mind is to use a DEQUE (a special list that have stack functions) and a Function() action. init python: from collections import deque default dress_list = deque(range(3)) # here three dresses. # bla bla bla the screen textbutton "Next" action Function("set_dress",1) ...
by gas
Sat Mar 28, 2020 4:11 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED]Changing Specific String in Sentence
Replies: 2
Views: 48

Re: Changing Specific String in Sentence

mmm... this?

Code: Select all

screen test:
    for s in skill_list:
        text "[s.name] deals {color=ff0000}[s.damage]{/color} damage"
not using a description parameter.
by gas
Sat Mar 28, 2020 11:18 am
Forum: Ren'Py Questions and Announcements
Topic: Dynamic hovered picture
Replies: 1
Views: 32

Re: Dynamic hovered picture

You mean to activatethe focus only on the visible pixels? Set the focus_mask property.
https://www.renpy.org/dev-doc/html/styl ... focus_mask
by gas
Sat Mar 28, 2020 5:37 am
Forum: Ren'Py Questions and Announcements
Topic: Image transforms
Replies: 2
Views: 53

Re: Image transforms

You want to animate it?
'cause is actually more convenient to use any graphical editor to modify the basic image than using such code to modify it at runtime.
by gas
Sat Mar 28, 2020 1:45 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Having trouble reloading saves
Replies: 3
Views: 62

Re: Having trouble reloading saves

Delete persistents of this game in the Renpy launcher.
Then also Force Recompile.
There are buttons for that.

Probably you did a change in the code that early saves can cope with (like a call or whatever) and further don't. Don't mind, could happen.
by gas
Thu Mar 26, 2020 1:24 pm
Forum: Ren'Py Questions and Announcements
Topic: DynamicImages in an imagebutton don't work
Replies: 4
Views: 71

Re: DynamicImages in an imagebutton don't work

Dunno, but try retrieve the name before using it in the imagebutton. if unlock_vid: add "girls/[girl.name]_videos.png" pos (122, 76) if girl.vid1: $ dagal = girl.name imagebutton: idle "girls/[dagal]_vid1.png" hover "girls/[dagal]_hvid1.png" I think the error is there as an impossibility to dynamica...