Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Q&A

A topic by Deleted Account created Aug 31, 2021 Views: 257 Replies: 6
Viewing posts 1 to 3
Deleted post

Whats the difference between  ' and  ". Im still confuse since some uses ' and some uses "

They can be used interchangeably, so no difference

Deleted post

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

Deleted post
Submitted

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