zetsubou Posted December 4, 2018 Share Posted December 4, 2018 Hi! I've spent a lot of time thinking of game entities. So, the mostly recommended option is object layers from tilemap. Here comes the question: am I possible to make an object, that consists 4 tiles and its treated as one? At the moment, I just create object, that take's 1 tile out of 4 necessary ones. In the end i got an object, that 4 times smaller than it is supposed to be. Any ideas, advices? Saw a couple of videos about object layers, still did not find anything useful for me. Please help! UPD: also enemies are not supposed to be static(they will be moving from one side to another) Link to comment Share on other sites More sharing options...
Telinc1 Posted December 4, 2018 Share Posted December 4, 2018 Object layers simply hold geometric data which Phaser rarely uses directly. It's up to you how you treat that data - if you loop through the object layer, you can choose how to interpret each shape and whether you want to use its size at all. Unless you're setting a Sprite's size to the size of the tilemap object, it doesn't really matter how big it is. Anyhow, you can definitely resize objects in Tiled. Click on the object and you should get control points around it which you can use to resize it. Alternatively, you can directly enter a size in the object's properties. To answer your other question, moving the enemies wouldn't be a problem at all. Use the object data from the tilemap to add them as Sprites and you will be able to move them like any other Sprite. samme and zetsubou 2 Link to comment Share on other sites More sharing options...
Recommended Posts