Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
To Do Break Down
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
breakdown
To Do Break Down
Commits
76160deb
Commit
76160deb
authored
Dec 11, 2021
by
Julia Santos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Can now give Nana to the neighbor, and get her back
parent
b6a0e30a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
74 additions
and
17 deletions
+74
-17
Dialogue arrow.gd
Dialogue arrow.gd
+40
-14
Neighbor.gd
Scripts/Neighbor.gd
+34
-3
No files found.
Dialogue arrow.gd
View file @
76160deb
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
Scripts/Neighbor.gd
View file @
76160deb
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment