Commit 8f6fd4dd authored by Julia Santos's avatar Julia Santos

Room now dims when initiating dialogue, player can't click anywhere aside from next arrow.

parent 122f523a
......@@ -2,6 +2,7 @@ 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
onready var dim = get_parent().get_node("Dim")
# Called when the node enters the scene tree for the first time.
func _ready():
......@@ -9,9 +10,12 @@ func _ready():
func mouseInteraction():
dialogueBox.text = getDialogue(currentScene)
print("CLICKED")
func setScene(sname):
currentScene = sname
dim.show()
func getDialogue(sceneName):
var dialogue
......@@ -27,6 +31,7 @@ func getDialogue(sceneName):
dialogue = "(Geez. He won't budge. I guess I'll have to distract him somehow...)"
sceneProgress = 0
hide()
dim.hide()
elif sceneName == "First Nana pass":
match sceneProgress:
0:
......@@ -45,12 +50,13 @@ func getDialogue(sceneName):
inventory.remove_item_name("Nana")
4:
dialogue = "(Okay he's finally gone! Gotta fix this creaking ladder before he gets back!)"
sceneProgress = 0
dim.hide()
hide()
elif sceneName == "Nana again":
dialogue = "Brodie: OF COURSE, ALWAYS."
get_parent().get_node("Neighbor").move()
inventory.remove_item_name("Nana")
dim.hide()
hide()
return dialogue
......@@ -84,7 +84,7 @@ func _start_lab(): # trying the lab the first time, adds the new quests
_start_cutscene_2b()
quests.add("Clean bathroom")
quests.add("Repot plants")
quests.add("Figure out what's making that noise")
quests.add("Figure out what's making that noise & get rid of it")
quests.add("Feed Banana")
newQuests = true
movementHandle.finishTutorial()
......
......@@ -21,9 +21,6 @@ extents = Vector2( 10.2686, 34.6917 )
[sub_resource type="RectangleShape2D" id=2]
extents = Vector2( 22.9649, 32.4101 )
[sub_resource type="RectangleShape2D" id=3]
extents = Vector2( 10.1137, 24.8506 )
[sub_resource type="RectangleShape2D" id=4]
extents = Vector2( 21.453, 8.21959 )
......@@ -40,6 +37,9 @@ extents = Vector2( 21.6967, 40.5453 )
flags = 4
load_path = "res://.import/front door.png-58881902b918df4a261fe60f02da2bc4.stex"
[sub_resource type="RectangleShape2D" id=3]
extents = Vector2( 10.1137, 24.8506 )
[sub_resource type="RectangleShape2D" id=9]
extents = Vector2( 8.10034, 6.2543 )
......@@ -57,7 +57,7 @@ __meta__ = {
}
[node name="Ladder" type="StaticBody2D" parent="."]
position = Vector2( -120.812, -41.6404 )
position = Vector2( -144.839, -41.6404 )
input_pickable = true
script = ExtResource( 14 )
__meta__ = {
......@@ -77,7 +77,7 @@ scale = Vector2( 0.101337, 0.344337 )
texture = ExtResource( 3 )
[node name="Neighbor to balcony" type="StaticBody2D" parent="."]
position = Vector2( 226.926, -167.633 )
position = Vector2( 176.202, -146.276 )
input_pickable = true
script = ExtResource( 10 )
__meta__ = {
......@@ -95,26 +95,6 @@ position = Vector2( 0.304169, 0.207489 )
scale = Vector2( 0.231109, 0.325438 )
texture = ExtResource( 6 )
[node name="Neighbor" type="StaticBody2D" parent="."]
position = Vector2( 6.43958, 8.75641 )
input_pickable = true
script = ExtResource( 7 )
__meta__ = {
"_edit_group_": true
}
interactable = true
flavorText = "Brodie: Um... What are you doing?"
[node name="CollisionShape2D" type="CollisionShape2D" parent="Neighbor"]
position = Vector2( -0.433167, 2.2196 )
scale = Vector2( 5, 5 )
shape = SubResource( 3 )
[node name="Sprite" type="Sprite" parent="Neighbor/CollisionShape2D"]
position = Vector2( 0.178162, -0.170486 )
scale = Vector2( 0.101337, 0.243543 )
texture = ExtResource( 5 )
[node name="Reptile memorabilia" type="StaticBody2D" parent="."]
position = Vector2( -333.739, -277.246 )
input_pickable = true
......@@ -134,7 +114,7 @@ scale = Vector2( 0.21221, 0.0860532 )
texture = ExtResource( 8 )
[node name="Toolbox" type="StaticBody2D" parent="."]
position = Vector2( -274.723, 85.4092 )
position = Vector2( -298.75, 85.4092 )
input_pickable = true
script = ExtResource( 2 )
__meta__ = {
......@@ -154,7 +134,7 @@ scale = Vector2( 0.146617, 0.1 )
texture = ExtResource( 4 )
[node name="Screwdriver" type="StaticBody2D" parent="."]
position = Vector2( -308.741, 23.6731 )
position = Vector2( -332.768, 23.6731 )
rotation = -0.345575
input_pickable = true
script = ExtResource( 2 )
......@@ -194,6 +174,70 @@ position = Vector2( -0.00814819, -0.484581 )
scale = Vector2( 0.208332, 0.403654 )
texture = SubResource( 8 )
[node name="Dim" type="ColorRect" parent="."]
visible = false
margin_left = 317.0
margin_top = -287.0
margin_right = 424.0
margin_bottom = -238.0
rect_pivot_offset = Vector2( 275.635, 160.503 )
mouse_filter = 2
color = Color( 0, 0, 0, 0.556863 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ColorRect" type="ColorRect" parent="Dim"]
margin_left = -958.0
margin_top = -93.0
margin_bottom = 527.0
rect_pivot_offset = Vector2( 275.635, 160.503 )
color = Color( 0, 0, 0, 0.556863 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ColorRect2" type="ColorRect" parent="Dim"]
margin_top = 49.0
margin_right = 99.0
margin_bottom = 529.0
rect_pivot_offset = Vector2( 275.635, 160.503 )
color = Color( 0, 0, 0, 0.556863 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ColorRect3" type="ColorRect" parent="Dim"]
margin_left = -0.389587
margin_top = -111.398
margin_right = 106.61
margin_bottom = -0.398499
rect_pivot_offset = Vector2( 275.635, 160.503 )
color = Color( 0, 0, 0, 0.556863 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Neighbor" type="StaticBody2D" parent="."]
position = Vector2( -17.5875, 8.75641 )
input_pickable = true
script = ExtResource( 7 )
__meta__ = {
"_edit_group_": true
}
interactable = true
flavorText = "Brodie: Um... What are you doing?"
[node name="CollisionShape2D" type="CollisionShape2D" parent="Neighbor"]
position = Vector2( -0.433167, 2.2196 )
scale = Vector2( 5, 5 )
shape = SubResource( 3 )
[node name="Sprite" type="Sprite" parent="Neighbor/CollisionShape2D"]
position = Vector2( 0.178162, -0.170486 )
scale = Vector2( 0.101337, 0.243543 )
texture = ExtResource( 5 )
[node name="Dialogue arrow" type="StaticBody2D" parent="."]
visible = false
position = Vector2( 353.534, -272.056 )
......
......@@ -138,7 +138,7 @@ items = [ NodePath("Nana from afar"), NodePath("Other balcony"), NodePath("Balco
[node name="Event Handler" type="Node2D" parent="."]
position = Vector2( 460.602, 18.6417 )
script = ExtResource( 12 )
eventItems = [ NodePath("../Laundry basket/To do list"), NodePath("../Bedroom/Laundry basket"), NodePath("../Laundry basket/Return"), NodePath("../Fridge/Return"), NodePath("../Kitchen/Fridge"), NodePath("../Laundry area/Groceries"), NodePath("../Fridge/Energy handler"), NodePath("../Laundry area/Laundry door"), NodePath("../Laundry - Notepad/Return"), NodePath("../Laundry - Notepad/Dialogue control"), NodePath("../Bedroom/Bathroom door"), NodePath("../Bathroom/Door - to Bedroom"), NodePath("../Living room/Balcony door"), NodePath("../Balcony/Door to living room"), NodePath("../Living room/Front door"), NodePath("../Hallway/Door to Moxie"), NodePath("../Hallway/Door to neighbor"), NodePath("../Neighbor\'s room/Neighbor to hallway"), NodePath("../Neighbor\'s balcony/Balcony to neighbor\'s room"), NodePath("../Neighbor\'s room/Neighbor to balcony"), NodePath("../Bedroom/Laptop"), NodePath("../Desk/Return"), NodePath("../Inside cabinet/Return"), NodePath("../Kitchen/Cabinet"), NodePath("../Desk/Laptop"), NodePath("../Bedroom/Terrarium"), NodePath("../Bathroom/Lab Note - Bathroom"), NodePath("../Inside cabinet/Lab notes"), NodePath("../Living room/Lab notes"), NodePath("../Bedroom/Pants"), NodePath("../Bedroom/Shirt"), NodePath("../Bedroom/Sando"), NodePath("../Bedroom/Towel"), NodePath("../Bathroom/Sink"), NodePath("../Bathroom/Toilet"), NodePath("../Bathroom/Mirror"), NodePath("../Bathroom/Mess on floor"), NodePath("../Hallway/Trash chute") ]
eventItems = [ NodePath("../Laundry basket/To do list"), NodePath("../Bedroom/Laundry basket"), NodePath("../Laundry basket/Return"), NodePath("../Fridge/Return"), NodePath("../Kitchen/Fridge"), NodePath("../Laundry area/Groceries"), NodePath("../Fridge/Energy handler"), NodePath("../Laundry area/Laundry door"), NodePath("../Laundry - Notepad/Return"), NodePath("../Laundry - Notepad/Dialogue control"), NodePath("../Bedroom/Bathroom door"), NodePath("../Bathroom/Door - to Bedroom"), NodePath("../Living room/Balcony door"), NodePath("../Balcony/Door to living room"), NodePath("../Living room/Front door"), NodePath("../Hallway/Door to Moxie"), NodePath("../Hallway/Door to neighbor"), NodePath("../Neighbor\'s room/Neighbor to hallway"), NodePath("../Neighbor\'s balcony/Balcony to neighbor\'s room"), NodePath("../Neighbor\'s room/Neighbor to balcony"), NodePath("../Bedroom/Laptop"), NodePath("../Desk/Return"), NodePath("../Inside cabinet/Return"), NodePath("../Kitchen/Cabinet"), NodePath("../Desk/Laptop"), NodePath("../Bedroom/Terrarium"), NodePath("../Bathroom/Lab Note - Bathroom"), NodePath("../Inside cabinet/Lab notes"), NodePath("../Living room/Lab notes"), NodePath("../Bedroom/Pants"), NodePath("../Bedroom/Shirt"), NodePath("../Bedroom/Sando"), NodePath("../Bedroom/Towel"), NodePath("../Bathroom/Sink"), NodePath("../Bathroom/Toilet"), NodePath("../Bathroom/Mirror"), NodePath("../Bathroom/Mess on floor"), NodePath("../Hallway/Trash chute"), NodePath("../Neighbor\'s room/Ladder") ]
[node name="Moxie" type="Sprite" parent="."]
position = Vector2( 214.135, 386.725 )
......
extends "res://Item.gd"
onready var neighbor = get_parent().get_node("Neighbor")
signal oiled
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
func passEvent(handler):
connect("oiled", handler,"_remove_quest")
pass
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."
emit_signal("oiled","Figure out what's making that noise & get rid of it")
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
......
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