PeterMartyr Posted October 15, 2017 Share Posted October 15, 2017 I wrote a debugging code and I have been testing on Player Alias Event OnSit(ObjectReference akFurniture) Actor Me = self.GetActorReference() ActorBase Playerb = Me.GetBaseObject() as ActorBase Int PlayerEyesB = PlayerB.GetNthHeadPart(4).GetType() Headpart PlayerEyesC = PlayerB.GetNthHeadPart(4) DEBUG.MessageBox("the code b return a int of \n\n"+ PlayerEyesB + "\n\ncode C return a Headpart of " + PlayerEyesC ) ;Playerb.SetNthHeadPart(EyePartList.getat(0) as headpart, 2) ;Playerb.SetNthHeadPart(PlayerEyesC, 2) EndEvent & it is very inconsistent & doesn't match wiki so still trying but at look at the debugging code so you can adapt it try as well Link to comment Share on other sites More sharing options...
PeterMartyr Posted October 15, 2017 Share Posted October 15, 2017 I get it I am working on a code for you Link to comment Share on other sites More sharing options...
Drazhar753 Posted October 15, 2017 Author Share Posted October 15, 2017 I get it I am working on a code for you Thank you, I appreciate that a lot :). I am also still working on this, but nothing yet. Will let you know if I figure it out. Link to comment Share on other sites More sharing options...
PeterMartyr Posted October 15, 2017 Share Posted October 15, 2017 (edited) Scriptname AM_OcculentSightFX extends activemagiceffect FormList Property EyePartList Auto GlobalVariable Property OcculentSightKeyGlobal Auto Spell Property DetectItemSpell auto MagicEffect Property DetectingMagic auto Sound Property ReleaseSound Auto Sound Property FizzleSound Auto HeadPart PlayerEyes = none int keyactivate Int eyes Event OnEffectStart(Actor akTarget, Actor akCaster) If akTarget == Game.GetPlayer() keyactivate = OcculentSightKeyGlobal.getvalueint() RegisterForKey(keyactivate) ActorBase Base = akTarget.GetBaseObject() as ActorBase int parts = Base.GetNumHeadParts() While parts > 0 parts -= 1 int Temp = Base.GetNthHeadPart(parts).GetType() If Temp == 4 PlayerEyes = Base.GetNthHeadPart(Parts) eyes = parts endIf EndWhile Base.SetNthHeadPart(EyePartList.getat(0) as headpart, eyes) akTarget.QueueNiNodeUpdate() EndIf endevent Event OnEffectFinish(Actor akTarget, Actor akCaster) If akTarget == Game.GetPlayer() ActorBase Base = akTarget.GetBaseObject() as ActorBase Base.SetNthHeadPart(PlayerEyes, eyes) akTarget.QueueNiNodeUpdate() eyes = 0 EndIf endevent Event OnKeyDown(Int aiKeyCode) ; This works fine if(Game.IsFightingControlsEnabled() == true && !Utility.IsInMenuMode()) if(game.getplayer().IsAIEnabled()) If aiKeyCode == keyactivate && game.getplayer().hasmagiceffect(DetectingMagic) == false DetectItemSpell.cast(game.getplayer()) ReleaseSound.play(game.getplayer()) elseif aiKeyCode == keyactivate && game.getplayer().hasmagiceffect(DetectingMagic) == true FizzleSound.play(game.getplayer()) endif endif endif endevent Opps I merge our two scripts correctly this time I rush it cause it was taking so long & got wrong. Edited October 15, 2017 by PeterMartyr Link to comment Share on other sites More sharing options...
PeterMartyr Posted October 15, 2017 Share Posted October 15, 2017 (edited) it was number 4 but it may need tweaking cause i can really test itlikehas just an Example int parts = Base.GetNumHeadParts()+ 1 Edited October 15, 2017 by PeterMartyr Link to comment Share on other sites More sharing options...
PeterMartyr Posted October 15, 2017 Share Posted October 15, 2017 (edited) It killing me that I can't tweak it & getting working 100% guarantee I Hope you can see it Edited October 15, 2017 by PeterMartyr Link to comment Share on other sites More sharing options...
Drazhar753 Posted October 15, 2017 Author Share Posted October 15, 2017 It killing me that I can't tweak it & getting working 100% guarantee I Hope you can see itOkay so yours works to some degree, but it's replacing the characters' head instead of the eyes as 4, for me anyway. The good news is that it is consistant across all races/sexes. I just need to tweak it till I find the correct number, 4 seems to be the head. Link to comment Share on other sites More sharing options...
PeterMartyr Posted October 15, 2017 Share Posted October 15, 2017 that killing me i wish I could hlp I know i can tune it but need you mod, but i am very sure you will tweak it right Link to comment Share on other sites More sharing options...
PeterMartyr Posted October 15, 2017 Share Posted October 15, 2017 (edited) OMG I made a big mistake change 4 to 2 I got confused by you saying 4 works, CK wikki say to use 2 & rushing Edited October 15, 2017 by PeterMartyr Link to comment Share on other sites More sharing options...
Drazhar753 Posted October 15, 2017 Author Share Posted October 15, 2017 that killing me i wish I could hlp I know i can tune it but need you mod, but i am very sure you will tweak it rightIt's all good don't worry :). I found that it was 2 instead of 4, so that works now. I think I have it working, will do a bit more testing right now. Link to comment Share on other sites More sharing options...
Recommended Posts