if player has talked to all three crystal gems
jmnevil54
10 Jan 2021, 02:05if player has talked to all three crystal gems {
MoveObject (Aventurine, Beach City 9)
}
Something like that.
How do I do this in real code?
mrangel
10 Jan 2021, 11:32I assume you're setting a flag or something when the player talks to each gem?
So in each gem's "speak to" verb (or whatever library you're using for conversation) you would put:
this.talkedto = true
and then you'd have something like:
if (firstgem.talkedto and secondgem.talkedto and thirdgem.talkedto) {
jmnevil54
10 Jan 2021, 20:02Okay, I put this.talkedto = true In there, so now the code looks like this:
if (game.Holopearldefeat = true) {
msg ("\"Wow! Steven! You defeated the Holo Pearl! I'm so proud of you, I could just hit you!\"")
this.talkedto = true
}
else {
msg ("\"Steven! The sun is amazing today! Care to join us out in the sun?")
}
Now I just need to figure out how to lure the player to Aventurine!
Edit 4: Nevermind, it's not fixed.
Game link here.
http://textadventures.co.uk/games/view/tu-ceu4k5eqd0m0ztu7zya/steven-universe-new-beginnings