Another newbie question
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.
- DragonKnight
- Regular
- Posts: 51
- Joined: Sun Nov 12, 2017 10:16 am
- Projects: Taboo Hearts
- Contact:
Another newbie question
I need to make a image in my upper left hand, that when clicked I see the variables in this game, and to what it represent, and then to click that image and they all go away. Can anybody help me, or if it is somewhere can you point it out??
Currently working on Taboo Hearts
Currently working on Forbidden
Currently working on Forbidden
Re: Another newbie question
I don't know if I understand correctly what you mean, but maybe this:
Code: Select all
#Some variables
default power = 0
default intelligence = 0
default charisma = 0
screen mc_stats(): #The screen that will show the variables
default show_vars = False #A screen variable to turn the viewing on/off
imagebutton auto "button_%s.png": #The imagebutton
action ToggleScreenVariable('show_vars')
#^This action toggles the screen variable
#between True(on) and False(off)
if show_vars: #If the variable is True...
frame: #...this frame is shown
xpos .1
has vbox
text "Power:[power]"
text "Intelligence:[intelligence]"
text "Charisma:[charisma]"
- DragonKnight
- Regular
- Posts: 51
- Joined: Sun Nov 12, 2017 10:16 am
- Projects: Taboo Hearts
- Contact:
Re: Another newbie question
Thank you, I'm not sure if it right but I will try it!!
Currently working on Taboo Hearts
Currently working on Forbidden
Currently working on Forbidden
- DragonKnight
- Regular
- Posts: 51
- Joined: Sun Nov 12, 2017 10:16 am
- Projects: Taboo Hearts
- Contact:
Re: Another newbie question
Code: Select all
# Define varbles
$ i_love = 20
$ i_lust = 5
$ i_sle =20
$ i_slt = 5
$ m_love = 20
$ m_lust = 0
$ s_love = 20
$ s_lust = 0
$ day_gone_by = 0
$ i_money = 500
$ mom_money = 500
$ s_money = 0
Currently working on Taboo Hearts
Currently working on Forbidden
Currently working on Forbidden
- 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: Another newbie question
Please show your code, including the code from ReDZiX you copied.
Last edited by Milkymalk on Wed Mar 07, 2018 10:16 pm, edited 1 time in total.
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)
- DragonKnight
- Regular
- Posts: 51
- Joined: Sun Nov 12, 2017 10:16 am
- Projects: Taboo Hearts
- Contact:
Re: Another newbie question
Code: Select all
screen mc_stats(): #The screen that will show the variables
default show_vars = False #A screen variable to turn the viewing on/off
imagebutton auto "button_%s.png": #The imagebutton
action ToggleScreenVariable('show_vars')
#^This action toggles the screen variable
#between True(on) and False(off)
if show_vars: #If the variable is True...
frame: #...this frame is shown
xpos .1
has vbox
text "Power:[$ i_love]"
text "Intelligence:[$ i_lust]"
text "Charisma:[$ i_sle]"
# The game starts here.
label start:
# Define varbles
$ i_love = 20
$ i_lust = 5
$ i_sle =20
$ i_slt = 5
$ m_love = 20
$ m_lust = 0
$ s_love = 20
$ s_lust = 0
$ day_gone_by = 0
$ i_money = 500
$ mom_money = 500
$ s_money = 0
Currently working on Taboo Hearts
Currently working on Forbidden
Currently working on Forbidden
- trooper6
- Lemma-Class Veteran
- Posts: 3712
- Joined: Sat Jul 09, 2011 10:33 pm
- Projects: A Close Shave
- Location: Medford, MA
- Contact:
Re: Another newbie question
This code works:
I used a textbutton rather than an imagebutton because I don't have have any temporary button images right now. If you want to use an image button, you have to make sure that you have the appropriate images for the button to use.
Code: Select all
# Define varbles
default show_vars = False
default i_love = 20
default i_lust = 5
default i_sle =20
default i_slt = 5
default m_love = 20
default m_lust = 0
default s_love = 20
default s_lust = 0
default day_gone_by = 0
default i_money = 500
default mom_money = 500
default s_money = 0
screen mc_stats(): #The screen that will show the variables
vbox:
textbutton "Stats" action ToggleVariable("show_vars")
if show_vars: #If the variable is True...
frame: #...this frame is shown
xpos .1
has vbox
text "Power: [i_love]"
text "Intelligence: [i_lust]"
text "Charisma: [i_sle]"
# The game starts here.
label start:
show screen mc_stats()
"The game is started."
return
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?) Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?) Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978
- DragonKnight
- Regular
- Posts: 51
- Joined: Sun Nov 12, 2017 10:16 am
- Projects: Taboo Hearts
- Contact:
Re: Another newbie question
Thanks, it works!!!
Currently working on Taboo Hearts
Currently working on Forbidden
Currently working on Forbidden
-
- Newbie
- Posts: 4
- Joined: Thu Mar 08, 2018 5:38 am
- Tumblr: hime
- Deviantart: hime1
- Github: hime2
- Skype: hime3
- Soundcloud: hime4
- itch: hime5
- Contact:
Re: Another newbie question
hello guys.. i need help.. my question is how to code a start button and quit. i have a drawing but i don't know how to put codes. someone help thanks a lot im just new here.
- DragonKnight
- Regular
- Posts: 51
- Joined: Sun Nov 12, 2017 10:16 am
- Projects: Taboo Hearts
- Contact:
Re: Another newbie question
Code: Select all
[# Define varbles
default show_vars = False
default i_love = 20
default i_lust = 5
default i_sle =20
default i_slt = 5
default m_love = 20
default m_lust = 0
default s_love = 20
default s_lust = 0
default day_gone_by = 0
default i_money = 500
default mom_money = 500
default s_money = 0
screen mc_stats(): #The screen that will show the variables
vbox:
textbutton "Stats" action ToggleVariable("show_vars")
if show_vars: #If the variable is True...
frame: #...this frame is shown
xpos .1
has vbox
text "Mom Love: [i_love]"
text "Mom Lust: [i_lust]"
text "Sis Love: [i_sle]"
text "Sis Lust: [i_slt]"
screen mom_stats(): #The screen that will show the variables
vbox:
textbutton "Stats" action ToggleVariable("show_vars")
if show_vars: #If the variable is True...
frame: #...this frame is shown
xpos .6
has vbox
text "Mom Love: [m_love]"
text "Mom Lust: [m_lust]"
text "Mom $: [mom_money]"
# The game starts here.
label start:
show screen mc_stats()
show screen mom_stats()
/code]
[attachment=0]problem.png[/attachment]
I have a problem. I need to have a space between my stats and my mom, I just can't do it. I try xpos in different posit. and i reached 8 and it put it back to where my origal (mc) stats were
Currently working on Taboo Hearts
Currently working on Forbidden
Currently working on Forbidden
-
- Newbie
- Posts: 4
- Joined: Thu Mar 08, 2018 5:38 am
- Tumblr: hime
- Deviantart: hime1
- Github: hime2
- Skype: hime3
- Soundcloud: hime4
- itch: hime5
- Contact:
Re: Another newbie question
thank you...
- DragonKnight
- Regular
- Posts: 51
- Joined: Sun Nov 12, 2017 10:16 am
- Projects: Taboo Hearts
- Contact:
Re: Another newbie question
Who you thanking??
Currently working on Taboo Hearts
Currently working on Forbidden
Currently working on Forbidden
Re: Another newbie question
As you have it right now the vboxes in both screens are overlapping (on top of each other). Try giving the vboxes the xpos instead (remove the xpos in the Frames):DragonKnight wrote: ↑Thu Mar 08, 2018 6:29 am I have a problem. I need to have a space between my stats and my mom, I just can't do it. I try xpos in different posit. and i reached 8 and it put it back to where my origal (mc) stats were
Code: Select all
screen mc_stats(): #The screen that will show the variables
vbox:
xpos .1
textbutton "Stats" action ToggleVariable("show_vars")
if show_vars: #If the variable is True...
frame: #...this frame is shown
has vbox
text "Mom Love: [i_love]"
text "Mom Lust: [i_lust]"
text "Sis Love: [i_sle]"
text "Sis Lust: [i_slt]"
screen mom_stats(): #The screen that will show the variables
vbox:
xpos .6
textbutton "Stats" action ToggleVariable("show_vars")
if show_vars: #If the variable is True...
frame: #...this frame is shown
has vbox
text "Mom Love: [m_love]"
text "Mom Lust: [m_lust]"
text "Mom $: [mom_money]"
- trooper6
- Lemma-Class Veteran
- Posts: 3712
- Joined: Sat Jul 09, 2011 10:33 pm
- Projects: A Close Shave
- Location: Medford, MA
- Contact:
Re: Another newbie question
xpos is left/right position, ypos is the up/down position. Perhaps you want the up/down spacing.
But you can just add and empty space if you want a larger gap between the "Stats" label and your stats.
But you can just add and empty space if you want a larger gap between the "Stats" label and your stats.
Code: Select all
# Define varbles
default show_vars = False
default i_love = 20
default i_lust = 5
default i_sle =20
default i_slt = 5
default m_love = 20
default m_lust = 0
default s_love = 20
default s_lust = 0
default day_gone_by = 0
default i_money = 500
default mom_money = 500
default s_money = 0
screen mc_stats(): #The screen that will show the variables
# imagebutton auto "button_%s.png": #The imagebutton
# action ToggleScreenVariable('show_vars')
# #^This action toggles the screen variable
# #between True(on) and False(off)
vbox:
textbutton "Stats" action ToggleVariable("show_vars")
text " "
if show_vars: #If the variable is True...
frame: #...this frame is shown
xpos .1
has vbox
text "Power: [i_love]"
text "Intelligence: [i_lust]"
text "Charisma: [i_sle]"
# The game starts here.
label start:
show screen mc_stats()
"The game is started."
return
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?) Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?) Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978
- DragonKnight
- Regular
- Posts: 51
- Joined: Sun Nov 12, 2017 10:16 am
- Projects: Taboo Hearts
- Contact:
Re: Another newbie question
Excellent!!!!!!!! It works, thank you!!!
Currently working on Taboo Hearts
Currently working on Forbidden
Currently working on Forbidden
Who is online
Users browsing this forum: Google [Bot], Lucyper, Majestic-12 [Bot]