Function from string

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By GibberishDevelopment

Hello everyone, I making right now a dialog system using parsing of json file, and wanted to male it universal. So i wanted to ask if there a way tright something in dictionary and game will read it and complete some form of an action?
For example:
Dictionary:

"Key" : {"text" : "blah blah blah", "function_to_complete": "a += b"}

And code part:

func execute_from_dict(dictionary[key].function_to_complete):
       "And at that moment i need help, how on earth can i do action from dictionary that written in form of string?

Of course string written in json file and executable if written in script
So there is on question: HOW???

:bust_in_silhouette: Reply From: exuin

Maybe you can try using Expression?

Ok, I would try this out, anyway thank you for pushing at least in some direction!

GibberishDevelopment | 2020-09-26 17:17