Commit 122f523a authored by Julia Santos's avatar Julia Santos

Fixed glitch where 3rd cutscene wasnt playing, can now also oil the ladder...

Fixed glitch where 3rd cutscene wasnt playing, can now also oil the ladder while the neighbor is distracted. Trying to use any item on the ladder when the neighbor isnt distracted results in the correct dialogue. Also rearranged how the dialogue arrow works in that scene so that it's less cluttered.
parent 76160deb
......@@ -40,11 +40,17 @@ func getDialogue(sceneName):
sceneProgress += 1
3:
dialogue = "Moxie: Sure! Just put her back in the terrarium when you’re done!"
sceneProgress += 1
get_parent().get_node("Neighbor").move()
inventory.remove_item_name("Nana")
4:
dialogue = "(Okay he's finally gone! Gotta fix this creaking ladder before he gets back!)"
sceneProgress = 0
hide()
elif sceneName == "Nana again":
dialogue = "Brodie: OF COURSE, ALWAYS."
get_parent().get_node("Neighbor").move()
inventory.remove_item_name("Nana")
hide()
return dialogue
......@@ -88,6 +88,7 @@ func _start_lab(): # trying the lab the first time, adds the new quests
quests.add("Feed Banana")
newQuests = true
movementHandle.finishTutorial()
get_parent().get_node("Desk/Laptop").start()
#change sprite for terrarium
bedroom.get_node("Terrarium").flavorText = "OMG! Where did Banana go??"
......
[gd_scene load_steps=23 format=2]
[gd_scene load_steps=24 format=2]
[ext_resource path="res://Scripts/Dialogue control/Dialogue Control - Neighbor's room.gd" type="Script" id=1]
[ext_resource path="res://Item.gd" type="Script" id=2]
......@@ -13,6 +13,7 @@
[ext_resource path="res://assets/Thesis Clickables/Screwdriver.png" type="Texture" id=11]
[ext_resource path="res://Dialogue arrow.gd" type="Script" id=12]
[ext_resource path="res://assets/Thesis Clickables/right arrow.png" type="Texture" id=13]
[ext_resource path="res://Scripts/Ladder.gd" type="Script" id=14]
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 10.2686, 34.6917 )
......@@ -58,7 +59,7 @@ __meta__ = {
[node name="Ladder" type="StaticBody2D" parent="."]
position = Vector2( -120.812, -41.6404 )
input_pickable = true
script = ExtResource( 2 )
script = ExtResource( 14 )
__meta__ = {
"_edit_group_": true
}
......
......@@ -20,7 +20,9 @@ func mouseInteraction():
.mouseInteraction()
if !started: # if the quests have been given yet
emit_signal("start_lab")
started = true
else:
if eventHandler.get_lab_notes() == 4:
emit_signal("finish_lab")
func start():
started = true
extends "res://Item.gd"
onready var neighbor = get_parent().get_node("Neighbor")
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
func objInteraction(selected): # when an object is used on it
if neighbor.doesHaveNana():
var flavor = control.interaction(inventory.get_item_text(selected), self.get_name())
if inventory.get_item_text(selected) == "Oil":
dialogueBox.text = "That should stop the ladder from squeaking."
flavorText = "D-do you hear that? I-Is that.... Silence...? Hay salamat!"
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!
else:
dialogueBox.text = "Brodie: Um... What are you doing?"
get_parent().get_node("Dialogue arrow").setScene("Intro")
get_parent().get_node("Dialogue arrow").show()
inventory.unselect_all() #unselect item
......@@ -24,12 +24,13 @@ func mouseInteraction(): # changes flavor text after the first itneraction, and
func objInteraction(selected): # when an object is used on it
var flavor = control.interaction(inventory.get_item_text(selected), self.get_name())
if 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!
if inventory.get_item_text(selected) == "Bobby pins": # unlocking the door with a bobby pin
dialogueBox.text = "I can't believe that actually worked?!"
unlocked = true # can now go through the balcony door freely
inventory.remove_item(selected)
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
......@@ -18,6 +18,7 @@ func mouseInteraction():
dialogueBox.text = "Brodie: Thank you for this I love her"
inventory.add_item("Nana", load("res://.import/nana.png-3afacff9a6dfeb0ea38c0e651d0707be.stex"))
hasNana = false
move()
func objInteraction(selected): # when an object is used on it
var flavor = control.interaction(inventory.get_item_text(selected), self.get_name())
......@@ -41,3 +42,9 @@ func objInteraction(selected): # when an object is used on it
func doesHaveNana():
return hasNana
func move():
if !hasNana:
position = Vector2(6.44,8.756)
else:
position = Vector2(326.341,8.756)
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