Jump to content

Recommended Posts

Posted

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.

Posted

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.

Posted

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..

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...