Rick Posted February 5, 2010 Posted February 5, 2010 I thought I did this before, but I can seem to recall how to get the name of a thingoid. So if I was looking through the objecttable how could I get the name of each thingoid in it? I tried GetKey("name") or just the name property but that didn't seem to work. Quote
Canardia Posted February 6, 2010 Posted February 6, 2010 Why not just set the name key in the thingoid's script (or .ini file (have people forgotten about those?)? I made also the name key editable for my models, since I want to be able to have more meaningful names than light_point_1. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■
Rick Posted February 6, 2010 Author Posted February 6, 2010 I'm trying to get the name of other thingoids in a different thingoid. I want to allow to set the name of a thingoid in the settings of another thingoid instead of using a target. Also, is it me or in the class.lua file does it look like there is a Name property but the get and set key methods aren't doing anything with it. Quote
Josh Posted February 6, 2010 Posted February 6, 2010 If the name property is not handled in any special way in the script, then it is simply added to the entity keys. Quote My job is to make tools you love, with the features you want, and performance you can't live without.
Rick Posted February 6, 2010 Author Posted February 6, 2010 From what I'm understanding of what you are saying it would mean I could use GetKey("name") (because that's the entities keys), but that doesn't seem to work. for k,v in pairs(objecttable) do Notify(v:GetKey("name")) end Quote
Rick Posted February 6, 2010 Author Posted February 6, 2010 Oh, nevermind. I see for k,v in pairs(objecttable) do Notify(GetEntityKey(v.model, "name")) end Just kind of strange how some things work the lua way GetKey(), and some need to use the LE function way. Quote
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.