Rick Posted December 1, 2009 Share Posted December 1, 2009 I think a GetEntity(name) function would be very helpful. With each model class script kind of being on an island (since they all use their own lua states) a way to get any loaded entity from anywhere could be beneficial. This should be possible if GetEntity(name) is a C function that is exposed to lua from the executable. In the executable every entity is available so it should be that hard to give all scripts access to any entity. The name parameter would be a key setting called "Name". So if I add a model to my scene and set the name property to "Rick" I should be able to access that entity in a different model class lua file by calling: GetEntity("Rick") I know Targets() can be used for this, but setting all sorts of targets for all different kinds of interactions gets cumbersome and error prone. Would be better to just be able to call 1 function to get the entity. I would think this would be an easy feature to add and give a ton of help to us. Quote Link to comment Share on other sites More sharing options...
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.