Initialization of attachments

DaveMasters44

New member
If I create an asset with attachments that need to be initialized, how can the initialization be invoked through the base asset script? For example, a station with nameable signs attached. If the station name is changed for the base asset, it would be nice to be able to pass the new name through to the attached signs.
 
Does the absence of any reply to my question mean that it's so trivial that everyone should know how to do that, or does it mean that nobody does?
 
It depends upon how the asset is created. If in your example, in most cases yes the name is changed when you change the name of the asset. This is done with the attachment points in the mesh-container.

If you've added attachment points after the fact, after the model is created, this may not be the case, however.

As far as not answering your post immediately, not everyone hangs on the forums looking to answer your questions. A lot of people are busy doing other things such as reading other forum posts, or even working on their own routes. It so happened I am browsing the forums and happened upon your post, which since today has not been happening at all due to other reasons., and may not happen again for another couple of days or even a week.

Your question is a bit vague too and took some thought. Many people are not technically inclined with content creation - perhaps you should have posted your question there instead of in the Surveyor forums. The content creators, who are much more technically inclined on script stuff, attachment points, and all the stuff that it all entails, may have better and perhaps more correct answer than I have given.
 
The title of your thread was a bit confusing. Attachments are defined in the config.txt of the parent asset and are loaded, depending on the author, when the asset is loaded. i.e. the attachment may, or may not, be visible.

AFAIK, and I confess I didn't check, nameable signs are automatically saved in the asset's database, that we call the "soup", and should show from save to the next time you load the route/session. Some features of an asset, that are changeable, must have a script that saves the feature/configuration. Andi Smith (RIP) wrote a tutorial that explains how it can be done.

I don't think your original question was trivial but you may have asked in the wrong forum. There are not many script writers and even fewer that frequent the forums.

If this doesn't answer your question then try again.
 
I think that he wants, is to set the signs so that when the 'master' sign is changed, all the slave signs change in unison. Sounds like a scripting task. I can't see anyway that individual content items can be linked to do this. Off the cuff thought, if the master and the slaves all exist in the same library then making the changes by changing the textures 'may' be able to make it work. To be honest, that sounds plausible but is probably undoable.

Peter
 
Thank you all for your replies. It seems that the follow-up post was worth while.

The example that I quoted was exactly what I was trying to do. I've created several stations using Attachment Maker. There is no underlying mesh, other than the attachments. Some of the attachments are signs, which need to match the station name. Sadly, the name shows up as "name". My work-around has been to clone the sign, remove the name, and add the station name to the attachment in the config.txt file. This means having 2 attachments for each sign, or 3 for a double-sided sign. One attachment is for the sign itself, the other(s) for the text to put on the sign. Although this works, it's a bit tedious getting everything to line up properly.

Another drawback is that the result uses a pirated asset, and so can't be uploaded.

I was hoping that there was a better way, such as calling the sign's initialization script in the station's own initialization script. (The stations all use my own scripts.)

Dave
 
Back
Top