police_dungeon_cutscene.gd 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. extends Node3D
  2. @onready var dialog = $dialog
  3. # Called when the node enters the scene tree for the first time.
  4. func _ready():
  5. if not get_tree().root.has_node("Main Menu"):
  6. Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
  7. dialog.show()
  8. GameManager.movement(false)
  9. dialog.set_text("")
  10. await $eye_opening/AnimationPlayer.animation_finished
  11. await get_tree().create_timer(0.5).timeout
  12. dialog.set_text("i know who you are.... and i want you to tell me one thing.... did you kill those people...?")
  13. $"voice line 1".play()
  14. await $"voice line 1".finished
  15. dialog.clear_options()
  16. dialog.add_option("i was just performing for the show", option1)
  17. dialog.add_option("can i get a lawyer", option2)
  18. dialog.add_option("...", option3)
  19. dialog.show_options()
  20. else:
  21. $eye_opening.queue_free()
  22. func option1():
  23. $"voice line 2".play()
  24. dialog.set_text("i don't believe you...")
  25. await $"voice line 2".finished
  26. GameManager.goto_scene("res://Scenes/hood_lie_detector.tscn", true)
  27. func option2():
  28. $"idk can you".play()
  29. dialog.set_text("i dont know, can you?")
  30. await $"idk can you".finished
  31. GameManager.goto_scene("res://Scenes/courthouse_cutscene.tscn", false)
  32. func option3():
  33. $"voice line 3".play()
  34. dialog.set_text("good...")
  35. await $"voice line 3".finished
  36. GameManager.goto_scene("res://Scenes/jail.tscn", false)
  37. # Called every frame. 'delta' is the elapsed time since the previous frame.
  38. func _process(_delta):
  39. Input.mouse_mode = Input.MOUSE_MODE_VISIBLE