So, as the title says I'm trying to create a tileset to use on a tileMap automatically, since the standard method would simply consume too much of my time everytime I needed to provide new tiles (be it the map or enemies).
I'm using Godot for the first day on version 2.1.1 64 bits on Linux
I've tried hacking up a script which ended being similar to this (which I'm now trying to use):
tool extends Node2D
export(bool) var reset = false setget onReset
var root = get_tree().get_edited_scene_root()
var floor_texture = preload("res://assets/tileset/floor1.png")
# Called every time the node is added to the scene.
# Initialization here
reset = false
var w = floor_texture.get_width() / tileSize
var h = floor_texture.get_height() / tileSize
for x in range(w):
for y in range(h):
var tile = Sprite.new()
tile.set_region_rect(Rect2(x*tileSize, y*tileSize, tileSize, tileSize))
To the root node of the tileset scene, but can not figure out how it's not working...
Searching for other methods I stumbled into addons on this list, which pointed me to this solution already done by a senior on the community. I placed the plugin in addons folder in my project structure (as needed by version 2.1.1), activated it, but the option shown in the github image are not appearing in the 2d scene. I'm lost.
Am I missing something? I've read the getting started tutorial about three times now and the GDscript very carefully but I'm somehow still missing something.