0 votes

Hey, i creating a platformer 2D game that i use TileMap for level design but some of tiles that i have must have special scripts like when user collide with them they must be destroyed or append something to a variable is this possible to do with TileMap? if it's not possible, anyone have suggestion? i know i can create another scene and customize it fully then use that hundred times but i don't think its easy to design and good in performance

EDIT: i find a addon => https://godotengine.org/asset-library/asset/180

Godot version 3.2.2
in Engine by (16 points)
edited by

2 Answers

0 votes

Tilemap is still good way to do this, but it will require much more code. You will have to menage big Dictionary with all of your tiles as keys, and their variant metadata as values.
There will also have to be some code to detect on which tile are your actors - getting global position every frame, translating it to worldtomap and using setget to notificate when new tile has been approached. This will give you a lot of freedom and elasticity on whatever You want each tile to do.

by (5,659 points)

Thanks for your time but i don't think that what i was searching for
i found a addon that may be useful: https://godotengine.org/asset-library/asset/180

Ok , but You realize this addon utilizes real scenes, not tiles ?

It is great approach for platformer like this, but when You want to do some kind of tile-based puzzle, tactical rpg or city-builder, You would be better using Tilemap instead of hundreds of objects

Yes i know that it's just convert tile map to the scene objects but it makes the work much easier =)

0 votes

Step:1downlod a 3d gound image from google
Step:2create a tile map node
Step:3set tile map
Step:4use downloaded image as tile

by (14 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.