Crazycarpet Posted October 2, 2014 Share Posted October 2, 2014 It think it'd be useful to have a callback like App:OnEntityCreated() so players can manually track entities, assign them IDs and what-not. This would be best if it was also called on the map entities well they're being created. Quote Link to comment Share on other sites More sharing options...
Einlander Posted October 3, 2014 Share Posted October 3, 2014 It's already possible. You do it when you load the map. Here is the documentation for the map loading: http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/map/mapload-r510 Here is an example: http://leadwerks.wikidot.com/wiki:entityindexer I havent used it yet since i'm not far enough into my game to need it, but I imagine if you will be loading and spawning objects in game then you will need to add every object that spawns to the list. Quote Link to comment Share on other sites More sharing options...
Crazycarpet Posted October 3, 2014 Author Share Posted October 3, 2014 It's already possible. You do it when you load the map. Here is the documentation for the map loading: http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/map/mapload-r510 Here is an example: http://leadwerks.wikidot.com/wiki:entityindexer I havent used it yet since i'm not far enough into my game to need it, but I imagine if you will be loading and spawning objects in game then you will need to add every object that spawns to the list. Yeah I know but it shouldn't just work just for map entities, I just made a function that does it all before it spawns the entity in, but it would be handy for this to be shipped with Leadwerks for all entities that are spawned, regardless of whether or not they are spawned in or spawned with the map. In my version I just made an event library and it calls the "OnEntityCreated" event everytime an entity is spawned, then you have the entity as an argument... I guess this is not needed because you can write it yourself, I just think it'd be handy; but Josh is probably focusing on much more important things.. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.