Mod layering with action script (1 Viewer)

DigitalSmutExports

Content Creator
Joined
Sep 12, 2018
Hi,

I'm wondering if it's possible to make a mod with overwrite set to false which automatically places chosen parts of the mod underneath other mods of the same type?

So if for example if I made a mod consisting of top and armwear I would like to be able to say that the right forearm of the armwear always goes underneath other armwear whereas the rest of the pieces load normally.

I'm making an Emily Kaldwin Costume mod.

Since this screenshot was taken I've also finished her boots and her glowing magical tattoo.
5GWZHRf.jpg

I plan to make a release with both the full costume and the individual pieces so players can mix and match however they please.

Her coat is the piece causing me trouble. It has a very unusual cut where it only covers the leg on one side. It's also very long meaning it will have to be overtop+armwear+bottom. The coat is longer on her left side, the one farther away from the camera so to speak. On a normal symmetrical coat that part would be obscured by the corresponding part on her right side and there would be no issue. As it is the left thigh bottoms part shouldn't ever go over the pants obviously since they're closer to the camera. If possible I'd rather not need users to have a specific load order for the mods. If you use moreclothing you could use poptobottom, but the armwear part of the coat should go over any shirt so that would screw things up as well.

If anyone strong with the action script force knows how to solve this that'd be great.
 

sby

Content Creator
Coder
Joined
Sep 11, 2012
essentially need to make the movieclip the 0 child. however the code needs to be ran after vanilla sdt parses and places the mod
winging this, didn't test it or anything:


addEventListener(Event.ADDED_TO_STAGE, addedToStageHandler);







function addedToStageHandler(event:Event):void {

removeEventListener(Event.ADDED_TO_STAGE, addedToStageHandler);
var p = rightlowerarmwear.parent;
p.removeChild(rightlowerarmwear);
p.addChildAt(rightlowerarmwear,0);

}
 

DigitalSmutExports

Content Creator
Joined
Sep 12, 2018
sby sby

Thank you for the attempt. It didn't work however. I tried both adding the code as is to the armwear settings and adding it to the Main settings (replacing rightlowerarmwear with coatc.rightlowerarmwear, coatc being the instance name of the armwear template).

It produces a functioning swf but everything loads normally.
 

Users who are viewing this thread

Top


Are you 18 or older?

This website requires you to be 18 years of age or older. Please verify your age to view the content, or click Exit to leave.