pxd2050 Posted March 15, 2021 Share Posted March 15, 2021 (edited) import JsonUtil Function HairColorP(Actor ActorRef) ActorBase ActorB = ActorRef.GetActorBase() int hp = ActorB.GetIndexOfHeadPartByType(3) string hpname = ActorB.GetNthHeadPart(hp).GetPartName() int HairTintColor = NiOverride.GetNodePropertyInt(ActorRef,false,hpname,7,-1) int Red = GetRed(HairTintColor) int Green = GetGreen(HairTintColor) int Blue = GetBlue(HairTintColor) int color = (65536*Red + 256*Green + Blue)/2 ColorForm haircolor = ActorB.GetHairColor() haircolor.setcolor(Color) ActorB.SetHairColor(haircolor) ActorRef.QueueNiNodeUpdate() IntListSet(ActorRef,"HairColor",0,color) IntListSet(ActorRef,"HairColor",1,Red) IntListSet(ActorRef,"HairColor",2,Green) IntListSet(ActorRef,"HairColor",3,Blue) EndFunction Function HairColor(actor ActorRef) HairColorP(ActorRef) int red0 = IntListGet(ActorRef, "HairColor",1) int red1 = IntListGet(ActorRef, "HairColor",4) debug.notification(red0) debug.notification(red1) what is wrong with IntListSet() IntListGet()? debug.notification(red0) debug.notification(red1)Other things are correct except debug result: red0 = 0 red1 =0 Edited March 15, 2021 by pxd2050 Link to comment Share on other sites More sharing options...
dylbill Posted March 16, 2021 Share Posted March 16, 2021 What you want instead of jsonUtil is StorageUtil. For JsonUtil, the first argument is a string. With JsonUtil you also have to Save after setting and Load before getting. Link to comment Share on other sites More sharing options...
pxd2050 Posted March 16, 2021 Author Share Posted March 16, 2021 What you want instead of jsonUtil is StorageUtil. For JsonUtil, the first argument is a string. With JsonUtil you also have to Save after setting and Load before getting.thankthank you Link to comment Share on other sites More sharing options...
Recommended Posts