cooldamien Posted February 21, 2017 Share Posted February 21, 2017 I need help to change Camera to third person for haircut script. Right know the mirror works but you have place your self in third person before activation to even see your self. Any help with this issue would be much appreciated thank you. Damien Scriptname Dam_HairCutMirror extends ObjectReference Const Keyword Property AnimFaceArchetypePlayer Auto Const Event OnActivate(ObjectReference akActionRef) Actor PlayerREF = Game.GetPlayer() If akActionRef == PlayerREF Game.FadeOutGame(false, true, 0.0, 2.0) Self.Activate(Game.GetPlayer(), true) Game.SetCameraTarget(game.getPlayer()) Game.FadeOutGame(true, true, 2.0, 1.0) Game.ShowRaceMenu(uimode = 1) PlayerREF.ChangeAnimFaceArchetype(AnimFaceArchetypePlayer) EndIf EndEvent Link to comment Share on other sites More sharing options...
shavkacagarikia Posted February 21, 2017 Share Posted February 21, 2017 Game.ForceThirdPerson() is what you are looking for Link to comment Share on other sites More sharing options...
cooldamien Posted February 22, 2017 Author Share Posted February 22, 2017 I thank you for that function now I just need to set the camera location so you can see the player face. Again thank you for your help. Damien Link to comment Share on other sites More sharing options...
jackjack86 Posted February 23, 2017 Share Posted February 23, 2017 are you updating the Barber/surgeon fix??!!! Link to comment Share on other sites More sharing options...
cooldamien Posted February 23, 2017 Author Share Posted February 23, 2017 are you updating the Barber/surgeon fix??!!! I do not understand your question . I am just try to get my mirror to work right for hair cuts. That I wish to use in my player home made that I am making. Link to comment Share on other sites More sharing options...
cooldamien Posted February 25, 2017 Author Share Posted February 25, 2017 Does anyone know how to do this? Link to comment Share on other sites More sharing options...
cooldamien Posted February 26, 2017 Author Share Posted February 26, 2017 I think I found the solution. Use a Xmarker and face it the opposite direction and use this game.getplayer().MoveTo(Dam_Haircut). This seems to work. Scriptname Dam_HairCutMirror extends ObjectReference Const ImageSpaceModifier Property FadeToBlack auto ConstImageSpaceModifier Property HoldBlack auto ConstImageSpaceModifier Property FadeFromBlack auto ConstObjectReference Property Dam_Haircut Auto ConstKeyword Property AnimFaceArchetypePlayer Auto Const Event OnActivate(ObjectReference akActionRef) Actor PlayerREF = Game.GetPlayer() If akActionRef == PlayerREFGame.FadeOutGame(false, true, 0.0, 2.0) Self.Activate(Game.GetPlayer(), true)Game.ForceThirdPerson() game.getplayer().MoveTo(Dam_Haircut) Game.SetCameraTarget(game.getplayer());game.Getplayer().SetAngle(0.0, 0.0, 180.0) Game.FadeOutGame(true, true, 2.0, 1.0) Game.ShowRaceMenu(uimode = 1) PlayerREF.ChangeAnimFaceArchetype(AnimFaceArchetypePlayer) EndIfEndEvent Link to comment Share on other sites More sharing options...
werr92 Posted February 26, 2017 Share Posted February 26, 2017 Hello, Damien. First I want to mark that the construction you use in terms of declaring Player ref once as a property is a bit better then mine Game.GetPlayer() multiple times.Second, here is the code I used in my mod. It is little bit overcomplicated but the idea was to allow you choose whom do you want to edit: player or companion.Other than that it contains "camera part" that you are looking for. Scriptname WH_PlayerFaceEditSCRIPT extends ObjectReference import utility ObjectReference property BackLight auto Keyword property AnimFaceArchetypePlayer Auto Const Sound property DRScMirrorOpen auto Sound property DRScMirrorClose auto quest property WHmirrorFaceGenQuest auto Inputenablelayer property MirrorInput auto hidden Message property WH_MIRROR_MENU_message01 auto Message property WH_PlayerFaceEdit_FAIL_message01 auto Message property WH_PlayerFaceEdit_FAIL_message02 auto Message property WH_PlayerFaceEdit_FAIL_message03 auto Message property WH_PlayerFaceEdit_FAIL_message04 auto Idle property ElevatorBodyCamera auto Idle property ElevatorFaceCamera auto ;Imagespacemodifier property CameraGenImod auto Event OnActivate(ObjectReference akActionRef) if akActionRef == Game.GetPlayer() if Game.GetPlayer().IsInCombat() WH_PlayerFaceEdit_FAIL_message02.Show() else ;WHmirrorFaceGenQuest.SetStage(5) wait(0.3) If Game.GetPlayer().IsInPowerArmor() WH_PlayerFaceEdit_FAIL_message01.Show() else DRScMirrorOpen.Play(self) Self.RegisterForMenuOpenCloseEvent("LooksMenu") Self.RegisterForLooksMenuEvent() FaceBuildMENU() endIf endif endif EndEvent Event OnLooksMenuEvent(int aiFlavor) If (aiFlavor == 10) Game.GetPlayer().PlayIdle(ElevatorBodyCamera) ElseIf (aiFlavor == 11) Game.GetPlayer().PlayIdle(ElevatorFaceCamera) EndIf EndEvent Event OnMenuOpenCloseEvent(string asMenuName, bool abOpening) If asMenuName == "LooksMenu" && abOpening == False DRScMirrorClose.Play(self) Game.SetCameraTarget(Game.GetPlayer()) ;;;;;;;;;;;;;;;;;;;; Game.GetPlayer().SetHasCharGenSkeleton(False) Game.GetPlayer().ChangeAnimFaceArchetype(AnimFaceArchetypePlayer) Game.ForceThirdPerson() Game.ForceFirstPerson() MirrorInput.EnablePlayerControls() MirrorInput = None wait(0.3) BackLight.Disable() ImageSpaceModifier.RemoveCrossFade(1.0) Self.UnRegisterForMenuOpenCloseEvent("LooksMenu") Self.UnRegisterForLooksMenuEvent() if WHmirrorFaceGenQuest.IsRunning() && WHmirrorFaceGenQuest.GetStage() > 5 WHmirrorFaceGenQuest.SetStage(50) endif EndIf EndEvent Function FaceBuildMENU(int iButton = 0) WH_MIRROR_MENU_message01.Show() If iButton == 0 ;Player MirrorInput = inputenablelayer.Create() MirrorInput .DisablePlayerControls(True, True, True, FALSE, True, True, True, True, True, True, True) ;my Game.GetPlayer().ChangeAnimFaceArchetype(None) Game.GetPlayer().SetHasCharGenSkeleton(True) WHmirrorFaceGenQuest.SetStage(5) wait(0.3) WHmirrorFaceGenQuest.SetStage(20) wait(0.3) BackLight.Enable() elseif iButton == 1 ;Comp MirrorInput = inputenablelayer.Create() MirrorInput .DisablePlayerControls(True, True, True, FALSE, True, True, True, True, True, True, True) ;my ;Game.GetPlayer().ChangeAnimFaceArchetype(None) ;Game.GetPlayer().SetHasCharGenSkeleton(True) WHmirrorFaceGenQuest.SetStage(5) wait(0.3) WHmirrorFaceGenQuest.SetStage(30) wait(0.3) BackLight.Enable() elseif iButton == 2 ;EXIT ;nothing endif ENDFUNCTION Link to comment Share on other sites More sharing options...
cooldamien Posted February 26, 2017 Author Share Posted February 26, 2017 (edited) I see you have a quest in this code quest property WHmirrorFaceGenQuest auto. I am guessing you need it to get the script working. How do I set the quest up, what scripting is in the quest? But this is what I took from your code. Scriptname Dam_HairCutMirror extends ObjectReference ObjectReference Property Dam_Haircut Auto Const Keyword Property AnimFaceArchetypePlayer Auto Const Sound property DRScMirrorOpen auto Sound property DRScMirrorClose auto Idle property ElevatorBodyCamera auto Idle property ElevatorFaceCamera auto Event OnActivate(ObjectReference akActionRef) Actor PlayerREF = Game.GetPlayer() If akActionRef == PlayerREF If PlayerRef.IsInPowerArmor() debug.messagebox("You can not be in power armor to get a hair cut. Exit your power armor and come back.") Else DRScMirrorOpen.Play(self) Game.FadeOutGame(false, true, 0.0, 2.0) PlayerREF.SetHasCharGenSkeleton(False) PlayerREF.ChangeAnimFaceArchetype(AnimFaceArchetypePlayer) InputEnableLayer myLayer = InputEnableLayer.Create() InputEnableLayer MirrorInput = inputenablelayer.Create() MirrorInput.DisablePlayerControls(True, True, false, FALSE, True, True, True, True, True, True, True) PlayerREF.PlayIdle(ElevatorBodyCamera) Self.Activate(PlayerREF, true) Game.ForceThirdPerson() PlayerREF.MoveTo(Dam_Haircut) Game.SetCameraTarget(PlayerREF) ;PlayerREF.SetAngle(0.0, 0.0, 180.0) myLayer.EnablePlayerControls() Game.FadeOutGame(true, true, 2.0, 1.0) DRScMirrorClose.Play(self) Game.ShowRaceMenu(uimode = 1) PlayerREF.ChangeAnimFaceArchetype(AnimFaceArchetypePlayer) EndIf EndIf EndEvent Edited February 26, 2017 by cooldamien Link to comment Share on other sites More sharing options...
Recommended Posts