0 votes

Hey,

I might sound pretty stupid with this question but I'd like to store GdScript in a string and then be able to run it by using as a reference the node containing the screen.

For exemple let's take a debug node that we use in game, the user could have an in-game interpreter a la Skyrim or Don't Starve to be able to poke some nodes, change some properties(exemple HP of one enemy or, and this is where scripting is fun, of all enemy using for loops) or trigger some events to make testing easier. This way we won't have to hardcode a lot of debug functions to do the stuff and a tester, given the inside knowledge of the game, could be able to be way more efficient in his job.

I might have missed this in the job but I didn't seen any execute or parse commands from GdScript, so I'm asking here.

in Engine by (24 points)

1 Answer

+1 vote
Best answer
by (698 points)
selected by

Thanks! Strangely didn't get it by searching in the Q&A first. Oh well problem solved anyways

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.