re: On Asking Questions

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Message
Author
User avatar
rururubell
Newbie
Posts: 13
Joined: Mon Sep 30, 2019 4:00 am
Deviantart: rururubell
Contact:

Re: On Asking Questions

#106 Post by rururubell »

Hello! I want to create game with animated BG's. That's example what I want do do - https://www.youtube.com/watch?v=GXTFe4X-u8s

I read about ATL a little. And now I can make moving clouds, and I can change transparency level of layers (and make sun glare effects on screen).

But how can I made mowing wires, shaked by wind? And flying planes? How can I draw lines, bezier curves, dots and animate them? Is that possible? Can I get an example of something, that looks like I want?
Sorry for my English!

User avatar
isobellesophia
Miko-Class Veteran
Posts: 979
Joined: Mon Jan 07, 2019 2:55 am
Completed: None
Projects: Maddox and Friends! (AI Teacher friend), Friendly Universities! (Soon)
Organization: Friendly Teachers series
Deviantart: SophBelle
itch: Child Creation
Location: Philippines, Mindanao
Contact:

Re: On Asking Questions

#107 Post by isobellesophia »

rururubell wrote: Mon Sep 30, 2019 4:17 am Hello! I want to create game with animated BG's. That's example what I want do do - https://www.youtube.com/watch?v=GXTFe4X-u8s

I read about ATL a little. And now I can make moving clouds, and I can change transparency level of layers (and make sun glare effects on screen).

But how can I made mowing wires, shaked by wind? And flying planes? How can I draw lines, bezier curves, dots and animate them? Is that possible? Can I get an example of something, that looks like I want?
You can ask here

viewforum.php?f=8


I dont think some people ask here because this is just some rules to give.
I am a friendly user, please respect and have a good day.


Image

Image


Oduvan
Newbie
Posts: 8
Joined: Sun Jul 23, 2017 2:24 am
Contact:

Re: On Asking Questions

#108 Post by Oduvan »

Hi. Simple question - how do i add nested dictionaries values to a variable? For example:

Code: Select all

default test_var = 1
default itemz = {"sword": {"name": "sword","atk":10,"val":20},'helm': {"name": "helm","atk": 0,"def": 10,"val": 20}}

    
    
label start:
    "[itemz!q]"
    "add some points..."

    $test_var += [itemz[sword][atk]]
    return
Thats how

Code: Select all

$pc.atk += (itemz["sword"]["atk"])

User avatar
Aniknk
Regular
Posts: 30
Joined: Fri May 24, 2019 10:57 am
Contact:

Re: On Asking Questions

#109 Post by Aniknk »

Ok, I have a question, how one can make variables for wood choping with daily wood incom. I mean I choose to chop woods and when day is over I'll get +5 wood. All I can do is variables with unlimited replies. Like i click left mous buton, +5 wood, next click, next +5 wood and so on. It's also about date system. I was able to creat variables with minutes proceed by click +30 minutes, than +1 hour, +1 day, +1 month, +1year. I want it to be display only when I choose minutes proceed from menu. How can I get effect like this?
I wish I had an talent to do graphics. Or any other talents. But you know what they talking about people without any talents, they have a big pe***es. No wait. They talk so about people with big feets...

User avatar
Aniknk
Regular
Posts: 30
Joined: Fri May 24, 2019 10:57 am
Contact:

Re: On Asking Questions

#110 Post by Aniknk »

I did something like this:

