Possibilities for extending the Character class - trying to achieve dynamic names #2674
Unanswered
problematik
asked this question in
Q&A
Replies: 1 comment
-
|
Instead, I would recommend having a Dialogic Variable Group (they are dictionaries) for all revealed names. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
what i'm trying to achieve is the following: have a bool variable called
strangerper character, if that variable is true, the name of the character is to beStrangerand as soon as it is set to false, it should be the actual character name - displayName.I know i can do this by having a static method called
get_modified_character_namein a global class SomeHelpers and then inside each characterDisplayNamedo{SomeHelpers.get_modified_character_name("actual_name_of_character")}and implement logic there. But this seems redundant as i want to apply this kind of logic to everyone. So i tried looking intodchfiles - i saw that we have a property called@path->"@path": "res://addons/dialogic/Resources/character.gd",i tried changing that to to a custom class that extendsResources/character.gd, but it wont work.I'm trying to understand if this is possible to do and if Extensions are a right fit, but i don't really understand how to achieve this with them.
Any help would be much appreciated.
Beta Was this translation helpful? Give feedback.
All reactions