Commit 11922ee4 authored by Julia Santos's avatar Julia Santos

Added text scrolling to all dialogue changes

parent 1acc7ef7
...@@ -10,6 +10,7 @@ func _ready(): ...@@ -10,6 +10,7 @@ func _ready():
func mouseInteraction(): func mouseInteraction():
dialogueBox.text = getDialogue(currentScene) dialogueBox.text = getDialogue(currentScene)
dialogueBox.playText()
func setScene(sname): func setScene(sname):
currentScene = sname currentScene = sname
......
...@@ -41,6 +41,7 @@ func _unselected_ing(ingredient): # when an ingredient is unselected, remove it ...@@ -41,6 +41,7 @@ func _unselected_ing(ingredient): # when an ingredient is unselected, remove it
print(ingredients.size()) print(ingredients.size())
print(ingredients) print(ingredients)
updateUI() updateUI()
dialogue.playText()
func updateUI(): # whenever there's a change in selections, enables/disables ingredients depending on what food can or cannot be eaten with each other func updateUI(): # whenever there's a change in selections, enables/disables ingredients depending on what food can or cannot be eaten with each other
if ingredients.size() >= 1 and ingredients[0] != "Granola bar": # if anything aside from the granola bar is selected, disable the granola bar, as the granola bar can only be eaten alone if ingredients.size() >= 1 and ingredients[0] != "Granola bar": # if anything aside from the granola bar is selected, disable the granola bar, as the granola bar can only be eaten alone
......
...@@ -100,6 +100,7 @@ func _finish_lab(): ...@@ -100,6 +100,7 @@ func _finish_lab():
_start_cutscene_3() _start_cutscene_3()
else: else:
dialogue.text = "Too tired. Gotta relax first. Need carbohydrates. Can't I do something less stressful first? Please and thank you." dialogue.text = "Too tired. Gotta relax first. Need carbohydrates. Can't I do something less stressful first? Please and thank you."
dialogue.playText()
func _add_quest(questName): # adding a quest to the quest list func _add_quest(questName): # adding a quest to the quest list
quests.add(questName) quests.add(questName)
...@@ -292,8 +293,10 @@ func _living_to_hallway(): # moving from living room to hallway, if there's a re ...@@ -292,8 +293,10 @@ func _living_to_hallway(): # moving from living room to hallway, if there's a re
hallway.show() hallway.show()
canFrontDoor = true canFrontDoor = true
dialogue.text = "What is that noise? Sounds like my neighbor's trying to break down their walls." dialogue.text = "What is that noise? Sounds like my neighbor's trying to break down their walls."
dialogue.playText()
else: else:
dialogue.text = "You know, my philosophy has always been, 'If there's no reason to leave my apartment, why leave?'" dialogue.text = "You know, my philosophy has always been, 'If there's no reason to leave my apartment, why leave?'"
dialogue.playText()
func _hallway_to_living(): # moving from hallway to moxie's living room func _hallway_to_living(): # moving from hallway to moxie's living room
movementHandle.enableMovement() movementHandle.enableMovement()
...@@ -356,6 +359,7 @@ func _open_fridge(): # looking into the fridge ...@@ -356,6 +359,7 @@ func _open_fridge(): # looking into the fridge
notepad.hide() notepad.hide()
else: else:
dialogue.text = "Not quite dinnertime yet!" dialogue.text = "Not quite dinnertime yet!"
dialogue.playText()
func _return_fridge(): # returning from fridge view func _return_fridge(): # returning from fridge view
fridge.hide() fridge.hide()
......
...@@ -18,6 +18,7 @@ func pickup(): ...@@ -18,6 +18,7 @@ func pickup():
if get_name() == "Lab Note - Bathroom": # if this is specifically the lab note in the bathroom, signal to the mirror that it's been taken if get_name() == "Lab Note - Bathroom": # if this is specifically the lab note in the bathroom, signal to the mirror that it's been taken
get_parent().get_node("Mirror").gotNote() get_parent().get_node("Mirror").gotNote()
dialogueBox.text = flavorText dialogueBox.text = flavorText
dialogueBox.playText()
queue_free() queue_free()
inventory.unselect_all() inventory.unselect_all()
emit_signal("retrieved") emit_signal("retrieved")
...@@ -165,7 +165,6 @@ polygon = PoolVector2Array( 236, -411.7, 236, -409.3, 440, -371.3, 440, -368, 50 ...@@ -165,7 +165,6 @@ polygon = PoolVector2Array( 236, -411.7, 236, -409.3, 440, -371.3, 440, -368, 50
[node name="Sprite" type="Sprite" parent="Pot/Hitbox"] [node name="Sprite" type="Sprite" parent="Pot/Hitbox"]
position = Vector2( 0, 0.000244141 ) position = Vector2( 0, 0.000244141 )
scale = Vector2( 1, 1 )
texture = ExtResource( 3 ) texture = ExtResource( 3 )
[node name="h" type="CollisionShape2D" parent="Pot"] [node name="h" type="CollisionShape2D" parent="Pot"]
......
...@@ -106,7 +106,6 @@ scale = Vector2( 0.09, 0.09 ) ...@@ -106,7 +106,6 @@ scale = Vector2( 0.09, 0.09 )
polygon = PoolVector2Array( 420, -313.7, 420, -304.7, 450, -141.9, 450, -131, 456.4, 48, 453.5, 48, 411.5, 309, 408.6, 309, 315.6, 523, 303.6, 523, -412, 320.6, -412, 309.8, -334, 136.9, -334, 134.7, -295, -15.3, -295, -21.3, -286.3, -169.8, -316, -390.3, -316, -400.5, -306, -409.4, -306, -417.5 ) polygon = PoolVector2Array( 420, -313.7, 420, -304.7, 450, -141.9, 450, -131, 456.4, 48, 453.5, 48, 411.5, 309, 408.6, 309, 315.6, 523, 303.6, 523, -412, 320.6, -412, 309.8, -334, 136.9, -334, 134.7, -295, -15.3, -295, -21.3, -286.3, -169.8, -316, -390.3, -316, -400.5, -306, -409.4, -306, -417.5 )
[node name="Sprite" type="Sprite" parent="Lab Note - Bathroom/Hitbox"] [node name="Sprite" type="Sprite" parent="Lab Note - Bathroom/Hitbox"]
scale = Vector2( 1, 1 )
texture = ExtResource( 5 ) texture = ExtResource( 5 )
[node name="Toilet" type="StaticBody2D" parent="."] [node name="Toilet" type="StaticBody2D" parent="."]
......
...@@ -8,22 +8,22 @@ ...@@ -8,22 +8,22 @@
[ext_resource path="res://assets/Thesis Clickables/tabo (with water).png" type="Texture" id=6] [ext_resource path="res://assets/Thesis Clickables/tabo (with water).png" type="Texture" id=6]
[ext_resource path="res://assets/Thesis Clickables/pot.png" type="Texture" id=12] [ext_resource path="res://assets/Thesis Clickables/pot.png" type="Texture" id=12]
[sub_resource type="RectangleShape2D" id=2] [sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 26.4732, 26.6968 ) extents = Vector2( 26.4732, 26.6968 )
[sub_resource type="RectangleShape2D" id=1] [sub_resource type="RectangleShape2D" id=2]
extents = Vector2( 20.5876, 32.5145 ) extents = Vector2( 20.5876, 32.5145 )
[sub_resource type="RectangleShape2D" id=3] [sub_resource type="RectangleShape2D" id=3]
extents = Vector2( 19.9646, 20.1882 ) extents = Vector2( 19.9646, 20.1882 )
[sub_resource type="RectangleShape2D" id=5] [sub_resource type="RectangleShape2D" id=4]
extents = Vector2( 19.9646, 20.1882 ) extents = Vector2( 19.9646, 20.1882 )
[sub_resource type="RectangleShape2D" id=6] [sub_resource type="RectangleShape2D" id=5]
extents = Vector2( 15.414, 13.6335 ) extents = Vector2( 15.414, 13.6335 )
[sub_resource type="StreamTexture" id=7] [sub_resource type="StreamTexture" id=6]
flags = 4 flags = 4
load_path = "res://.import/return arrow.png-ba7c2fea6c5a220a249845f29bbe9177.stex" load_path = "res://.import/return arrow.png-ba7c2fea6c5a220a249845f29bbe9177.stex"
...@@ -56,14 +56,13 @@ scale = Vector2( 0.35, 0.35 ) ...@@ -56,14 +56,13 @@ scale = Vector2( 0.35, 0.35 )
polygon = PoolVector2Array( 236, -412.7, 236, -410.3, 440, -372.3, 440, -368.9, 503, -335, 503, -328.5, 537.1, -202, 530.9, -202, 508.9, -107, 504.3, -107, 470, -71.9, 470, -69, 350.1, 505, 346.7, 505, 331.7, 530, 324.5, 530, 73.6, 562, -53.6, 562, -304, 533.9, -304, 527.8, -333, 494.8, -333, 484, -448.9, -69.7, -494, -111.6, -494, -115.6, -520, -168.7, -520, -175.2, -516.6, -266, -512.4, -266, -479.5, -339, -474.6, -339, -412.6, -374, -408.2, -374, -252.1, -408, -243.7, -408, -61, -420.4, -61, -422.3 ) polygon = PoolVector2Array( 236, -412.7, 236, -410.3, 440, -372.3, 440, -368.9, 503, -335, 503, -328.5, 537.1, -202, 530.9, -202, 508.9, -107, 504.3, -107, 470, -71.9, 470, -69, 350.1, 505, 346.7, 505, 331.7, 530, 324.5, 530, 73.6, 562, -53.6, 562, -304, 533.9, -304, 527.8, -333, 494.8, -333, 484, -448.9, -69.7, -494, -111.6, -494, -115.6, -520, -168.7, -520, -175.2, -516.6, -266, -512.4, -266, -479.5, -339, -474.6, -339, -412.6, -374, -408.2, -374, -252.1, -408, -243.7, -408, -61, -420.4, -61, -422.3 )
[node name="Sprite" type="Sprite" parent="Pot/Hitbox"] [node name="Sprite" type="Sprite" parent="Pot/Hitbox"]
scale = Vector2( 1, 1 )
texture = ExtResource( 12 ) texture = ExtResource( 12 )
[node name="h" type="CollisionShape2D" parent="Pot"] [node name="h" type="CollisionShape2D" parent="Pot"]
visible = false visible = false
position = Vector2( -16.8367, -2.11676 ) position = Vector2( -16.8367, -2.11676 )
scale = Vector2( 5, 5 ) scale = Vector2( 5, 5 )
shape = SubResource( 2 ) shape = SubResource( 1 )
disabled = true disabled = true
[node name="Plant" type="StaticBody2D" parent="."] [node name="Plant" type="StaticBody2D" parent="."]
...@@ -88,7 +87,7 @@ texture = ExtResource( 4 ) ...@@ -88,7 +87,7 @@ texture = ExtResource( 4 )
visible = false visible = false
position = Vector2( -16.8367, -2.11676 ) position = Vector2( -16.8367, -2.11676 )
scale = Vector2( 5, 5 ) scale = Vector2( 5, 5 )
shape = SubResource( 1 ) shape = SubResource( 2 )
disabled = true disabled = true
[node name="Soil" type="StaticBody2D" parent="."] [node name="Soil" type="StaticBody2D" parent="."]
...@@ -115,7 +114,6 @@ scale = Vector2( 0.25, 0.25 ) ...@@ -115,7 +114,6 @@ scale = Vector2( 0.25, 0.25 )
polygon = PoolVector2Array( 322, -428.7, 322, -423.9, 351.3, -380, 407.5, -380, 469, -361.4, 469, -356.3, 484, -336.3, 484, -330, 500.3, -199, 494.2, -199, 473.1, -156.9, 506.2, 124, 582, 348.4, 582, 356.9, 568.4, 433, 563.3, 433, 499.2, 499, 493.5, 499, 323.3, 544, 309.7, 544, -78.6, 520, -98.4, 520, -371, 535.6, -371, 532.2, -524, 502.2, -524, 495.3, -551, 442.4, -551, 435.8, -559.8, 327, -555.1, 327, -519, 223.4, -519, 206, -523.5, 111, -519.8, 111, -474, -66.3, -474, -75.4, -470.3, -121.5, -511, -235.3, -511, -261.1, -474.6, -346, -469.1, -346, -216.1, -455, -210.5, -455, 16, -465.8, 115, -504.8, 115, -513.9 ) polygon = PoolVector2Array( 322, -428.7, 322, -423.9, 351.3, -380, 407.5, -380, 469, -361.4, 469, -356.3, 484, -336.3, 484, -330, 500.3, -199, 494.2, -199, 473.1, -156.9, 506.2, 124, 582, 348.4, 582, 356.9, 568.4, 433, 563.3, 433, 499.2, 499, 493.5, 499, 323.3, 544, 309.7, 544, -78.6, 520, -98.4, 520, -371, 535.6, -371, 532.2, -524, 502.2, -524, 495.3, -551, 442.4, -551, 435.8, -559.8, 327, -555.1, 327, -519, 223.4, -519, 206, -523.5, 111, -519.8, 111, -474, -66.3, -474, -75.4, -470.3, -121.5, -511, -235.3, -511, -261.1, -474.6, -346, -469.1, -346, -216.1, -455, -210.5, -455, 16, -465.8, 115, -504.8, 115, -513.9 )
[node name="Sprite" type="Sprite" parent="Soil/Hitbox"] [node name="Sprite" type="Sprite" parent="Soil/Hitbox"]
scale = Vector2( 1, 1 )
texture = ExtResource( 5 ) texture = ExtResource( 5 )
[node name="Water" type="StaticBody2D" parent="."] [node name="Water" type="StaticBody2D" parent="."]
...@@ -133,7 +131,7 @@ flavorText = "Click water" ...@@ -133,7 +131,7 @@ flavorText = "Click water"
visible = false visible = false
position = Vector2( -16.8367, -2.11676 ) position = Vector2( -16.8367, -2.11676 )
scale = Vector2( 5, 5 ) scale = Vector2( 5, 5 )
shape = SubResource( 5 ) shape = SubResource( 4 )
disabled = true disabled = true
[node name="Hitbox" type="CollisionPolygon2D" parent="Water"] [node name="Hitbox" type="CollisionPolygon2D" parent="Water"]
...@@ -157,12 +155,12 @@ interactable = true ...@@ -157,12 +155,12 @@ interactable = true
[node name="Hitbox" type="CollisionShape2D" parent="Return"] [node name="Hitbox" type="CollisionShape2D" parent="Return"]
position = Vector2( -2.89487, 2.65125 ) position = Vector2( -2.89487, 2.65125 )
scale = Vector2( 5, 5 ) scale = Vector2( 5, 5 )
shape = SubResource( 6 ) shape = SubResource( 5 )
[node name="Sprite" type="Sprite" parent="Return/Hitbox"] [node name="Sprite" type="Sprite" parent="Return/Hitbox"]
position = Vector2( -1.10974, 0.0285645 ) position = Vector2( -1.10974, 0.0285645 )
scale = Vector2( 0.0338674, 0.0338674 ) scale = Vector2( 0.0338674, 0.0338674 )
texture = SubResource( 7 ) texture = SubResource( 6 )
[node name="Label" type="Label" parent="Return"] [node name="Label" type="Label" parent="Return"]
visible = false visible = false
......
...@@ -191,6 +191,10 @@ visible = false ...@@ -191,6 +191,10 @@ visible = false
script = ExtResource( 4 ) script = ExtResource( 4 )
items = [ NodePath("Ladder"), NodePath("Neighbor to balcony"), NodePath("Neighbor"), NodePath("Reptile memorabilia"), NodePath("Toolbox"), NodePath("Screwdriver"), NodePath("Neighbor to hallway"), NodePath("Dialogue arrow") ] items = [ NodePath("Ladder"), NodePath("Neighbor to balcony"), NodePath("Neighbor"), NodePath("Reptile memorabilia"), NodePath("Toolbox"), NodePath("Screwdriver"), NodePath("Neighbor to hallway"), NodePath("Dialogue arrow") ]
[node name="Dialogue arrow" parent="Neighbor\'s room" index="10"]
retrievable = false
flavorText = ""
[node name="Neighbor\'s balcony" parent="." instance=ExtResource( 23 )] [node name="Neighbor\'s balcony" parent="." instance=ExtResource( 23 )]
visible = false visible = false
script = ExtResource( 4 ) script = ExtResource( 4 )
......
...@@ -23,6 +23,7 @@ func objInteraction(selected): # when an object is used on it ...@@ -23,6 +23,7 @@ func objInteraction(selected): # when an object is used on it
else: else:
dialogueBox.text = "No flavor text found" #can replace this later! dialogueBox.text = "No flavor text found" #can replace this later!
inventory.unselect_all() #unselect item inventory.unselect_all() #unselect item
dialogueBox.playText()
func canEatGranola(): func canEatGranola():
canEat = true canEat = true
...@@ -14,6 +14,7 @@ func objInteraction(selected): # when an object is used on it ...@@ -14,6 +14,7 @@ func objInteraction(selected): # when an object is used on it
else: else:
dialogueBox.text = "No flavor text found" #can replace this later! dialogueBox.text = "No flavor text found" #can replace this later!
inventory.unselect_all() inventory.unselect_all()
dialogueBox.playText()
if inventory.get_item_text(selected)=="Stool": if inventory.get_item_text(selected)=="Stool":
inventory.remove_item(selected) inventory.remove_item(selected)
emit_signal("groceries_put_away") emit_signal("groceries_put_away")
......
...@@ -26,3 +26,4 @@ func objInteraction(selected): # when an object is used on it ...@@ -26,3 +26,4 @@ func objInteraction(selected): # when an object is used on it
get_parent().get_node("Dialogue arrow").setScene("Intro") get_parent().get_node("Dialogue arrow").setScene("Intro")
get_parent().get_node("Dialogue arrow").show() get_parent().get_node("Dialogue arrow").show()
inventory.unselect_all() #unselect item inventory.unselect_all() #unselect item
dialogueBox.playText()
...@@ -14,13 +14,5 @@ func passEvent(handler): ...@@ -14,13 +14,5 @@ func passEvent(handler):
connect("retrieved", handler,"_laundry_basket") connect("retrieved", handler,"_laundry_basket")
pass pass
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!
inventory.unselect_all() #unselect item
func finished(): func finished():
interactable = false interactable = false
...@@ -18,6 +18,7 @@ func mouseInteraction(): ...@@ -18,6 +18,7 @@ func mouseInteraction():
start = false start = false
elif eventHandler.get_clothes() != 4 and eventHandler.getGroceries(): elif eventHandler.get_clothes() != 4 and eventHandler.getGroceries():
dialogueBox.text = "I still need to get all my clothes!" dialogueBox.text = "I still need to get all my clothes!"
dialogueBox.playText()
else: else:
.mouseInteraction() .mouseInteraction()
...@@ -38,9 +39,12 @@ func objInteraction(selected): # when an object is used on it ...@@ -38,9 +39,12 @@ func objInteraction(selected): # when an object is used on it
dialogueBox.text = "There's something in the way." dialogueBox.text = "There's something in the way."
else: # if its bc they already saw the cutscene else: # if its bc they already saw the cutscene
dialogueBox.text = flavor dialogueBox.text = flavor
dialogueBox.playText()
elif typeof(flavor) != 0: #checks if there's coded flavor text for this interaction elif typeof(flavor) != 0: #checks if there's coded flavor text for this interaction
dialogueBox.text = flavor dialogueBox.text = flavor
else: else:
dialogueBox.text = "No flavor text found" #can replace this later! dialogueBox.text = "No flavor text found" #can replace this later!
dialogueBox.playText()
inventory.unselect_all() #unselect item inventory.unselect_all() #unselect item
...@@ -31,6 +31,7 @@ func objInteraction(selected): ...@@ -31,6 +31,7 @@ func objInteraction(selected):
else: else:
dialogueBox.text = "No flavor text found" #can replace this later! dialogueBox.text = "No flavor text found" #can replace this later!
inventory.unselect_all() #unselect item inventory.unselect_all() #unselect item
dialogueBox.playText()
func mouseInteraction(): func mouseInteraction():
.mouseInteraction() .mouseInteraction()
......
...@@ -40,6 +40,7 @@ func objInteraction(selected): ...@@ -40,6 +40,7 @@ func objInteraction(selected):
else: else:
dialogueBox.text = "No flavor text found" #can replace this later! dialogueBox.text = "No flavor text found" #can replace this later!
inventory.unselect_all() #unselect item inventory.unselect_all() #unselect item
dialogueBox.playText()
func gotNote(): # once lab note has been retrieved func gotNote(): # once lab note has been retrieved
#print("Got lab note") #print("Got lab note")
......
...@@ -33,6 +33,7 @@ func objInteraction(selected): # when an object is used on it ...@@ -33,6 +33,7 @@ func objInteraction(selected): # when an object is used on it
else: else:
dialogueBox.text = "No flavor text found" #can replace this later! dialogueBox.text = "No flavor text found" #can replace this later!
inventory.unselect_all() #unselect item inventory.unselect_all() #unselect item
dialogueBox.playText()
func outerLock(): func outerLock():
unlocked = true unlocked = true
...@@ -30,8 +30,7 @@ func objInteraction(selected): ...@@ -30,8 +30,7 @@ func objInteraction(selected):
dialogueBox.text = "No flavor text found" #can replace this later! dialogueBox.text = "No flavor text found" #can replace this later!
if inventory.get_item_text(selected) == "Screwdriver": # unjamming the cabinet with the screwdriver if inventory.get_item_text(selected) == "Screwdriver": # unjamming the cabinet with the screwdriver
dialogueBox.text = "Food, you are now free from your prison. You're welcome." dialogueBox.text = "Food, you are now free from your prison. You're welcome."
unlocked = true unlocked = true
inventory.remove_item(selected) inventory.remove_item(selected)
inventory.unselect_all() #unselect item inventory.unselect_all() #unselect item
dialogueBox.playText()
...@@ -16,6 +16,7 @@ func mouseInteraction(): ...@@ -16,6 +16,7 @@ func mouseInteraction():
#print("Starting scene") #print("Starting scene")
else: else:
dialogueBox.text = "Brodie: Thank you for this I love her" dialogueBox.text = "Brodie: Thank you for this I love her"
dialogueBox.playText()
inventory.add_item("Nana", load("res://.import/nana.png-3afacff9a6dfeb0ea38c0e651d0707be.stex")) inventory.add_item("Nana", load("res://.import/nana.png-3afacff9a6dfeb0ea38c0e651d0707be.stex"))
hasNana = false hasNana = false
move() move()
...@@ -39,6 +40,7 @@ func objInteraction(selected): # when an object is used on it ...@@ -39,6 +40,7 @@ func objInteraction(selected): # when an object is used on it
else: else:
dialogueBox.text = "No flavor text found" #can replace this later! dialogueBox.text = "No flavor text found" #can replace this later!
inventory.unselect_all() #unselect item inventory.unselect_all() #unselect item
dialogueBox.playText()
func doesHaveNana(): func doesHaveNana():
return hasNana return hasNana
......
...@@ -17,4 +17,5 @@ func objInteraction(selected): # when an object is used on it ...@@ -17,4 +17,5 @@ func objInteraction(selected): # when an object is used on it
else: else:
dialogueBox.text = "No flavor text found" #can replace this later! dialogueBox.text = "No flavor text found" #can replace this later!
inventory.unselect_all() #unselect item inventory.unselect_all() #unselect item
dialogueBox.playText()
...@@ -21,3 +21,4 @@ func objInteraction(selected): # when an object is used on it ...@@ -21,3 +21,4 @@ func objInteraction(selected): # when an object is used on it
else: else:
dialogueBox.text = "No flavor text found" #can replace this later! dialogueBox.text = "No flavor text found" #can replace this later!
inventory.unselect_all() #unselect item inventory.unselect_all() #unselect item
dialogueBox.playText()
...@@ -22,6 +22,7 @@ func objInteraction(selected): # when an object is used on it ...@@ -22,6 +22,7 @@ func objInteraction(selected): # when an object is used on it
if inventory.get_item_text(selected) == "To do list": if inventory.get_item_text(selected) == "To do list":
if quests.hasQuest("Feed Banana"): # Need to feed banana first if quests.hasQuest("Feed Banana"): # Need to feed banana first
dialogueBox.text = "Plants later. Banana first. I don't even wanna know how long she's been trapped out here, poor thing..." dialogueBox.text = "Plants later. Banana first. I don't even wanna know how long she's been trapped out here, poor thing..."
dialogueBox.playText()
else: else:
if inventory.hasItem("Pot") != -1 and inventory.hasItem("Shovel") != -1 and inventory.hasItem("Tabo with water") != -1: if inventory.hasItem("Pot") != -1 and inventory.hasItem("Shovel") != -1 and inventory.hasItem("Tabo with water") != -1:
# banana is fed and have all needed equipment # banana is fed and have all needed equipment
...@@ -29,8 +30,11 @@ func objInteraction(selected): # when an object is used on it ...@@ -29,8 +30,11 @@ func objInteraction(selected): # when an object is used on it
else: else:
# dont have all equipment yet # dont have all equipment yet
dialogueBox.text = "I don't think I have all my equipment for this yet." dialogueBox.text = "I don't think I have all my equipment for this yet."
dialogueBox.playText()
elif typeof(flavor) != 0: #checks if there's coded flavor text for this interaction elif typeof(flavor) != 0: #checks if there's coded flavor text for this interaction
dialogueBox.text = flavor dialogueBox.text = flavor
dialogueBox.playText()
else: else:
dialogueBox.text = "No flavor text found" #can replace this later! dialogueBox.text = "No flavor text found" #can replace this later!
dialogueBox.playText()
inventory.unselect_all() #unselect item inventory.unselect_all() #unselect item
...@@ -36,3 +36,4 @@ func objInteraction(selected): ...@@ -36,3 +36,4 @@ func objInteraction(selected):
else: else:
dialogueBox.text = "No flavor text found" #can replace this later! dialogueBox.text = "No flavor text found" #can replace this later!
inventory.unselect_all() #unselect item inventory.unselect_all() #unselect item
dialogueBox.playText()
...@@ -37,3 +37,4 @@ func objInteraction(selected): # when an object is used on it ...@@ -37,3 +37,4 @@ func objInteraction(selected): # when an object is used on it
else: else:
dialogueBox.text = "No flavor text found" #can replace this later! dialogueBox.text = "No flavor text found" #can replace this later!
inventory.unselect_all() #unselect item inventory.unselect_all() #unselect item
dialogueBox.playText()
...@@ -31,4 +31,5 @@ func objInteraction(selected): # when an object is used on it ...@@ -31,4 +31,5 @@ func objInteraction(selected): # when an object is used on it
inventory.remove_item(selected) inventory.remove_item(selected)
else: # if they try to use the plunger on a clean toilet else: # if they try to use the plunger on a clean toilet
dialogueBox.text = "I can't make it any LESS unclogged.." dialogueBox.text = "I can't make it any LESS unclogged.."
dialogueBox.playText()
inventory.unselect_all() #unselect item inventory.unselect_all() #unselect item
...@@ -21,4 +21,5 @@ func objInteraction(selected): ...@@ -21,4 +21,5 @@ func objInteraction(selected):
else: else:
dialogueBox.text = "No flavor text found" #can replace this later! dialogueBox.text = "No flavor text found" #can replace this later!
inventory.unselect_all() #unselect item inventory.unselect_all() #unselect item
dialogueBox.playText()
...@@ -24,6 +24,7 @@ func objInteraction(selected): # when an object is used on it ...@@ -24,6 +24,7 @@ func objInteraction(selected): # when an object is used on it
else: else:
dialogueBox.text = "No flavor text found" #can replace this later! dialogueBox.text = "No flavor text found" #can replace this later!
inventory.unselect_all() #unselect item inventory.unselect_all() #unselect item
dialogueBox.playText()
func canYoga(): func canYoga():
yoga = true yoga = true
...@@ -30,7 +30,7 @@ __meta__ = { ...@@ -30,7 +30,7 @@ __meta__ = {
} }
[node name="Laptop" type="StaticBody2D" parent="."] [node name="Laptop" type="StaticBody2D" parent="."]
position = Vector2( 561.114, 281.36 ) position = Vector2( 540.478, 303.584 )
scale = Vector2( 0.3, 0.3 ) scale = Vector2( 0.3, 0.3 )
input_pickable = true input_pickable = true
script = ExtResource( 3 ) script = ExtResource( 3 )
...@@ -40,14 +40,19 @@ __meta__ = { ...@@ -40,14 +40,19 @@ __meta__ = {
interactable = true interactable = true
flavorText = "I... don't get it... I probably should've studied first huh? Where are my notes?" flavorText = "I... don't get it... I probably should've studied first huh? Where are my notes?"
[node name="Hitbox" type="CollisionShape2D" parent="Laptop"] [node name="h" type="CollisionShape2D" parent="Laptop"]
visible = false
position = Vector2( -16.8367, -2.11676 ) position = Vector2( -16.8367, -2.11676 )
scale = Vector2( 5, 5 ) scale = Vector2( 5, 5 )
shape = SubResource( 1 ) shape = SubResource( 1 )
disabled = true
[node name="Hitbox" type="CollisionPolygon2D" parent="Laptop"]
position = Vector2( -19.703, 1.11139 )
scale = Vector2( 1.5, 1.5 )
polygon = PoolVector2Array( 130, -452.4, 130, -444, 134.8, 5.89999, 159, -6.20001, 159, 23.2, 175.4, 28, 195.4, 28, 500, 50.4, 500, 139.2, 272.7, 331, 270.1, 331, 100, 445, 94.9, 445, -89, 440.8, -89, 438.8, -463, 390.8, -463, 382.9, -500, 283.9, -500, -197.9, -497.3, -233, -491.8, -233, -453.8, -281, -448.7, -281, 93, -465.5, 102.6, -470.6 )
[node name="Sprite" type="Sprite" parent="Laptop/Hitbox"] [node name="Sprite" type="Sprite" parent="Laptop/Hitbox"]
position = Vector2( -0.573227, 0.64563 )
scale = Vector2( 0.15, 0.15 )
texture = ExtResource( 2 ) texture = ExtResource( 2 )
[node name="Return" type="StaticBody2D" parent="."] [node name="Return" type="StaticBody2D" parent="."]
......
...@@ -16,7 +16,8 @@ config/icon="res://assets/189066690_228150108704696_3850052974465333899_n.png" ...@@ -16,7 +16,8 @@ config/icon="res://assets/189066690_228150108704696_3850052974465333899_n.png"
[display] [display]
window/size/resizable=false window/stretch/mode="2d"
window/stretch/aspect="keep"
[physics] [physics]
......
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