Code: Select all

    label DayProceed:
        $ PlayerName = "Sabadios"
        $ WeekDays = ["Monday", "Tuesday", "Wensday", "Thursday", "Friday", "Saturday", "Sunday"]
        $ Months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
        $ MonthDays = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
        $ Minutes = 0
        $ Hours = 0
        $ Day = 0
        $ Days = 0
        $ Month = 0
        $ WoodName = "Wood"
        $ Wood = 0
        $ Stone = 0
        $ Iron = 0
        $ Gold = 10000

        $ GameRunning = True
        while GameRunning:
            $ Output = WeekDays[Day] + " " + Months[Month] + " " + str(Days+1) + " " + str(Hours) +":" + str(Minutes)

            menu:
                "Proceed by 30 minutes":
                    $ Minutes += 30
                    if Minutes > 59:
                        $ Minutes = 0
                        $ Hours += 1
                    if Hours > 23:
                        $ Hours = 0
                        $ Day += 1
                        $ Days += 1
                    if Day > 6:
                        $ Day = 0
                    if Days > MonthDays [Month]:
                        $ Month += 1
                        $ Day = 0
                    if Months > 11:
                        $ Month = 0

                    call Incom

                "Proceed by 1 hour":
                    $ Hours += 1
                    if Minutes > 59:
                        $ Minutes = 0
                        $ Hours += 1
                    if Hours > 23:
                        $ Hours = 0
                        $ Day += 1
                        $ Days += 1
                    if Day > 6:
                        $ Day = 0
                    if Days > MonthDays [Month]:
                        $ Month += 1
                        $ Day = 0
                    if Months > 11:
                        $ Month = 0

                    call Incom

                "Proceed by 6 hours":
                    $ Hours += 6
                    if Minutes > 59:
                        $ Minutes = 0
                        $ Hours += 1
                    if Hours > 23:
                        $ Hours = 0
                        $ Day += 1
                        $ Days += 1
                    if Day > 6:
                        $ Day = 0
                    if Days > MonthDays [Month]:
                        $ Month += 1
                        $ Day = 0
                    if Months > 11:
                        $ Month = 0

                    call Incom

                "Proceed by 12 hours":
                    $ Hours += 12
                    if Minutes > 59:
                        $ Minutes = 0
                        $ Hours += 1
                    if Hours > 23:
                        $ Hours = 0
                        $ Day += 1
                        $ Days += 1
                    if Day > 6:
                        $ Day = 0
                    if Days > MonthDays [Month]:
                        $ Month += 1
                        $ Day = 0
                    if Months > 11:
                        $ Month = 0

                    call Incom

                "Proceed by day":
                    $ Hours += 24
                    if Minutes > 59:
                        $ Minutes = 0
                        $ Hours += 1
                    if Hours > 23:
                        $ Hours = 0
                        $ Day += 1
                        $ Days += 1
                    if Day > 6:
                        $ Day = 0
                    if Days > MonthDays [Month]:
                        $ Month += 1
                        $ Day = 0
                    if Months > 11:
                        $ Month = 0

                    call Incom

    label Incom:
        if (Day == 1):
            "Your weekly incom"
            if WoodChoping:
                $ Wood += 5
How can I make calendar visable? And how can I display this incom I get?

EDIT: Situation under control.
I wish I had an talent to do graphics. Or any other talents. But you know what they talking about people without any talents, they have a big pe***es. No wait. They talk so about people with big feets...

User avatar
rururubell
Newbie
Posts: 13
Joined: Mon Sep 30, 2019 4:00 am
Deviantart: rururubell
Contact:

Re: On Asking Questions

#111 Post by rururubell »

How can I add AlphaMask() func to "complex" image? Like this string:

Code: Select all

show expression AlphaMask( "123", At( "456", center )) as mask
How to add this to image like this. And then just "show" or "scene" it:

Code: Select all

image someimage1:
    contains:
        "someimage2"
    contains:
        "how to add AlphaMask()?"
Sorry for my English!

User avatar
rururubell
Newbie
Posts: 13
Joined: Mon Sep 30, 2019 4:00 am
Deviantart: rururubell
Contact:

Re: On Asking Questions

#112 Post by rururubell »

Oh, I search a little more and get it. I can declare an image object like this:

Code: Select all

image masked_image = AlphaMask( "another_image", "mask" )
And then just put it on complex image

Code: Select all

image complex_image:
    contains:
        "masked_image"
    contains:
        ...
Sorry for my English!

Berger
Newbie
Posts: 1
Joined: Wed Jul 01, 2020 9:34 pm
Contact:

Changing variable value inside my screen

#113 Post by Berger »

Hello.
I want to be able to change the variable of my screen when i choose that it's time to change it.
Screen is a basic calendar and when a part of the scenario is done, i want to add a line like $ Hours += 1 to add 1 hours to my game.
Now, it's telling me that the variables Hours is not defined.

Probably a really newb question :wink:

Code: Select all

label start:

label screenClock:
    screen ClockScreen():
        $ WeekDays = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]
        $ Months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "Octobre", "November", "December"]
        $ MonthDays = [29, 27, 30, 29, 30, 29, 30, 30, 29, 30, 29, 30]
        $ Minutes = 0
        $ Hours = 12
        $ Month = 0
        $ Day = 0 #Weekday
        $ Days = 0 #Monthday
        $ Output = WeekDays[Day] + " " + Months[Month] + " " + str(Days+1) + " " + str(Hours).zfill(2) + ":" + str(Minutes).zfill(2) + ":00"
#        $ Hours += 1
        if Minutes > 30:
            $ Minutes = 0
            $ Hours += 1
        if Hours > 23:
            $ Hours = 0
            $ Day += 1
            $ Days += 1
        if Day > 6:
            $ Day = 0
        if Days > MonthDays[Month]:
            $ Month += 1
            $ Days = 0
        if Month > 11:
            $ Month = 0
        frame:
            xalign 0 ypos 0
            text  "[Output]"


    show screen ClockScreen
    show bd 0001a
    e "Hi"
    $ Hours += 1  # This is not making the change i want in my ClockScreen
    scene
    show bd 0001b
    t "Hello"
    pause
    return

User avatar
PyTom
Ren'Py Creator
Posts: 16094
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

was Re: On Asking Questions

#114 Post by PyTom »

denzil wrote: Wed Mar 07, 2007 4:05 pm On the asking questions theres nice article on How To Ask Questions The Smart Way
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Post Reply

Who is online

Users browsing this forum: No registered users