Reply to thread

In light of this and hair mods, I've formed a solution that isn't for this at all:

[code]function onLoaded(e:Event):void

{

    var s:Array = e.target.data.split("\r").join("").split("\n").join("").split(";");


    for (var si:int = 0; si<s.length; si++)

    {

        if (s[si].split(":")[0] == "hair")

        {

            for (var hairInd:int = 0; hairInd<g.characterControl.characters.length; hairInd++)

            {

                if (g.dataName(s[si].split(":")[1].split(",")[0]) == g.dataName(g.characterControl.characters[hairInd].charShortName))

                {

                    g.characterControl.customHairLoaded = false;

                    setHair(hairInd);

                }

            }

            s.splice(si,1);

            break;

        }

    }

    var out:String = "";

    for (var s2:int = 0; s2<s.length; s2++)

    {

        out +=  s[s2] + ";";

    }

    g.inGameMenu.loadData(out);

}

function setHair(arg1:uint, arg2:Boolean=true)

{

    var cc = g.characterControl;

    cc.clearElements();

    var loc2:* = undefined;

    var loc1:* = cc.characters[arg1];

    g.her.hairTop.gotoAndStop(loc1.hairTop);

    g.her.hairMidContainer.hairUnder.gotoAndStop(loc1.hairUnder);

    g.her.hairMidContainer.hairBottom.gotoAndStop(loc1.hairBottom);

    g.her.hairBackContainer.hairBack.gotoAndStop(loc1.hairBack);

    if (arg2)

    {

        cc.setEyebrowFill(loc1.eyebrowFill);

        cc.setEyebrowLine(loc1.eyebrowLine);

    }

    cc.currentElements = loc1.generateElements();

    var loc3:* = 0;

    var loc4:* = cc.currentElements;

    for each (loc2 in loc4)

    {

        loc2.addEventListener("toggled", cc.currentElementToggled, false, 0, true);

    }

    cc.updateCurrentElementsStatus();

    cc.currentHair = arg1;

}[/code]


That loads hair without removing hair mods, yay.

Perhaps Kona would be so kind as to rewrite the setHair function to allow for a parameter to be passed in for whether or not to reset headwear/hair mods.

Would have saved me some headaches.


EDIT:

Have some error checking:


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.