Jump to content

SetModelPathEx not working


EnforcedRedemption

Recommended Posts

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

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 hudawayeffectscript

ref refPipBoy
int HACheck
string_var DefEquipSoundPath
string_var DefUnequipSoundPath

Begin ScriptEffectStart

let DefEquipSoundPath := "fx\ui\items\generic\up\"
let DefUnEquipSoundPath := "fx\ui\items\ui_items_generic_down.wav"
Player.AddItem HAPipBoy100 1 1
Player.AddItem HAPipBoy80 1 1
Player.AddItem HAPipBoy60 1 1
Player.AddItem HAPipBoy40 1 1
Player.AddItem HAPipBoy20 1 1
Player.AddItem HAPipBoyLD100 1 1
Player.AddItem HAPipBoyLD80 1 1
Player.AddItem HAPipBoyLD60 1 1
Player.AddItem HAPipBoyLD40 1 1
Player.AddItem HAPipBoyLD20 1 1
Player.AddItem HAPipBoyRadHY 1 1
Player.AddItem HAPipBoyRadMinor 1 1
Player.AddItem HAPipBoyRadAdv 1 1
Player.AddItem HAPipBoyRadCrtl 1 1
Player.AddItem HAPipBoyRadDed 1 1

End

Begin GameMode

if IsPC1stPerson

if IsKeyPressed 19 && HACheck == 1

SetSoundSourceFile UIItemGenericDown " "
SetSoundSourceFile UIItemGenericUp " "
Player.UnequipItem refPipBoy 0 1
Player.srm

if Player.GetAV RadiationRads < 1000.0 && Player.GetAV RadiationRads >= 800.0
Player.EquipItem HAPipBoyRadDed 0 1

elseif Player.GetAV RadiationRads < 800.0 && Player.GetAV RadiationRads >= 600.0
Player.EquipItem HAPipBoyRadCrtl 0 1

elseif Player.GetAV RadiationRads < 600.0 && Player.GetAV RadiationRads >= 400.0
Player.EquipItem HAPipBoyRadAdv 0 1

elseif Player.GetAV RadiationRads < 400.0 && Player.GetAV RadiationRads >= 200.0
Player.EquipItem HAPipBoyRadMinor 0 1

elseif Player.GetAV RadiationRads < 200.0 && Player.GetAV RadiationRads >= 0.0
Player.EquipItem HAPipBoyRadHY 0 1
endif

set refPipBoy to Player.GetEqObj 6
ResetPipBoyManager
con_closeallmenus
set HACheck to 0
endif

if IsKeyPressed 35

set HACheck to 1
SetSoundSourceFile UIItemGenericDown "fx\haspipdown.wav "
SetSoundSourceFile UIItemGenericUp "fx\hascheckpip.wav "
Player.UnequipItem PipBoy 0 1
Player.srm

if Player.GetHealthPercentage <= 1 && Player.GetHealthPercentage > 0.8
if Player.GetAV PerceptionCondition == 0 || Player.GetAV EnduranceCondition == 0 || Player.GetAV LeftAttackCondition == 0 || Player.GetAV RightAttackCondition == 0 || Player.GetAV LeftMobilityCondition == 0 || Player.GetAV RightMobilityCondition == 0
Player.EquipItem HAPipBoyLD100 0 1
else
Player.EquipItem HAPipBoy100 0 1
endif

elseif Player.GetHealthPercentage <= 0.8 && Player.GetHealthPercentage > 0.6
if Player.GetAV PerceptionCondition == 0 || Player.GetAV EnduranceCondition == 0 || Player.GetAV LeftAttackCondition == 0 || Player.GetAV RightAttackCondition == 0 || Player.GetAV LeftMobilityCondition == 0 || Player.GetAV RightMobilityCondition == 0
Player.EquipItem HAPipBoyLD80 0 1
else
Player.EquipItem HAPipBoy80 0 1
endif

elseif Player.GetHealthPercentage <= 0.6 && Player.GetHealthPercentage > 0.4
if Player.GetAV PerceptionCondition == 0 || Player.GetAV EnduranceCondition == 0 || Player.GetAV LeftAttackCondition == 0 || Player.GetAV RightAttackCondition == 0 || Player.GetAV LeftMobilityCondition == 0 || Player.GetAV RightMobilityCondition == 0
Player.EquipItem HAPipBoyLD60 0 1
else
Player.EquipItem HAPipBoy60 0 1
endif

elseif Player.GetHealthPercentage <= 0.4 && Player.GetHealthPercentage > 0.2
if Player.GetAV PerceptionCondition == 0 || Player.GetAV EnduranceCondition == 0 || Player.GetAV LeftAttackCondition == 0 || Player.GetAV RightAttackCondition == 0 || Player.GetAV LeftMobilityCondition == 0 || Player.GetAV RightMobilityCondition == 0
Player.EquipItem HAPipBoyLD40 0 1
else
Player.EquipItem HAPipBoy40 0 1
endif

elseif Player.GetHealthPercentage <= 0.2 && Player.GetHealthPercentage > 0
if Player.GetAV PerceptionCondition == 0 || Player.GetAV EnduranceCondition == 0 || Player.GetAV LeftAttackCondition == 0 || Player.GetAV RightAttackCondition == 0 || Player.GetAV LeftMobilityCondition == 0 || Player.GetAV RightMobilityCondition == 0
Player.EquipItem HAPipBoyLD20 0 1
else
Player.EquipItem HAPipBoy20 0 1
endif

endif

set refPipBoy to Player.GetEqObj 6
ResetPipBoyManager
con_closeallmenus
PlaySound UIPipBoyHumLP 0
PlayerREF.PlayIdle HACheckPiPIdle

endif

if IsKeyPressed 22

Player.UnequipItem refPipBoy 0 1
Player.srm
Player.EquipItem PipBoy 0 1
ResetPipBoyManager
con_closeallmenus
StopSound UIPipBoyHumLP
PlayerRef.StopIdle
SetSoundSourceFile UIItemGenericDown $DefUnEquipSoundPath
SetSoundSourceFile UIItemGenericUp $DefEquipSoundPath

endif
endif
End

 

 

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 by EnforcedRedemption
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...