#Store tile HP

1 messages · Page 1 of 1 (latest)

shrewd nimbus
#

I'm making a game like terraria where you can create and destroy tiles.
Tiles have HP and when hitting a tile you do X amount of damage to it. To show the damage each tile has 4 damaged states sprites (in the tilemap).

Where should I store the tile max HP and current HP ?

uneven skiff
#

One way would be using a scene collection.. https://youtu.be/U53wf7ybnIs?t=43

Godot 4.0 TileMaps do all sorts of stuff, including this lesser known feature that lets you add scenes directly into your TileMap alongside sprites

0:00 - Intro
0:22 - Standard TileMaps
0:38 - Scene Collections
1:57 - Scene Thumbnails
3:40 - Tradeoffs
5:25 - Grid Snapping
6:30 - Outro

Check out some of my other videos:
https://www.youtube.com/...

▶ Play video