Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Boolean to check if a timeline is active #2422

Open
polgar1 opened this issue Oct 2, 2024 · 2 comments
Open

Boolean to check if a timeline is active #2422

polgar1 opened this issue Oct 2, 2024 · 2 comments
Labels

Comments

@polgar1
Copy link

polgar1 commented Oct 2, 2024

Is your feature request related to a problem? Please describe.
For a lot of games I have to know if there's an active dialog, so I can disable other interactions and character movement, a boolean that checks if there's an active timeline would be really useful.

Describe the solution you'd like
A bool in the DialogicGameHandler.gd file that we set to true in the start_timeline() function, then set it to false in end_timeline().

Describe alternatives you've considered
First I added this variable to my own Global script, then gave it a new value at the beginning and end of every Dialogic timeline using Dialogic's function calls, which was something I had to do in every timeline, so I gave up and modified the DialogicGameHandler script.

@CakeVR
Copy link
Collaborator

CakeVR commented Oct 2, 2024

Hello, thank you for opening an issue.

You can already check for timelines by checking the following member against null: https://docs.dialogic.pro/classes/class_dialogicgamehandler.html#property-current_timeline

@CakeVR CakeVR added the Proposal label Oct 2, 2024
@Pheubel
Copy link
Contributor

Pheubel commented Nov 4, 2024

Having a separate variable is a bit overkill, since, like cake said, you can already check the current timeline to see if there is a timeline being played.

Although, there might be merit to adding a convenience method like this to the game handler:

func is_playing_timeline() ->bool:
	return current_timeline != null

It would make it easier to understand if the game handler is currently playing a timeline, but you could argue that it isn't needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants
@Pheubel @CakeVR @polgar1 and others