Dozz Posted December 28, 2011 Share Posted December 28, 2011 is there a way to parent within the editor? not using Lua as it would traverse through all instances (I think?) Quote Link to comment Share on other sites More sharing options...
Road Kill Kenny Posted December 29, 2011 Share Posted December 29, 2011 Yes simply click, hold and drag from one object to another. There is no graphic visualisation of the linking (like a line) but if you did it properly you will get a message saying 'CreatLink(0)?' and just click Ok... that should be all Quote STS - Scarlet Thread Studios AKA: Engineer Ken Fact: Game Development is hard... very bloody hard.. If you are not prepared to accept that.. Please give up now! Link to comment Share on other sites More sharing options...
Josh Posted December 29, 2011 Share Posted December 29, 2011 That's not the same thing as parenting. It's assumed that when models are loaded in the editor, their hierarchy has already been arranged in a modeling program, and all models are top-level entities. 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...
Rick Posted December 29, 2011 Share Posted December 29, 2011 @Ken Also when linking there is a visual line drawn. Tools->Linked Index let's you change which link you are viewing and linking. You can only view1 link index at a time. Also pressing keys 0-7 will change this selected index. @Dozz I know you said without Lua but currently you have to use Lua to do this in the editor. In a way Ken's comment could work for parenting but it would still require some coding in the model scripts. You'd want to add the following function so you know when something is linked and then you could call EntityParent. The model script function would be: function object:SetTarget(target,index) end You can look at the lua template in the Scripts folder to see this and all other Lua model functions that the engine calls. I fought for this function because it can be useful to know when a target is set. Like in this case you could put code in this that actually does the parenting of models. Should just be a 1 liner in each model that you want this functionality in. Quote Link to comment Share on other sites More sharing options...
Dozz Posted December 30, 2011 Author Share Posted December 30, 2011 thanks Rick, getting to grips with Lua is on my list, but it's on page 2. Its not a big issue it not being in the editor, It works in my cpp code. For my purposes, building the hierarchy through the modelling app works fine, I just don't want it for all models. thanks 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.