hey all...
i want to ask something
on my VN, i have 4 girl to have ending (whatever it good or bad). then, i want put love image or symbol at left side of character name and then, every time the variable change (the variable increase is from choices) the love image or symbol is changed colour. maybe smiliar as harvest moon dialouge style. please help me.
conditional image and variable
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.
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.
- Kia
- Eileen-Class Veteran
- Posts: 1040
- Joined: Fri Aug 01, 2014 7:49 am
- Deviantart: KiaAzad
- Discord: Kia#6810
- Contact:
Re: conditional image and variable
you can edit the character's name using: $ girl1.name = "♥ Aiko"
an maybe few text tags for coloring
an maybe few text tags for coloring
- Milkymalk
- Miko-Class Veteran
- Posts: 753
- Joined: Wed Nov 23, 2011 5:30 pm
- Completed: Don't Look (AGS game)
- Projects: KANPEKI! ★Perfect Play★
- Organization: Crappy White Wings
- Location: Germany
- Contact:
Re: conditional image and variable
Use a variable reference as the name and change the variable, as seen here: viewtopic.php?f=8&t=56009&p=514661#p514694
Another option, though more complicated, would be to edit the speech boxes, but that's only necessary if you have changeable names and want to use the variable contents in instances where the ♥ is not wanted.
Another option, though more complicated, would be to edit the speech boxes, but that's only necessary if you have changeable names and want to use the variable contents in instances where the ♥ is not wanted.
Crappy White Wings (currently quite inactive)
Working on: KANPEKI!
(On Hold: New Eden, Imperial Sea, Pure Light)
Working on: KANPEKI!
(On Hold: New Eden, Imperial Sea, Pure Light)
-
- Newbie
- Posts: 2
- Joined: Fri Oct 26, 2018 11:24 am
- Organization: Silvester-Project
- Github: vandaris
- Location: Bandung
- Contact:
Re: conditional image and variable
ok guys. im inspire.
how can i replace name colour.
for example,
if affection poin = 0, the name colour is black
if affection poin = 1, the name colour is blue
if affection poin = 2, the name colour is green
etc. owh sorry im really new here
how can i replace name colour.
for example,
if affection poin = 0, the name colour is black
if affection poin = 1, the name colour is blue
if affection poin = 2, the name colour is green
etc. owh sorry im really new here
Re: conditional image and variable
The easiest way is to probably make multiple character definitions for each color (like if the character's name was sue, you could have sue1, sue2, and sue3) and then when it's time to show the dialog, have an if check on the value of the affection variable and pick the appropriate character. Something like
basic, barebones idea anyway.
Code: Select all
$ sue1 = Character("Sue", color="#000000")
$ sue2 = Character("Sue", color="#0000FF")
$ sue3 = Character("Sue", color="#008000")
#check affection level
if affection == 0:
sue1 "I don't like you."
elif affection == 1:
sue2 "You're okay."
else:
sue3 "I love you!"
- Kia
- Eileen-Class Veteran
- Posts: 1040
- Joined: Fri Aug 01, 2014 7:49 am
- Deviantart: KiaAzad
- Discord: Kia#6810
- Contact:
Re: conditional image and variable
there are two main approaches, one by editing the character:
Code: Select all
$ girl.color = "#f00"
Who is online
Users browsing this forum: Andredron