gooser Posted January 24, 2014 Posted January 24, 2014 I see: CheckTags(), HasTag(), RemoveTag(), ToggleTag(), but no GetTags(), something like: string[] GetTags() ?? Thanks Ashal!
Someone92 Posted January 25, 2014 Posted January 25, 2014 I agree, a functionality like this would be great. Returning them as a single string separated by ", " might be faster and more convenient, though.
Ashal Posted January 26, 2014 Posted January 26, 2014 Not one built in, as I don't see much use for such a function. Any tag that might be relevant to what your doing with the animation can be simply checked with HasTag(), the actual list of tags should be otherwise useless. But if you really need a list of all the tags, getting them isn't really that hard with a small bit of scripting. Here's a simple way to get them all into a string array. string[] function GetTags(sslBaseAnimation Animation) ;// Get animations StorageUtil accessors quest Storage = Animation.Storage string TagsKey = Animation.Key("Tags") ;// Get number of tags animation has int i = StorageUtil.StringListCount(Storage, TagsKey) ;// Create empty tags array sized to the number of tags there are string[] tags = sslUtility.StringArray(i) ;// Loop through tags in StorageUtil and set the Nth tags element while i i -= 1 tags[i] = StorageUtil.StringListGet(Storage, TagsKey, i) endWhile ;// Return tags array containing all the animation tags pulled out of StorageUtil return tags endFunction While I don't see much use for such a function; since I essentially just wrote it here, I'll go ahead and include it in SexLab 1.40.
gooser Posted January 26, 2014 Author Posted January 26, 2014 I only need it to understand SL better. I'm writing a developer-only mod that essentially taps all of the key events in SL and writes to the papyrus log relevant info, actors, animation names, tags, etc. It's not essential, but thanks for working it out for me.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.