0 votes
var arr = ["Mixed", "Meat", "Vegetable", "Synthetic", "Mineral"]

export (String, arr) var diet = "Vegetable"
export (String, arr) var product = "Meat"

Bellow you see the right way to do it. Above you see the way I want to do it. Is this possible to do? Can I store the array in a variable and then drop the array into the export code?

export (String, "Mixed", "Meat", "Vegetable", "Synthetic", "Mineral") var product = "Meat"
export (String, "Mixed", "Meat", "Vegetable", "Synthetic", "Mineral") var diet = "Meat"
in Engine by (28 points)

1 Answer

0 votes

Is this possible to do?

No. You can find examples of everything that's possible here. Given that GDscript is currently reworked for Godot 4.0, you might want to propose a change though.

by (10,421 points)
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.