You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorry if this is something that's mentioned elsewhere but I couldn't find any issues.
Is there currently a way of manually spawning a new entity based off an entity type in LDtk? To give an example, I have a game where entities spawn based on a specific event from specific spots on the map (the spawn points are themselves entities). What I'd like to do is use the "entity" objects in LDtk as a template to spawn a new entity. That way I can use the spritesheet as loaded in LDtk. Is this possible?
The text was updated successfully, but these errors were encountered:
+1 here, also interested. Or would be curious to hear if this is the wrong approach entirely and what would be a better way! I suppose the reasoning for why this isn't possible/apparent are generally covered by #258
Yeah, that's a fair point! Maybe it's easier to have my own custom bundles and logic for doing that in game instead
Since my comment I did actually manage to make this "work". I'll PR some example code someday but basically I have my bundles for each entity that I treat as templates, spawn them in at startup and then turn their visibility to hidden. Then when I want to spawn them in code, I query for a unique component marker that I've inserted into the template entities, and clone each of the components that I want to the new entity.
Sorry if this is something that's mentioned elsewhere but I couldn't find any issues.
Is there currently a way of manually spawning a new entity based off an entity type in LDtk? To give an example, I have a game where entities spawn based on a specific event from specific spots on the map (the spawn points are themselves entities). What I'd like to do is use the "entity" objects in LDtk as a template to spawn a new entity. That way I can use the spritesheet as loaded in LDtk. Is this possible?
The text was updated successfully, but these errors were encountered: