Whats the difference between ' and ". Im still confuse since some uses ' and some uses "
They can be used interchangeably, so no difference
for(int i = 4, i < size, i += 2) {
}
What is alternative of this in gdscript. I know basic of for loop it is something like this
for i in range(size):
pass
here it will start from 0 and run till size - 1 but i want to start for i > 0 and increment 2 each time. How to do that
The range() function accepts three arguments: start, stop and step.
Example that counts 4, 8, 10:
func _ready(): for i in range(4, 10, 2): print(i)
Open example in GDScript Playground