Godot version:
v3.1.stable.official
Issue description:
Visual Script no range how to remove null or one number :(
GDScript:
for x in range(1, 5):
Steps to reproduce:
As a workaround until it is fixed:
range(5)
is equivalent to int(5)
when used as an iterator.range(1, 5)
is equivalent to Vector2(1, 5)
when used as an iterator.range(1, 5, 2)
is equivalent to Vector3(1, 5, 2)
when used as an iterator.@bojidar-bg thanks
@bojidar-bg these equivalents doesn't seem to be documented anywhere, and are actually quite useful!
Here is my solution: If you havn't put anything into the condition, it will show a small text that says something like "connect an Array, int or a Vector2", so people who don't know of this behavior have a chance of learning it.
@Jummit I think it would be more useful to either have another node for looping over a range, or a mode which would allow editing the range in-place if no value is connected.
Feature and improvement proposals for the Godot Engine are now being discussed and reviewed in a dedicated Godot Improvement Proposals (GIP) (godotengine/godot-proposals) issue tracker. The GIP tracker has a detailed issue template designed so that proposals include all the relevant information to start a productive discussion and help the community assess the validity of the proposal for the engine.
The main (godotengine/godot) tracker is now solely dedicated to bug reports and Pull Requests, enabling contributors to have a better focus on bug fixing work. Therefore, we are now closing all older feature proposals on the main issue tracker.
If you are interested in this feature proposal, please open a new proposal on the GIP tracker following the given issue template (after checking that it doesn't exist already). Be sure to reference this closed issue if it includes any relevant discussion (which you are also encouraged to summarize in the new proposal). Thanks in advance!
Most helpful comment
@bojidar-bg these equivalents doesn't seem to be documented anywhere, and are actually quite useful!