Commit 76160deb authored by Julia Santos's avatar Julia Santos

Can now give Nana to the neighbor, and get her back

parent b6a0e30a
extends "res://Item.gd"
# This script progresses the dialogue between the Moxie and Brodie, hiding itself and resetting the conversation after it has ended
onready var currentScene = "Intro"
onready var sceneProgress = 0
# Called when the node enters the scene tree for the first time.
......@@ -8,7 +8,14 @@ func _ready():
pass # Replace with function body.
func mouseInteraction():
dialogueBox.text = getDialogue(currentScene)
func setScene(sname):
currentScene = sname
func getDialogue(sceneName):
var dialogue
if sceneName == "Intro":
match sceneProgress:
0:
dialogue = "Moxie: ..... Trying to help....?"
......@@ -20,5 +27,24 @@ func mouseInteraction():
dialogue = "(Geez. He won't budge. I guess I'll have to distract him somehow...)"
sceneProgress = 0
hide()
dialogueBox.text = dialogue
elif sceneName == "First Nana pass":
match sceneProgress:
0:
dialogue = "Brodie: OH MY GOSH IS THAT A LIZARD???"
sceneProgress += 1
1:
dialogue = "Moxie: Yeah, and she’s very friendly."
sceneProgress += 1
2:
dialogue = "Brodie: She’s so cute! C-can I play with her…? Please."
sceneProgress += 1
3:
dialogue = "Moxie: Sure! Just put her back in the terrarium when you’re done!"
inventory.remove_item_name("Nana")
sceneProgress = 0
hide()
elif sceneName == "Nana again":
dialogue = "Brodie: OF COURSE, ALWAYS."
inventory.remove_item_name("Nana")
hide()
return dialogue
extends "res://Item.gd"
onready var dialogueArrow = get_parent().get_node("Dialogue arrow")
onready var hasNana = false # whether or not the neighbor currently has nana
onready var hadNana = false
# This script initiates the dialogue sequence with the neighbor
# Called when the node enters the scene tree for the first time.
......@@ -7,6 +9,35 @@ func _ready():
pass # Replace with function body.
func mouseInteraction():
if !hasNana:
.mouseInteraction()
dialogueArrow.setScene("Intro")
dialogueArrow.show()
print("Starting scene")
else:
dialogueBox.text = "Brodie: Thank you for this I love her"
inventory.add_item("Nana", load("res://.import/nana.png-3afacff9a6dfeb0ea38c0e651d0707be.stex"))
hasNana = false
func objInteraction(selected): # when an object is used on it
var flavor = control.interaction(inventory.get_item_text(selected), self.get_name())
if inventory.get_item_text(selected) == "Nana":
if !hadNana:
dialogueBox.text = "Moxie: Hey Brodie! Have you met Nana?"
dialogueArrow.setScene("First Nana pass")
dialogueArrow.show()
hadNana = true
else:
dialogueBox.text = "Moxie: Hey, could you hold Nana for me for a sec?"
dialogueArrow.setScene("Nana again")
dialogueArrow.show()
hasNana = true
elif typeof(flavor) != 0: #checks if there's coded flavor text for this interaction
dialogueBox.text = flavor
else:
dialogueBox.text = "No flavor text found" #can replace this later!
inventory.unselect_all() #unselect item
func doesHaveNana():
return hasNana
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment