Commit 87797110 authored by Julia Santos's avatar Julia Santos

Fully incorporated 2nd cutscene

parent 1fa69883
extends StaticBody2D
onready var sceneProgress = 0
onready var sceneProgress = 1
onready var dialogueBox = get_parent().get_node("Dialogue")
export(bool) var tracking = false
onready var anim = get_parent().get_node("Animator")
......@@ -49,4 +49,5 @@ func getShot():
func start():
tracking = true
anim.play("Shot 1")
......@@ -842,10 +842,10 @@ tracks/3/loop_wrap = true
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/keys = {
"times": PoolRealArray( 0.2, 0.9 ),
"transitions": PoolRealArray( 1, 1 ),
"times": PoolRealArray( 0, 0.2, 0.9 ),
"transitions": PoolRealArray( 1, 1, 1 ),
"update": 0,
"values": [ 0.0, 1.0 ]
"values": [ 0.0, 0.0, 1.0 ]
}
tracks/4/type = "value"
tracks/4/path = NodePath("7/dia 1/RichTextLabel:visible")
......@@ -992,7 +992,6 @@ __meta__ = {
[node name="Scene control" type="StaticBody2D" parent="."]
script = ExtResource( 1 )
tracking = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="Scene control"]
position = Vector2( 511.03, 299.848 )
......@@ -1032,10 +1031,12 @@ speed_scale = 0.7
playing = true
[node name="2" type="Sprite" parent="."]
visible = false
position = Vector2( 511.896, 299.9 )
texture = ExtResource( 4 )
[node name="3" type="Sprite" parent="."]
visible = false
position = Vector2( 511.896, 299.9 )
texture = ExtResource( 3 )
......@@ -1045,7 +1046,7 @@ margin_top = 204.427
margin_right = 467.748
margin_bottom = 258.427
custom_fonts/normal_font = SubResource( 13 )
visible_characters = 4
visible_characters = 0
percent_visible = 0.41056
text = "Huh....work?"
scroll_active = false
......@@ -1113,6 +1114,7 @@ speed_scale = 0.7
playing = true
[node name="6" type="Sprite" parent="."]
visible = false
position = Vector2( 511.896, 299.9 )
texture = ExtResource( 6 )
......@@ -1186,6 +1188,7 @@ position = Vector2( 511.896, 299.9 )
texture = ExtResource( 8 )
[node name="dia 1" type="Panel" parent="7"]
modulate = Color( 1, 1, 1, 0 )
margin_left = -305.152
margin_top = -142.382
margin_right = 147.848
......@@ -1209,6 +1212,7 @@ __meta__ = {
}
[node name="Arrow" type="AnimatedSprite" parent="7/dia 1"]
visible = false
position = Vector2( 415.246, 39.4551 )
scale = Vector2( 0.45, 0.45 )
frames = SubResource( 12 )
......
extends StaticBody2D
onready var sceneProgress = 0
onready var sceneProgress = 1
onready var anim = get_parent().get_node("Animator")
export(bool) var tracking = false
......@@ -39,4 +39,4 @@ func getShot():
func start():
tracking = true
anim.play("Shot 1")
......@@ -436,10 +436,10 @@ tracks/12/loop_wrap = true
tracks/12/imported = false
tracks/12/enabled = true
tracks/12/keys = {
"times": PoolRealArray( 0.1, 0.7 ),
"transitions": PoolRealArray( 1, 1 ),
"times": PoolRealArray( 0, 0.1, 0.7 ),
"transitions": PoolRealArray( 1, 1, 1 ),
"update": 0,
"values": [ 0.0, 1.0 ]
"values": [ 0.0, 0.0, 1.0 ]
}
tracks/13/type = "value"
tracks/13/path = NodePath("Scene control:tracking")
......@@ -871,7 +871,6 @@ position = Vector2( 511.116, 300.236 )
texture = ExtResource( 6 )
[node name="dia 2" type="Panel" parent="2"]
visible = false
modulate = Color( 1, 1, 1, 0 )
margin_left = 159.0
margin_top = 13.0
......@@ -905,7 +904,6 @@ speed_scale = 0.7
playing = true
[node name="dia 1" type="Panel" parent="2"]
modulate = Color( 1, 1, 1, 0 )
margin_left = -490.158
margin_top = -203.776
margin_right = -111.158
......@@ -934,8 +932,6 @@ custom_fonts/bold_font = SubResource( 13 )
custom_fonts/normal_font = SubResource( 14 )
bbcode_enabled = true
bbcode_text = "Oh gosh, [b]how do I start this?[/b] This is..."
visible_characters = 0
percent_visible = 0.0
text = "Oh gosh, how do I start this? This is..."
__meta__ = {
"_edit_use_anchors_": false
......@@ -987,11 +983,11 @@ speed_scale = 0.7
playing = true
[node name="5" type="Sprite" parent="."]
visible = false
position = Vector2( 511.116, 300.236 )
texture = ExtResource( 7 )
[node name="dia 1" type="Panel" parent="5"]
modulate = Color( 1, 1, 1, 0 )
margin_left = 114.839
margin_top = -163.146
margin_right = 476.839
......@@ -1011,6 +1007,8 @@ custom_fonts/bold_font = SubResource( 17 )
custom_fonts/normal_font = SubResource( 12 )
bbcode_enabled = true
bbcode_text = "Remember what your therapist said about [b]being overwhelmed[/b]..."
visible_characters = 0
percent_visible = 0.0
text = "Remember what your therapist said about being overwhelmed..."
scroll_active = false
__meta__ = {
......@@ -1018,6 +1016,7 @@ __meta__ = {
}
[node name="Arrow" type="AnimatedSprite" parent="5/dia 1"]
visible = false
position = Vector2( 281.004, 61.5689 )
scale = Vector2( 0.35, 0.430991 )
frames = SubResource( 7 )
......
extends StaticBody2D
onready var sceneProgress = 0
onready var sceneProgress = 1
onready var anim = get_parent().get_node("Animator")
onready var dialogueBox = get_parent().get_node("Dialogue")
export(bool) var tracking = false
onready var sceneDecimal = 0
# Called when the node enters the scene tree for the first time.
func _ready():
......@@ -11,26 +13,41 @@ func _input(event): # executes when clicked on
if event is InputEventMouseButton:
if event.button_index == BUTTON_LEFT and event.pressed:
if tracking:
dialogueBox.text = getDialogue()
getShot()
func getDialogue():
match sceneProgress:
0:
sceneProgress += 1
return "Dialogue 2"
1:
sceneProgress += 1
return "Dialogue 3"
2:
sceneProgress += 1
return "Dialogue 4"
3:
func getShot():
var shotName = ""
if sceneDecimal != 0:
shotName = "Shot " + str(sceneProgress + 1) + "." + str(sceneDecimal)
else:
shotName = "Shot " + str(sceneProgress + 1)
print(shotName)
if sceneProgress <= 17:
anim.play(shotName)
match (sceneProgress + 1):
7, 8, 9, 10, 12:
if sceneDecimal == 0:
sceneDecimal += 1
print("Adding decimal for 6, 7, etc")
else:
sceneDecimal = 0
sceneProgress += 1
6, 13, 16:
if sceneDecimal == 2:
sceneDecimal = 0
sceneProgress += 1
else:
sceneDecimal += 1
18:
sceneProgress = 0
get_parent().queue_free() # dont need that scene anymore
tracking = false
print("Deleting scene 2")
return ""
print("Deleting scene 1")
_:
sceneProgress += 1
sceneDecimal = 0
func start():
tracking = true
anim.play("Shot 1")
This diff is collapsed.
......@@ -80,21 +80,11 @@ func _groceries_put_away(): # when the groceries are put away
func _eaten(): # completing first "Eat" quest
quests.finishQuest("Eat")
_start_cutscene_2()
func _start_lab(): # trying the lab the first time, adds the new quests
if !quests.hasQuest("Eat") and !quests.hasQuest("Do laundry"):
_start_cutscene_2b()
quests.add("Clean bathroom")
quests.add("Figure out what's making that noise & get rid of it")
quests.add("Feed Banana")
quests.add("Repot plants")
quests.add("Do Lab")
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??"
func _start_lab(): # trying the lab the first time, adds the new quests -> no longer in effect, moved to Cutscene 2
#if !quests.hasQuest("Eat") and !quests.hasQuest("Do laundry"):
#_start_cutscene_2b()
pass
func _finish_lab():
if quests.size() == 1 and quests.get_quest(0) == "Do Lab":
......@@ -102,6 +92,7 @@ func _finish_lab():
else:
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
quests.add(questName)
......@@ -170,6 +161,17 @@ func _start_cutscene_2():
inventory.unselect_all()
cutsceneHandler.get_node("2").show()
cutsceneHandler.get_node("2/Scene control").start()
# adding quests and shifting to next phase
quests.add("Clean bathroom")
quests.add("Figure out what's making that noise & get rid of it")
quests.add("Feed Banana")
quests.add("Repot plants")
quests.add("Do Lab")
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??"
func _start_cutscene_2b():
inventory.unselect_all()
......@@ -214,7 +216,7 @@ func _laundry_finished(): # finishing notebook puzzle for laundry
quests.finishQuest("Do laundry")
inventory.remove_item_name("Dirty clothes")
inventory.remove_item_name("Laundry detergent")
_start_cutscene_2()
func _return_laundry_notepad(): # exiting laundry notebook puzzle
zoom_out()
......@@ -225,6 +227,7 @@ func _return_laundry_notepad(): # exiting laundry notebook puzzle
notepad.get_node("Title").text = "To do (click to expand):"
notepad.get_node("Words").hide()
movementHandle.checkRoom()
_start_cutscene_2()
func _enter_notebook_plants(): # trying to engage in the notebook puzzle for doing laundry
if !quests.hasQuest("Repot plants"):
......@@ -384,6 +387,7 @@ func _return_fridge(): # returning from fridge view
kitchen.show()
zoom_out()
notepad.show()
_start_cutscene_2()
func _open_cabinet(): # looking inside kitchen cabinet
zoom_in()
......
......@@ -598,7 +598,6 @@ __meta__ = {
z_index = 2
[node name="0" parent="Cutscenes" instance=ExtResource( 42 )]
visible = false
[node name="1" parent="Cutscenes" instance=ExtResource( 15 )]
visible = false
......
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