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

2.0 Add condition to choice #960

Merged

Conversation

Jowan-Spooner
Copy link
Collaborator

Should fix #958
Adds a condition input to the choice event. UI is very bad but functionality is there. You can also choose, what to do if the condition isn't met (Default/Hide/Disable). Default is currently just the same as Hide, but I want to add a setting for this later.

In the text format you can write the conditions like this:

Emilio: Wow, some options are disabled!
- This is disabled [if false] [else disable]
- This might be disabled [if some_cool_condition] [else disabeld]
- This will be hidden [if false] [else hide]
- This is always visible

Other

  • moved the condition execution into a function of the dialogic_game_handler, because now multiple events (and the game_handler itself) use it.

Adds a condition input to the choice event. UI is very bad but functionality is there. You can also choose, what to do if the condition isn't met (Default/Hide/Disable). Default is currently just the same as Hide, but I want to add a setting for this later.

In the text format you can write the conditions like this:
```
Emilio: Wow, some options are disabled!
- This is disabled [if false] [else disable]
- This might be disabled [if some_cool_condition] [else disabeld]
- This will be hidden [if false] [else hide]
- This is always visible
```

# Other
- moved the condition execution into a function of the dialogic_game_handler, because now multiple events (and the game_handler itself) use it.
@Jowan-Spooner Jowan-Spooner changed the title Add condition to choice 2.0 Add condition to choice Jun 28, 2022
@coppolaemilio coppolaemilio merged commit 78db1a4 into dialogic-godot:version-2.0 Jun 28, 2022
@Jowan-Spooner Jowan-Spooner deleted the choice_condition branch December 26, 2023 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants