Jump to content

Editing model key/values from editor


Blue Solitare
 Share

Recommended Posts

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 ■

Link to comment
Share on other sites

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.

 Share

×
×
  • Create New...