Halstrom Posted March 30, 2018 Posted March 30, 2018 I have this script, its runs and I get the message saying its renabled it correctly when values rise but movement is not actually disabled. I suspect I've screwed something up in my misunderstanding of how EnableInputLayer needs to be primed or something. Do I need more than one InputLayer? Scriptname SynthPlayer:Synth6Control extends ReferenceAlias {Deals with output systems based on system health and lubricant levels} Group Misc Quest Property qMQ101 Auto Const GlobalVariable Property gBootup Auto GlobalVariable Property gDebugSetting Auto GlobalVariable Property gSynthAbilityLevel Auto Const GlobalVariable Property gLubriCoolPerc Auto Const GlobalVariable Property gPowerPerc Auto Const GlobalVariable Property gCoreTempPerc Auto Const GlobalVariable Property gFPE_SexPregMonths Auto EndGroup Group SystemConditions ActorValue Property BrainConditionAV Auto ActorValue Property PerceptionConditionAV Auto ActorValue Property EnduranceConditionAV Auto ActorValue Property LeftAttackConditionAV Auto ActorValue Property LeftMobilityConditionAV Auto ActorValue Property RightAttackConditionAV Auto ActorValue Property RightMobilityConditionAV Auto GlobalVariable Property gSystemsServosLower Auto GlobalVariable Property gSystemsServosUpper Auto GlobalVariable Property gSystemsTorso Auto GlobalVariable Property gSystemsSensors Auto GlobalVariable Property gSystemsCPU Auto EndGroup ;----------------------------------------------------------------------------------------------------------------------------- Actor rActor Int iBootup Int iDebugSetting InputEnableLayer ielInputLayer Float fCurrAbilityLevel Float fConditionHead Float fConditionPerception Float fConditionTorso Float fConditionLeftArm Float fConditionRightArm Float fConditionLeftLeg Float fConditionRightLeg Float fSystemsServosLower Float fSystemsServosUpper Float fSystemsTorso Float fSystemsSensors Float fSystemsCPU Float fSystemsServosLowerMax = 50.0 Float fSystemsServosUpperMax = 50.0 Float fSystemsTorsoMax = 50.0 Float fSystemsSensorsMax = 50.0 Float fSystemsCPUMax = 50.0 Int iSystemsMovementDisable = 5 Int iSystemsRunningDisable = 10 Int iSystemsJumpingDisable = 20 Int iSystemsSprintingDisable = 30 Int iSystemsFastTravelDisable = 40 Int iSystemsActivateDisable = 5 Int iSystemsJournalDisable = 10 Int iSystemsFightingDisable = 20 Int iSystemsLookingDisable = 10 Int iSystemsCamSwitchDisable = 5 Int iSystemsSneakingDisable = 25 Int iSystemsVATSDisable = 20 Float fFrequencyTimer = 1.5 Int iTimerID = 32 Int iIsSwimming ;----------------------------------------------------------------------------------------------------------------------------- Event OnInit() Init() EndEvent Event OnPlayerLoadGame() Init() EndEvent Function Init() rActor = Game.GetPlayer() RegisterForRemoteEvent(rActor, "OnDeath") StartTimer(fFrequencyTimer, iTimerID) ielInputLayer = InputEnableLayer.Create() EndFunction ;----------------------------------------------------------------------------------------------------------------------------- Event OnTimer(int aiTimerID) iDebugSetting = (gDebugSetting.GetValue()) as Int iBootup = (gBootup.GetValue()) as Int If (aiTimerID >= iTimerID) && (iBootup > 10) && (qMQ101.IsCompleted() == True) Int iTempSysValue Float fLubriCoolPerc = gLubriCoolPerc.GetValue() Float fCoreTempPerc = gCoreTempPerc.GetValue() Float fPowerPerc = gPowerPerc.GetValue() Float fSexPregPerc = ((gFPE_SexPregMonths.GetValue()) / 9) * 100 fConditionHead = rActor.GetValue(BrainConditionAV) as Float fConditionPerception = rActor.GetValue(PerceptionConditionAV) as Float fConditionTorso = rActor.GetValue(EnduranceConditionAV) as Float fConditionLeftArm = rActor.GetValue(LeftAttackConditionAV) as Float fConditionRightArm = rActor.GetValue(RightAttackConditionAV) as Float fConditionLeftLeg = rActor.GetValue(LeftMobilityConditionAV) as Float fConditionRightLeg = rActor.GetValue(RightMobilityConditionAV) as Float fSystemsServosLower = (fConditionLeftLeg + fConditionRightLeg) / 2 fSystemsServosUpper = (fConditionLeftArm + fConditionRightArm) / 2 fSystemsTorso = fConditionTorso fSystemsSensors = fConditionPerception fSystemsCPU = fConditionHead if (fSystemsServosLower < 1) fSystemsServosLower = 1 endif if (fSystemsServosUpper < 1) fSystemsServosUpper = 1 endif if (fSystemsTorso < 1) fSystemsTorso = 1 endif if (fSystemsSensors < 1) fSystemsSensors = 1 endif if (fSystemsCPU < 1) fSystemsCPU = 1 endif if (fSystemsServosLower > fSystemsServosLowerMax) fSystemsServosLower = fSystemsServosLowerMax endif if (fSystemsServosLower > fLubriCoolPerc) fSystemsServosLower = fLubriCoolPerc endif if (fSystemsServosUpper > fSystemsServosUpperMax) fSystemsServosUpper = fSystemsServosUpperMax endif if (fSystemsServosUpper > fLubriCoolPerc) fSystemsServosUpper = fLubriCoolPerc endif if (fSystemsTorso > fSystemsTorsoMax) fSystemsTorso = fSystemsTorsoMax endif if (fSystemsSensors > fSystemsSensorsMax) fSystemsSensors = fSystemsSensorsMax endif if (fSystemsCPU > fSystemsCPUMax) fSystemsCPU = fSystemsCPUMax endif ; *** Disabling Systems iTempSysValue = fSystemsServosLower as Int if (iTempSysValue < iSystemsMovementDisable) && (ielInputLayer.IsMovementEnabled()) ielInputLayer.EnableMovement(false) Debug.Notification("Lower Servos at " + iTempSysValue + "%, Basic Movement Disabled") endif if (iTempSysValue < iSystemsRunningDisable) && (ielInputLayer.IsRunningEnabled()) ielInputLayer.EnableRunning(false) Debug.Notification("Lower Servos at " + iTempSysValue + "%, High Speed Movement Disabled") endif if (iTempSysValue < iSystemsJumpingDisable) && (ielInputLayer.IsJumpingEnabled()) ielInputLayer.EnableJumping(false) Debug.Notification("Lower Servos at " + iTempSysValue + "%, Jumping Movement Disabled") endif if (iTempSysValue < iSystemsSprintingDisable) && (ielInputLayer.IsSprintingEnabled()) ielInputLayer.EnableSprinting(false) Debug.Notification("Lower Servos at " + iTempSysValue + "%, Overboost Movement Disabled") endif if (iTempSysValue < iSystemsFastTravelDisable) && (ielInputLayer.IsFastTravelEnabled()) ielInputLayer.EnableFastTravel(false) Debug.Notification("Lower Servos at " + iTempSysValue + "%, Long Distance Movement Disabled") endif iTempSysValue = fSystemsServosUpper as Int if (iTempSysValue < iSystemsJournalDisable) && (ielInputLayer.IsJournalEnabled()) ielInputLayer.EnableJournal(false) Debug.Notification("Upper Servos at " + iTempSysValue + "%, PIPBoy Operation Disabled") endif if (iTempSysValue < iSystemsActivateDisable) && (ielInputLayer.IsActivateEnabled()) ielInputLayer.EnableActivate(false) Debug.Notification("Upper Servos at " + iTempSysValue + "%, Arm Operation Reduced") endif if (iTempSysValue < iSystemsFightingDisable) && (ielInputLayer.IsFightingEnabled()) ielInputLayer.EnableFighting(false) Debug.Notification("Upper Servos at " + iTempSysValue + "%, Combat Systems Disabled") endif iTempSysValue = fSystemsSensors as Int if (iTempSysValue < iSystemsLookingDisable) && (ielInputLayer.IsLookingEnabled()) ielInputLayer.EnableLooking(false) Debug.Notification("Sensors at " + iTempSysValue + "%, Visual Systems Restricted") endif if (iTempSysValue < iSystemsCamSwitchDisable) && (ielInputLayer.IsCamSwitchEnabled()) ielInputLayer.EnableCamSwitch(false) Debug.Notification("Sensors at " + iTempSysValue + "%, Visual Systems Restricted") endif iTempSysValue = fSystemsCPU as Int if (iTempSysValue < iSystemsVATSDisable) && (ielInputLayer.IsVATSEnabled()) ielInputLayer.EnableVATS(false) Debug.Notification("CPU at " + iTempSysValue + "%, Targeting Systems Offline") endif if (iTempSysValue < iSystemsSneakingDisable) && (ielInputLayer.IsSneakingEnabled()) ielInputLayer.EnableSneaking(false) Debug.Notification("CPU at " + iTempSysValue + "%, Stealth Functions Offline") endif ; *** Enabling Systems iTempSysValue = fSystemsServosLower as Int if (iTempSysValue >= (iSystemsMovementDisable * 2)) && (!ielInputLayer.IsMovementEnabled()) ielInputLayer.EnableMovement(true) Debug.Notification("Lower Servos at " + iTempSysValue + "%, Basic Movement Restored") endif if (iTempSysValue >= (iSystemsRunningDisable * 2)) && (!ielInputLayer.IsRunningEnabled()) ielInputLayer.EnableRunning(true) Debug.Notification("Lower Servos at " + iTempSysValue + "%, High Speed Movement Restored") endif if (iTempSysValue >= (iSystemsJumpingDisable * 2)) && (!ielInputLayer.IsJumpingEnabled()) ielInputLayer.EnableJumping(true) Debug.Notification("Lower Servos at " + iTempSysValue + "%, Jumping Movement Restored") endif if (iTempSysValue >= (iSystemsSprintingDisable * 2)) && (!ielInputLayer.IsSprintingEnabled()) ielInputLayer.EnableSprinting(true) Debug.Notification("Lower Servos at " + iTempSysValue + "%, Overboost Movement Restored") endif if (iTempSysValue >= (iSystemsFastTravelDisable * 2)) && (!ielInputLayer.IsFastTravelEnabled()) ielInputLayer.EnableFastTravel(true) Debug.Notification("Lower Servos at " + iTempSysValue + "%, Long Distance Movement Restored") endif iTempSysValue = fSystemsServosUpper as Int if (iTempSysValue >= (iSystemsActivateDisable * 2)) && (!ielInputLayer.IsActivateEnabled()) ielInputLayer.EnableActivate(true) Debug.Notification("Upper Servos at " + iTempSysValue + "%, Arm Operation Restored") endif if (iTempSysValue >= (iSystemsJournalDisable * 2)) && (!ielInputLayer.IsJournalEnabled()) ielInputLayer.EnableJournal(true) Debug.Notification("Upper Servos at " + iTempSysValue + "%, PIPBoy Operation Restored") endif if (iTempSysValue >= (iSystemsFightingDisable * 2)) && (!ielInputLayer.IsFightingEnabled()) ielInputLayer.EnableFighting(true) Debug.Notification("Upper Servos at " + iTempSysValue + "%, Combat Systems Restored") endif iTempSysValue = fSystemsSensors as Int if (iTempSysValue >= (iSystemsLookingDisable * 2)) && (!ielInputLayer.IsLookingEnabled()) ielInputLayer.EnableLooking(true) Debug.Notification("Sensors at " + iTempSysValue + "%, Visual Systems Restored") endif if (iTempSysValue>= (iSystemsCamSwitchDisable * 2)) && (!ielInputLayer.IsCamSwitchEnabled()) Game.ForceFirstPerson() ielInputLayer.EnableCamSwitch(true) Debug.Notification("Sensors at " + iTempSysValue + "%, Visual Systems Restored") endif iTempSysValue = fSystemsCPU as Int if (iTempSysValue >= (iSystemsVATSDisable * 2)) && (!ielInputLayer.IsVATSEnabled()) ielInputLayer.EnableVATS(true) Debug.Notification("CPU at " + iTempSysValue + "%, Targeting Systems Restored") endif if (iTempSysValue >= (iSystemsSneakingDisable * 2)) && (!ielInputLayer.IsSneakingEnabled()) ielInputLayer.EnableSneaking(true) Debug.Notification("CPU at " + iTempSysValue + "%, Stealth Functions Restored") endif gSystemsServosLower.SetValue(fSystemsServosLower) gSystemsServosUpper.SetValue(fSystemsServosUpper) gSystemsTorso.SetValue(fSystemsTorso) gSystemsSensors.SetValue(fSystemsSensors) gSystemsCPU.SetValue(fSystemsCPU) iIsSwimming = 0 Endif ; (aiTimerID >= iTimerID) StartTimer(fFrequencyTimer, iTimerID) EndEvent ;----------------------------------------------------------------------------------------------------------------------------- Function DebugTraceMessage(String sMessage) Debug.Trace(sMessage) EndFunction ;----------------------------------------------------------------------------------------------------------------------------- Event Actor.OnDeath(Actor akSender, Actor akKiller) CancelTimer(iTimerID) UnregisterForAllEvents() EndEvent
Halstrom Posted April 5, 2018 Author Posted April 5, 2018 Hmm trying to convert my script to use EnablePlayerControls I just realised there's some weirdness, some stuff seems to be available using EnablePlayerControls and some isn't, can anyone confirm if this is correct or is it some typo error when copied over from Skyrim Wiki? Do EnableJumping and Enable Sprinting work? As far as I know Z key doesn't do anything? Quote Function Delete() Deletes this input enable layer and invalidates all script variables pointing at it. Function DisablePlayerControls(bool abMovement, bool abFighting, bool abCamSwitch, bool abLooking, bool abSneaking, bool abMenu, bool abActivate, bool abJournalTabs, bool abVATS, bool abFavorites, bool abRunning) Disables the specified player controls. Function EnableActivate(bool abEnable) Enables/disables activation. Function EnableCamSwitch(bool abEnable) Enables/disables camera switching (first to third person and vice-versa). Function EnableFastTravel(bool abEnable) Enables/disables fast travel. Function EnableFavorites(bool abEnable) Enables/disables favorites menu. Function EnableFighting(bool abEnable) Enables/disables the player's ability to fight. Function EnableJournal(bool abEnable) Enables/disables the journal. Function EnableJumping(bool abEnable) Enables/disables jumping. Function EnableLooking(bool abEnable) Enables/disables looking. Function EnableMenu(bool abEnable) Enables/disables menu access. Function EnableMovement(bool abEnable) Enables/disables player movement. Function EnablePlayerControls(bool abMovement, bool abFighting, bool abCamSwitch, bool abLooking, bool abSneaking, bool abMenu, bool abActivate, bool abJournalTabs, bool abVATS, bool abFavorites, bool abRunning) Enables the specified player controls. Function EnableRunning(bool abEnable) Enables/disables player running. Function EnableSneaking(bool abEnable) Enables/disables player sneaking. Function EnableSprinting(bool abEnable) Enables/disables player sprinting. Function EnableVATS(bool abEnable) Enables/disables vats. Function EnableZKey(bool abEnable) Enables/disables player z-key. bool Function IsActivateEnabled() Returns whether activation is enabled on this layer or not. bool Function IsCamSwitchEnabled() Returns whether camera switching is enabled on this layer or not. bool Function IsFastTravelEnabled() Returns whether fast travel is enabled on this layer or not. bool Function IsFavoritesEnabled() Returns whether the favorites menu is enabled on this layer or not. bool Function IsFightingEnabled() Returns whether player fighting is enabled on this layer or not. bool Function IsJournalEnabled() Returns whether journal access is enabled on this layer or not. bool Function IsJumpingEnabled() Returns whether jumping is enabled on this layer or not. bool Function IsLookingEnabled() Returns whether looking is enabled on this layer or not. bool Function IsMenuEnabled() Returns whether menu access is enabled on this layer or not. bool Function IsMovementEnabled() Returns whether movement is enabled on this layer or not. bool Function IsRunningEnabled() Returns whether running is enabled on this layer or not. bool Function IsSneakingEnabled() Returns whether sneaking is enabled on this layer or not. bool Function IsSprintingEnabled() Returns whether sprinting is enabled on this layer or not. bool Function IsVATSEnabled() Returns whether vats is enabled on this layer or not. bool Function IsZKeyEnabled() Returns whether z-key is enabled on this layer or not. https://www.creationkit.com/fallout4/index.php?title=DisablePlayerControls_-_InputEnableLayer
Halstrom Posted April 6, 2018 Author Posted April 6, 2018 Ah got it by the looks I had to create an input layer for each command: Scriptname SynthPlayer:Synth6Control extends ReferenceAlias {Deals with output systems based on system health and lubricant levels} Group Misc Quest Property qMQ101 Auto Const GlobalVariable Property gBootup Auto GlobalVariable Property gDebugSetting Auto GlobalVariable Property gSynthAbilityLevel Auto Const GlobalVariable Property gLubriCoolPerc Auto Const GlobalVariable Property gPowerPerc Auto Const GlobalVariable Property gCoreTempPerc Auto Const GlobalVariable Property gFPE_SexPregMonths Auto EndGroup Group SystemConditions ActorValue Property BrainConditionAV Auto ActorValue Property PerceptionConditionAV Auto ActorValue Property EnduranceConditionAV Auto ActorValue Property LeftAttackConditionAV Auto ActorValue Property LeftMobilityConditionAV Auto ActorValue Property RightAttackConditionAV Auto ActorValue Property RightMobilityConditionAV Auto GlobalVariable Property gSystemsServosLower Auto GlobalVariable Property gSystemsServosUpper Auto GlobalVariable Property gSystemsTorso Auto GlobalVariable Property gSystemsSensors Auto GlobalVariable Property gSystemsCPU Auto EndGroup ;----------------------------------------------------------------------------------------------------------------------------- Actor rActor Int iBootup Int iDebugSetting Float fCurrAbilityLevel Float fConditionHead Float fConditionPerception Float fConditionTorso Float fConditionLeftArm Float fConditionRightArm Float fConditionLeftLeg Float fConditionRightLeg Float fSystemsServosLower Float fSystemsServosUpper Float fSystemsTorso Float fSystemsSensors Float fSystemsCPU Int iSystemsMovementDisable = 5 Int iSystemsRunningDisable = 10 Int iSystemsJumpingDisable = 20 Int iSystemsSprintingDisable = 30 Int iSystemsFastTravelDisable = 40 Int iSystemsActivateDisable = 5 Int iSystemsJournalDisable = 10 Int iSystemsFightingDisable = 20 Int iSystemsLookingDisable = 10 Int iSystemsCamSwitchDisable = 5 Int iSystemsSneakingDisable = 25 Int iSystemsVATSDisable = 20 InputEnableLayer ielInputLayerMovement InputEnableLayer ielInputLayerRunning InputEnableLayer ielInputLayerSprinting InputEnableLayer ielInputLayerJumping InputEnableLayer ielInputLayerFastTravel InputEnableLayer ielInputLayerFighting InputEnableLayer ielInputLayerMenu InputEnableLayer ielInputLayerJournal InputEnableLayer ielInputLayerActivate InputEnableLayer ielInputLayerCamSwitch InputEnableLayer ielInputLayerLooking InputEnableLayer ielInputLayerSneaking InputEnableLayer ielInputLayerVATS InputEnableLayer ielInputLayerFavorites bool bCurrMovement = True bool bPrevMovement = True bool bCurrRunning = True bool bPrevRunning = True bool bCurrSprinting = True bool bPrevSprinting = True bool bCurrJumping = True bool bPrevJumping = True bool bCurrFastTravel = True bool bPrevFastTravel = True bool bCurrFighting = True bool bPrevFighting = True bool bCurrMenu = True bool bPrevMenu = True bool bCurrActivate = True bool bPrevActivate = True bool bCurrJournal = True bool bPrevJournal = True bool bCurrCamSwitch = True bool bPrevCamSwitch = True bool bCurrLooking = True bool bPrevLooking = True bool bCurrSneaking = True bool bPrevSneaking = True bool bCurrVATS = True bool bPrevVATS = True bool bCurrFavorites = True bool bPrevFavorites = True Float fFrequencyTimer = 1.5 Int iTimerID = 32 Int iIsSwimming ;----------------------------------------------------------------------------------------------------------------------------- Event OnInit() rActor = Game.GetPlayer() RegisterForRemoteEvent(rActor, "OnDeath") StartTimer(fFrequencyTimer, iTimerID) ielInputLayerMovement = InputEnableLayer.Create() ielInputLayerRunning = InputEnableLayer.Create() ielInputLayerSprinting = InputEnableLayer.Create() ielInputLayerJumping = InputEnableLayer.Create() ielInputLayerFastTravel = InputEnableLayer.Create() ielInputLayerFighting = InputEnableLayer.Create() ielInputLayerMenu = InputEnableLayer.Create() ielInputLayerJournal = InputEnableLayer.Create() ielInputLayerActivate = InputEnableLayer.Create() ielInputLayerCamSwitch = InputEnableLayer.Create() ielInputLayerLooking = InputEnableLayer.Create() ielInputLayerSneaking = InputEnableLayer.Create() ielInputLayerVATS = InputEnableLayer.Create() ielInputLayerFavorites = InputEnableLayer.Create() EndEvent ;Game.SetPlayerAIDriven() ;Game.SetPlayerRadioFrequency(50.45) ;Game.TurnPlayerRadioOn(false) ;Game.ShakeCamera(afStrength = 0.1) ;Actor randomActor = Game.FindRandomActor(0.0, 0.0, 0.0, 5.0) ;Actor closest = Game.FindClosestActor(0.0, 0.0, 0.0, 5.0) ;Game.FastTravel(HomeMarker) ;Game.FadeOutGame(false, true, 2.0, 1.0) ;----------------------------------------------------------------------------------------------------------------------------- Event OnTimer(int aiTimerID) iDebugSetting = (gDebugSetting.GetValue()) as Int iBootup = (gBootup.GetValue()) as Int If (aiTimerID >= iTimerID) && (iBootup > 10) && (qMQ101.IsCompleted() == True) Int iTempSysValue Float fLubriCoolPerc = gLubriCoolPerc.GetValue() Float fCoreTempPerc = gCoreTempPerc.GetValue() Float fPowerPerc = gPowerPerc.GetValue() Float fSexPregPerc = ((gFPE_SexPregMonths.GetValue()) / 9) * 100 fSystemsServosLower = gSystemsServosLower.GetValue() fSystemsServosUpper = gSystemsServosUpper.GetValue() fSystemsTorso = gSystemsTorso.GetValue() fSystemsSensors = gSystemsSensors.GetValue() fSystemsCPU = gSystemsCPU.GetValue() bCurrMovement = ielInputLayerMovement.IsMovementEnabled() bCurrRunning = ielInputLayerRunning.IsRunningEnabled() bCurrSprinting = ielInputLayerSprinting.IsSprintingEnabled() bCurrJumping = ielInputLayerJumping.IsJumpingEnabled() bCurrFastTravel = ielInputLayerFastTravel.IsFastTravelEnabled() bCurrJournal = ielInputLayerJournal.IsJournalEnabled() bCurrActivate = ielInputLayerActivate.IsActivateEnabled() bCurrFighting = ielInputLayerFighting.IsFightingEnabled() bCurrLooking = ielInputLayerLooking.IsLookingEnabled() bCurrCamSwitch = ielInputLayerCamSwitch.IsCamSwitchEnabled() bCurrVATS = ielInputLayerVATS.IsVATSEnabled() bCurrSneaking = ielInputLayerSneaking.IsSneakingEnabled() ; *** Disabling Systems iTempSysValue = fSystemsServosLower as Int if (iTempSysValue < iSystemsMovementDisable) && (bCurrMovement) ielInputLayerMovement.EnableMovement(false) Bool bTemp = ielInputLayerMovement.IsMovementEnabled() fnMessage("Lower Servos at " + iTempSysValue + "%, Basic Movement Disabled: " + bTemp) endif if (iTempSysValue < iSystemsRunningDisable) && (bCurrRunning) ielInputLayerRunning.EnableRunning(false) Bool bTemp = ielInputLayerRunning.IsRunningEnabled() fnMessage("Lower Servos at " + iTempSysValue + "%, High Speed Movement Disabled: " + bTemp) endif if (iTempSysValue < iSystemsJumpingDisable) && (bCurrJumping) ielInputLayerJumping.EnableJumping(false) Bool bTemp = ielInputLayerJumping.IsJumpingEnabled() fnMessage("Lower Servos at " + iTempSysValue + "%, Jumping Movement Disabled: " + bTemp) endif if (iTempSysValue < iSystemsSprintingDisable) && (bCurrSprinting) ielInputLayerSprinting.EnableSprinting(false) Bool bTemp = ielInputLayerSprinting.IsSprintingEnabled() fnMessage("Lower Servos at " + iTempSysValue + "%, Overboost Movement Disabled: " + bTemp) endif if (iTempSysValue < iSystemsFastTravelDisable) && (bCurrFastTravel) ielInputLayerFastTravel.EnableFastTravel(false) Bool bTemp = ielInputLayerFastTravel.IsFastTravelEnabled() fnMessage("Lower Servos at " + iTempSysValue + "%, Long Distance Movement Disabled: " + bTemp) endif iTempSysValue = fSystemsServosUpper as Int if (iTempSysValue < iSystemsJournalDisable) && (bCurrJournal) ielInputLayerJournal.EnableJournal(false) Bool bTemp = ielInputLayerJournal.IsJournalEnabled() fnMessage("Upper Servos at " + iTempSysValue + "%, PIPBoy Operation Disabled: " + bTemp) endif if (iTempSysValue < iSystemsActivateDisable) && (bCurrActivate) ielInputLayerActivate.EnableActivate(false) Bool bTemp = ielInputLayerActivate.IsActivateEnabled() fnMessage("Upper Servos at " + iTempSysValue + "%, Arm Operation Reduced: " + bTemp) endif if (iTempSysValue < iSystemsFightingDisable) && (bCurrFighting) ielInputLayerFighting.EnableFighting(false) Bool bTemp = ielInputLayerFighting.IsFightingEnabled() fnMessage("Upper Servos at " + iTempSysValue + "%, Combat Systems Disabled: " + bTemp) endif iTempSysValue = fSystemsSensors as Int if (iTempSysValue < iSystemsLookingDisable) && (bCurrLooking) ielInputLayerLooking.EnableLooking(false) Bool bTemp = ielInputLayerLooking.IsLookingEnabled() fnMessage("Sensors at " + iTempSysValue + "%, Visual Systems Restricted: " + bTemp) endif if (iTempSysValue < iSystemsCamSwitchDisable) && (bCurrCamSwitch) Game.ForceFirstPerson() ielInputLayerCamSwitch.EnableCamSwitch(false) Bool bTemp = ielInputLayerCamSwitch.IsCamSwitchEnabled() fnMessage("Sensors at " + iTempSysValue + "%, Visual Systems Restricted: " + bTemp) endif iTempSysValue = fSystemsCPU as Int if (iTempSysValue < iSystemsVATSDisable) && (bCurrVATS) ielInputLayerVATS.EnableVATS(false) Bool bTemp = ielInputLayerVATS.IsVATSEnabled() fnMessage("CPU at " + iTempSysValue + "%, Targeting Systems Offline: " + bTemp) endif if (iTempSysValue < iSystemsSneakingDisable) && (bCurrSneaking) ielInputLayerSneaking.EnableSneaking(false) Bool bTemp = ielInputLayerSneaking.IsSneakingEnabled() fnMessage("CPU at " + iTempSysValue + "%, Stealth Functions Offline: " + bTemp) endif ; *** Enabling Systems iTempSysValue = fSystemsServosLower as Int if (iTempSysValue >= (iSystemsMovementDisable * 2)) && (!bCurrMovement) ielInputLayerMovement.EnableMovement(true) Bool bTemp = ielInputLayerMovement.IsMovementEnabled() fnMessage("Lower Servos at " + iTempSysValue + "%, Basic Movement Restored: " + bTemp) endif if (iTempSysValue >= (iSystemsRunningDisable * 2)) && (!bCurrRunning) ielInputLayerRunning.EnableRunning(true) Bool bTemp = ielInputLayerRunning.IsRunningEnabled() fnMessage("Lower Servos at " + iTempSysValue + "%, High Speed Movement Restored: " + bTemp) endif if (iTempSysValue >= (iSystemsJumpingDisable * 2)) && (!bCurrJumping) ielInputLayerJumping.EnableJumping(true) Bool bTemp = ielInputLayerJumping.IsJumpingEnabled() fnMessage("Lower Servos at " + iTempSysValue + "%, Jumping Movement Restored: " + bTemp) endif if (iTempSysValue >= (iSystemsSprintingDisable * 2)) && (!bCurrSprinting) ielInputLayerSprinting.EnableSprinting(true) Bool bTemp = ielInputLayerSprinting.IsSprintingEnabled() fnMessage("Lower Servos at " + iTempSysValue + "%, Overboost Movement Restored: " + bTemp) endif if (iTempSysValue >= (iSystemsFastTravelDisable * 2)) && (!bCurrFastTravel) ielInputLayerFastTravel.EnableFastTravel(true) Bool bTemp = ielInputLayerFastTravel.IsFastTravelEnabled() fnMessage("Lower Servos at " + iTempSysValue + "%, Long Distance Movement Restored: " + bTemp) endif iTempSysValue = fSystemsServosUpper as Int if (iTempSysValue >= (iSystemsActivateDisable * 2)) && (!bCurrActivate) ielInputLayerActivate.EnableActivate(true) Bool bTemp = ielInputLayerActivate.IsActivateEnabled() fnMessage("Upper Servos at " + iTempSysValue + "%, Arm Operation Restored: " + bTemp) endif if (iTempSysValue >= (iSystemsJournalDisable * 2)) && (!bCurrJournal) ielInputLayerJournal.EnableJournal(true) Bool bTemp = ielInputLayerJournal.IsJournalEnabled() fnMessage("Upper Servos at " + iTempSysValue + "%, PIPBoy Operation Restored: " + bTemp) endif if (iTempSysValue >= (iSystemsFightingDisable * 2)) && (!bCurrFighting) ielInputLayerFighting.EnableFighting(true) Bool bTemp = ielInputLayerFighting.IsFightingEnabled() fnMessage("Upper Servos at " + iTempSysValue + "%, Combat Systems Restored: " + bTemp) endif iTempSysValue = fSystemsSensors as Int if (iTempSysValue >= (iSystemsLookingDisable * 2)) && (!bCurrLooking) ielInputLayerLooking.EnableLooking(true) Bool bTemp = ielInputLayerLooking.IsLookingEnabled() fnMessage("Sensors at " + iTempSysValue + "%, Visual Systems Restored: " + bTemp) endif if (iTempSysValue>= (iSystemsCamSwitchDisable * 2)) && (!bCurrCamSwitch) ielInputLayerCamSwitch.EnableCamSwitch(true) Bool bTemp = ielInputLayerCamSwitch.IsCamSwitchEnabled() fnMessage("Sensors at " + iTempSysValue + "%, Visual Systems Restored: " + bTemp) endif iTempSysValue = fSystemsCPU as Int if (iTempSysValue >= (iSystemsVATSDisable * 2)) && (!bCurrVATS) ielInputLayerVATS.EnableVATS(true) Bool bTemp = ielInputLayerVATS.IsVATSEnabled() fnMessage("CPU at " + iTempSysValue + "%, Targeting Systems Restored: " + bTemp) endif if (iTempSysValue >= (iSystemsSneakingDisable * 2)) && (!bCurrSneaking) ielInputLayerSneaking.EnableSneaking(true) Bool bTemp = ielInputLayerSneaking.IsSneakingEnabled() fnMessage("CPU at " + iTempSysValue + "%, Stealth Functions Restored: " + bTemp) endif iIsSwimming = 0 Endif ; (aiTimerID >= iTimerID) StartTimer(fFrequencyTimer, iTimerID) EndEvent ;----------------------------------------------------------------------------------------------------------------------------- Function fnMessage(String sMessage) Debug.Notification(sMessage) Debug.Trace(sMessage) EndFunction ;----------------------------------------------------------------------------------------------------------------------------- Event Actor.OnDeath(Actor akSender, Actor akKiller) CancelTimer(iTimerID) UnregisterForAllEvents() EndEvent
Recommended Posts
Archived
This topic is now archived and is closed to further replies.