cocopino Posted July 24, 2010 Share Posted July 24, 2010 Hi, I have a model that I can drag inside the editor, this model has a script (model.lua) How does one iterate through all instances of this model inside model.lua? Thanks! Quote desktop: Quad core Q6600 + 4GB + ATI HD4890 + XP laptop: Dual core T6400 + 4 GB + NVidia 9600M GT + Vista 32 Link to comment Share on other sites More sharing options...
AggrorJorn Posted July 24, 2010 Share Posted July 24, 2010 perhaps something like this. windows= classnametable[ "house_window" ] if windows~=nil then for model,object in pairs(windows.instances) do end end Quote Link to comment Share on other sites More sharing options...
cocopino Posted July 25, 2010 Author Share Posted July 25, 2010 Thanks Aggror, but the total number of items always stays 10 using classnametable? I searched for "classnametable" and found objecttable instead, this is working. Thanks for pointing me in the right direction! Quote desktop: Quad core Q6600 + 4GB + ATI HD4890 + XP laptop: Dual core T6400 + 4 GB + NVidia 9600M GT + Vista 32 Link to comment Share on other sites More sharing options...
AggrorJorn Posted July 25, 2010 Share Posted July 25, 2010 I barely have any idea how to use this, but I remembered it from Josh's Lua pdf file . Glad that it got you in the right direction. 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.