Page 1 of 1

love meter error

Posted: Mon Aug 13, 2018 1:58 pm
by Temanta
Hello

I have a problem with love meter. I tried several methods and that's wrong :/
Can you help me ?

I have this error :

Image

what i've done :

Image

Image

Re: love meter error

Posted: Mon Aug 13, 2018 2:27 pm
by Remix

Code: Select all

default joaq = 10
default jr = 0
default p = 0

label start:
    "... [joaq] ... [jr] ... [p] ..."

Re: love meter error

Posted: Mon Aug 13, 2018 3:00 pm
by Temanta
I have this error, now :

File "game/script.rpy", line 35: Line is indented, but the preceding define statement statement does not expect a block. Please check this line's indentation.
default joaq = 10


:(

Re: love meter error

Posted: Mon Aug 13, 2018 3:39 pm
by Per K Grok
Temanta wrote: Mon Aug 13, 2018 3:00 pm I have this error, now :

File "game/script.rpy", line 35: Line is indented, but the preceding define statement statement does not expect a block. Please check this line's indentation.
default joaq = 10


:(

Did you do

Code: Select all

    default joaq = 10
instead of

Code: Select all

default joaq = 10
?

Re: love meter error

Posted: Mon Aug 13, 2018 3:57 pm
by Temanta
Yes I did :?

Re: love meter error

Posted: Tue Aug 14, 2018 1:03 am
by Per K Grok
Temanta wrote: Mon Aug 13, 2018 3:57 pm Yes I did :?
try doing
default joaq = 10
without any empty space (indentur) in front of it, and do the same or the other two lines starting with default.

Re: love meter error

Posted: Tue Aug 14, 2018 12:26 pm
by Temanta
It's working, thank you :)

How to know if the points are really add / remove ?

Re: love meter error

Posted: Tue Aug 14, 2018 2:56 pm
by Per K Grok
Temanta wrote: Tue Aug 14, 2018 12:26 pm It's working, thank you :)
Good!
If you go back to Remix' post you will see that was the way they wrote it. :)
Temanta wrote: Tue Aug 14, 2018 12:26 pm
How to know if the points are really add / remove ?
You could make a screen that shows the points.

A very simple screen could just be

Code: Select all

screen meters:
    text str(joaq) ypos 20  
    text str(jr) ypos 45
    text str(p) ypos 70
If you want to have something like that in the actual game you would of course want to do something more fancy, but this would be enough to check if the points are added or removed as they should.

Re: love meter error

Posted: Sun Aug 19, 2018 6:40 am
by Temanta
Where should I write that ? After "default joaq = 10" or when the character talk ?

Re: love meter error

Posted: Mon Aug 20, 2018 12:26 pm
by Per K Grok
Temanta wrote: Sun Aug 19, 2018 6:40 am Where should I write that ? After "default joaq = 10" or when the character talk ?
You could put your screen text at the end of your script.rpy
that is the

Code: Select all

screen meters:
    text str(joaq) ypos 20  
    text str(jr) ypos 45
    text str(p) ypos 70
part, or you could put it at the end of the screens.rpy. I don't think it matters much where you put that part.

Code: Select all

show screen meters
You should put that in, in your script-file, before you start changing the variables in the code. You don't have to open and close the screen between the different points where the variables are changed.

Re: love meter error

Posted: Mon Aug 20, 2018 4:05 pm
by Temanta
it works. The text appears. But, it always marks :

joaquim 0
0


even when you make a positive choice :/

and, is it possible to change the color ?

Re: love meter error

Posted: Mon Aug 20, 2018 5:23 pm
by Per K Grok
Temanta wrote: Mon Aug 20, 2018 4:05 pm
and, is it possible to change the color ?
add
color "#F00"
or whatever color you prefer.

text str(joaq) color "#F00" ypos 20

"#F00" red
"#0F0" green
"#00F" blue

Temanta wrote: Mon Aug 20, 2018 4:05 pm it works. The text appears. But, it always marks :

joaquim 0
0


even when you make a positive choice :/
What is the code you used for the meters screen? The code I wrote would not write out 'joaquim'.
Wasn't the default value of 'joaq', 10?

Re: love meter error

Posted: Sat Sep 01, 2018 11:26 am
by Temanta
I wrote

default joa = 10

and

show screen meters (because the meter didn't appear)
$ joa += 5