Blue Solitare Posted February 24, 2010 Share Posted February 24, 2010 Hello, In Sandbox there used to be an easy way to add/modify model keys/values. Has this been removed from the new editor? If not, where can this be accessed from the editor? I can still add/modify keys to the .sbx via a text editor, but it was nice to have it right there in the editor. Thanks, Blue Quote Link to comment Share on other sites More sharing options...
Canardia Posted February 24, 2010 Share Posted February 24, 2010 You need to add the fields which you want per model to the model's lua script. For example if you want a model to have additionally a sound key, you only need this script: require("scripts/class") local class=CreateClass(...) function class:InitDialog(grid) self.super:InitDialog(grid) local group=grid:AddGroup("Sound") group:AddProperty("sound",PROPERTY_STRING,"","Sound") end The minimum script every model should have is anyway: require("scripts/class") local class=CreateClass(...) function class:InitDialog(grid) self.super:InitDialog(grid) end So you only need to add 1 new line per new entity key, after you have added the 1 line for the group tab. 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 ■ Link to comment Share on other sites More sharing options...
Josh Posted February 24, 2010 Share Posted February 24, 2010 You only need this, really: require("scripts/class") local class=CreateClass(...) Quote My job is to make tools you love, with the features you want, and performance you can't live without. 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.