Event Go To

This commit is contained in:
2025-05-20 07:28:02 -05:00
parent 7cd96e20d2
commit 6b2fa2b381
7 changed files with 69 additions and 12 deletions

View File

@@ -10,6 +10,8 @@ class_name EventConversation extends "res://scripts/Event/Flow/EventGroup.gd"
@export var turnInteractee:bool = true
@export var turnInteractor:bool = true
var endPauseEvent:EventPause = null
func start() -> void:
# Turn events
if interactee && interactor:
@@ -37,14 +39,20 @@ func start() -> void:
addExtraEvent(startPause, 0)
# Create end pause event.
var endPause = EventPause.new()
endPause.pauseType = endPauseType
endPause.entities = entities
endPauseEvent = EventPause.new()
endPauseEvent.pauseType = endPauseType
endPauseEvent.entities = entities
if pauseInteractee && interactee.entity:
endPause.includeInteractee = pauseInteractee
endPauseEvent.includeInteractee = pauseInteractee
if pauseInteractor && interactor.entity:
endPause.includeInteractor = pauseInteractor
addExtraEvent(endPause, -1)
endPauseEvent.includeInteractor = pauseInteractor
addExtraEvent(endPauseEvent, -1)
# Pass off to event group
super.start()
func end() -> void:
# Manually end pause
if endPauseEvent != null && !endPauseEvent.started:
endPauseEvent.start()
super.end()