Jump to content

Recommended Posts

Posted

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

Posted

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.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

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