Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

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