Mktavish Posted November 10, 2018 Share Posted November 10, 2018 So is this an actor effect on the player , or an object effect on the pipboy ? Because the call of "PlayerRef.Playidle" is said to be bugged , unless that was cleared up with FNV ?Anyways with it being an effect script on the player , therefore the implied reference.You just use the code of "PlayIdle HACheckPipIdle"The StopIdle may need the PlayerRef and be fine. But could try it without anyways. And since you are using an effect script , might as well try "Begin ScriptEffectUpdate" instead of gamemode. But having no menumode for the equipping , may be leading to having various results. Because it would seem you are just sneaking it in with an exploit so to speak. And having it within the MenuMode , also checked with a variable , should then give you more stable results. Link to comment Share on other sites More sharing options...
EnforcedRedemption Posted November 12, 2018 Author Share Posted November 12, 2018 (edited) Well, I've switched over to using copies of the PipBoy with multiple .nifs. It is working very well now! I'll post my code so you can see the progress. Hopefully this helps someone down the line trying to do something similar, as it took me a while to figure this out coming from no knowledge at all. scn hudawayeffectscriptref refPipBoyint HACheckstring_var DefEquipSoundPathstring_var DefUnequipSoundPathBegin ScriptEffectStartlet DefEquipSoundPath := "fx\ui\items\generic\up\"let DefUnEquipSoundPath := "fx\ui\items\ui_items_generic_down.wav"Player.AddItem HAPipBoy100 1 1Player.AddItem HAPipBoy80 1 1Player.AddItem HAPipBoy60 1 1Player.AddItem HAPipBoy40 1 1Player.AddItem HAPipBoy20 1 1Player.AddItem HAPipBoyLD100 1 1Player.AddItem HAPipBoyLD80 1 1Player.AddItem HAPipBoyLD60 1 1Player.AddItem HAPipBoyLD40 1 1Player.AddItem HAPipBoyLD20 1 1Player.AddItem HAPipBoyRadHY 1 1Player.AddItem HAPipBoyRadMinor 1 1Player.AddItem HAPipBoyRadAdv 1 1Player.AddItem HAPipBoyRadCrtl 1 1Player.AddItem HAPipBoyRadDed 1 1EndBegin GameModeif IsPC1stPersonif IsKeyPressed 19 && HACheck == 1SetSoundSourceFile UIItemGenericDown " "SetSoundSourceFile UIItemGenericUp " "Player.UnequipItem refPipBoy 0 1Player.srmif Player.GetAV RadiationRads < 1000.0 && Player.GetAV RadiationRads >= 800.0Player.EquipItem HAPipBoyRadDed 0 1elseif Player.GetAV RadiationRads < 800.0 && Player.GetAV RadiationRads >= 600.0Player.EquipItem HAPipBoyRadCrtl 0 1elseif Player.GetAV RadiationRads < 600.0 && Player.GetAV RadiationRads >= 400.0Player.EquipItem HAPipBoyRadAdv 0 1elseif Player.GetAV RadiationRads < 400.0 && Player.GetAV RadiationRads >= 200.0Player.EquipItem HAPipBoyRadMinor 0 1elseif Player.GetAV RadiationRads < 200.0 && Player.GetAV RadiationRads >= 0.0Player.EquipItem HAPipBoyRadHY 0 1endifset refPipBoy to Player.GetEqObj 6ResetPipBoyManagercon_closeallmenusset HACheck to 0endifif IsKeyPressed 35set HACheck to 1SetSoundSourceFile UIItemGenericDown "fx\haspipdown.wav "SetSoundSourceFile UIItemGenericUp "fx\hascheckpip.wav "Player.UnequipItem PipBoy 0 1Player.srmif Player.GetHealthPercentage <= 1 && Player.GetHealthPercentage > 0.8if Player.GetAV PerceptionCondition == 0 || Player.GetAV EnduranceCondition == 0 || Player.GetAV LeftAttackCondition == 0 || Player.GetAV RightAttackCondition == 0 || Player.GetAV LeftMobilityCondition == 0 || Player.GetAV RightMobilityCondition == 0Player.EquipItem HAPipBoyLD100 0 1elsePlayer.EquipItem HAPipBoy100 0 1endifelseif Player.GetHealthPercentage <= 0.8 && Player.GetHealthPercentage > 0.6if Player.GetAV PerceptionCondition == 0 || Player.GetAV EnduranceCondition == 0 || Player.GetAV LeftAttackCondition == 0 || Player.GetAV RightAttackCondition == 0 || Player.GetAV LeftMobilityCondition == 0 || Player.GetAV RightMobilityCondition == 0Player.EquipItem HAPipBoyLD80 0 1elsePlayer.EquipItem HAPipBoy80 0 1endifelseif Player.GetHealthPercentage <= 0.6 && Player.GetHealthPercentage > 0.4if Player.GetAV PerceptionCondition == 0 || Player.GetAV EnduranceCondition == 0 || Player.GetAV LeftAttackCondition == 0 || Player.GetAV RightAttackCondition == 0 || Player.GetAV LeftMobilityCondition == 0 || Player.GetAV RightMobilityCondition == 0Player.EquipItem HAPipBoyLD60 0 1elsePlayer.EquipItem HAPipBoy60 0 1endifelseif Player.GetHealthPercentage <= 0.4 && Player.GetHealthPercentage > 0.2if Player.GetAV PerceptionCondition == 0 || Player.GetAV EnduranceCondition == 0 || Player.GetAV LeftAttackCondition == 0 || Player.GetAV RightAttackCondition == 0 || Player.GetAV LeftMobilityCondition == 0 || Player.GetAV RightMobilityCondition == 0Player.EquipItem HAPipBoyLD40 0 1elsePlayer.EquipItem HAPipBoy40 0 1endifelseif Player.GetHealthPercentage <= 0.2 && Player.GetHealthPercentage > 0if Player.GetAV PerceptionCondition == 0 || Player.GetAV EnduranceCondition == 0 || Player.GetAV LeftAttackCondition == 0 || Player.GetAV RightAttackCondition == 0 || Player.GetAV LeftMobilityCondition == 0 || Player.GetAV RightMobilityCondition == 0Player.EquipItem HAPipBoyLD20 0 1elsePlayer.EquipItem HAPipBoy20 0 1endifendifset refPipBoy to Player.GetEqObj 6ResetPipBoyManagercon_closeallmenusPlaySound UIPipBoyHumLP 0PlayerREF.PlayIdle HACheckPiPIdleendifif IsKeyPressed 22Player.UnequipItem refPipBoy 0 1Player.srmPlayer.EquipItem PipBoy 0 1ResetPipBoyManagercon_closeallmenusStopSound UIPipBoyHumLPPlayerRef.StopIdleSetSoundSourceFile UIItemGenericDown $DefUnEquipSoundPathSetSoundSourceFile UIItemGenericUp $DefEquipSoundPathendifendifEnd This is all work in progress, and will definitely change as I move forward. But at this stage it is functional, although my coding is definitely not efficient and far from perfect. The code is attached to a player effect.Cheers again for all the help people, especially Mktavish. It took me while, but all the suggestions helped immensely. Edited November 12, 2018 by EnforcedRedemption Link to comment Share on other sites More sharing options...
Recommended Posts