I have a Question. Do you want the new scores to be retained even if you start a brand new game? So that if Person A plays your game and gets 100 minotaur points and Person B starts a brand new game they will start their new game with 100 minotaur points as well?
If that is what you want, then you want persistent data. Rather than:
do
However, if you just want the data saved within the game...so for example if you save the game and come back to it later, the score remains how it was...then you just need to save your game. Your current code never gives you a place to do that. Try this version of your code:
Code: Select all
# You can place the script of your game in this file.
# Declare images below this line, using the image statement.
# eg. image eileen happy = "eileen_happy.png"
# Declare characters used by this game.
define p = Character('Player', color="#c8ffc8")
define li = Character('Love Interest', color="#c8ffc8")
default hydra=10
default hplus=5
default max_hydra=5000
default hclicked = True
default arachne=10
default aplus=5
default max_arachne=5000
default aclicked = True
default minotaur=10
default mplus=5
default max_minotaur=5000
default mclicked = True
default cerberus=10
default cplus=5
default max_cerberus=5000
default cclicked = True
screen clicker:
style_prefix "clicker"
vbox:
null height 20
xalign 0.5
spacing 20
textbutton "[hydra]":
text_size 40
background "#aaa" #"#000"
xysize(100, 100)
action [SetVariable("hclicked", True), If(hydra >= max_hydra, true=Jump("win"), false=SetVariable("hydra", hydra + hplus))]
button:
text "[arachne]" size 40
background "#aaa"
xysize(100, 100)
action [SetVariable("aclicked", True), If(arachne >= max_arachne, true=Jump("win"), false=SetVariable("arachne", arachne + aplus))]
button:
text "[minotaur]" size 40
background "#aaa"
xysize(100, 100)
action [SetVariable("mclicked", True), If(minotaur >= max_minotaur, true=Jump("win"), false=SetVariable("minotaur", minotaur + mplus))]
button:
text "[cerberus]" size 40
background "#aaa"
xysize(100, 100)
action [SetVariable("cclicked", True), If(cerberus >= max_cerberus, true=Jump("win"), false=SetVariable("cerberus", cerberus + cplus))]
textbutton "End" action Return()
style clicker_button is button
style clicker_button_text is button_text
style clicker_vbox:
xalign 0.5
ypos 270
yanchor 0.5
spacing gui.choice_spacing
style clicker_button is default:
properties gui.button_properties("choice_button")
activate_sound "click.wav"
style clicker_button_text is default:
properties gui.button_text_properties("choice_button")
label start:
"Default scores. Hydra: [hydra]. Arachne: [arachne]. Minotaur: [minotaur]. Cerberus: [cerberus]."
"Now we'll call our screen"
call screen clicker
"The game continues. Current Scores. Hydra: [hydra]. Arachne: [arachne]. Minotaur: [minotaur]. Cerberus: [cerberus]."
"Save your game here. Quit the game and then load it."
"Are you back? Note the scores are the same ones after the click."
"Hydra: [hydra]. Arachne: [arachne]. Minotaur: [minotaur]. Cerberus: [cerberus]."
"Game over."
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