0 votes

Hello.

I'm doing a rhythm game, and I want to implement an event-driven storyboard system using scripts that track creators can do.

But, I want these script to access only node in the background (because I want to let the user set the darkness of the background).

Is there a way to do it ? Or need I do use another script system (Lua, etc) ?
Thanks !

in Engine by (31 points)
edited by

1 Answer

0 votes

I don't quite understand what you want to do, but it sounds like you could use a Group and call_group() to access only the nodes you want.

by (542 points)

I want to allow user to create script within the game, and avoiding it to modify the game's node : https://en.wikipedia.org/wiki/Sandbox_(software_development) :

"A sandbox is a testing environment that isolates untested code changes and outright experimentation from the production environment or repository"

"By further analogy, the term "sandbox" can also be applied in computing and networking to other temporary or indefinite isolation areas, such as security sandboxes [...] that prevent incoming data from affecting a "live" system"

What I want is to isolate a script, created by the user, and giving in only what I want. So, removing the get_tree() and other functions like this.

Ah, I see. Sorry I didn't understand and I don't know the answer either. I've seen a couple other people talk about something like that though. Depending on how much you know already you might be better off with a general google search, or looking up how other languages do sandboxing, or maybe asking Juan directly, if you're just not sure about GDScript.

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.