Tomko Galicia Posted June 15, 2013 Share Posted June 15, 2013 I'm still new to scripting but I've built a HUD and pose stand that lets you cycle through all the poses in Contents. However, I want to divide these poses into catagories and organise them in folders. To make things simple, lets say Male and Female. I have buttons on the HUD planned to cycle through these catagories, then buttons to cycle through the poses inside the catagories. I'm using llGetInventoryName at the moment so what ever I put into the pose stand works. Will I have to change this to lists and list the animations from inside the script or is there a way to get llGetInventoryName to look in folders? Can anyone point me in the right direction as how I could acieve this?Thanks. Link to comment Share on other sites More sharing options...
PeterCanessa Oh Posted June 15, 2013 Share Posted June 15, 2013 Prims can't have folders so the problem won't arise ... You may want to look at a naming convention so your script can distinguish male from female - say by prefixing the names with 'M' or 'F'. Alternatively store them in separate linked prims. Edit: waves back to Rolig - not quite back properly yet, but getting close® Link to comment Share on other sites More sharing options...
Rolig Loon Posted June 15, 2013 Share Posted June 15, 2013 /me waves to Peter. :smileywink: Welcome back. Link to comment Share on other sites More sharing options...
Tomko Galicia Posted June 15, 2013 Author Share Posted June 15, 2013 Keeping them in seperate prims mights work! Great idea. I have an idea how to pull that off. Thank you. Link to comment Share on other sites More sharing options...
Stickman Ingmann Posted June 15, 2013 Share Posted June 15, 2013 I recommend doing as suggested above. Rather than looping through the inventory each time, you can cache the values in two lists. When you get an on_rez()/state_entry(), loop through all animations and store them in each list, depending on the prefix. When you get a changed() with CHANGED_INVENTORY, clear the lists and cache them again. I assume you've got some sort of pagination working based on looping through inventory count. you can do the same except with your cached lists. Link to comment Share on other sites More sharing options...
Qie Niangao Posted June 16, 2013 Share Posted June 16, 2013 Keeping them in seperate prims mights work! Not sure I've ever actually tested, but I've always assumed that llStartAnimation() can only use the animations in the inventory of the same prim as the script (ignoring built-in system animations). If that's right, then animations in separate prims would require an animation script in each of those prims, all with PERMISSION_TRIGGER_ANIMATION, and one special script that orchestrates the others. 1 Link to comment Share on other sites More sharing options...
LepreKhaun Posted June 17, 2013 Share Posted June 17, 2013 You're not only correct in that assumption, there is another complicating factor in using different prims to store animations: Each prim can only access its own inventory. That would entail the script in each needing to communicate with the main HUD program with what it has, as well as managing updates on their individual CHANGED_INVENTORY events. Much better, IMO, is the original suggestion of prefixing the names with 'M' or 'F' (and possibly 'U' for unisex?) and sorting the animations into lists. That hierarchy could be further extended by using the second letter to designate sitting, standing, walking, dancing etc. Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now