0 votes

For example, I have a variable damage exported from the editor, which is an array where the first number is the minimum damage, and the second is the maximum damage. I need to name the first and second element respectively and limit the array to at most two values.

this code allows you to import an array of numbers from the editor, but I also need to name the elements and limit their number.

export (PoolIntArray) damage := [1, 2]
Godot version 3.2.3.stable.official
in Engine by (159 points)
edited by

1 Answer

+1 vote
Best answer

You can't name indexes of an array, and you can't set their size either. Maybe you should just have two separate variables.

by (8,528 points)
selected by
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 Frequently asked questions and 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 [email protected] with your username.