Would anyone who knows anything about coding or Papyrus be able to check the following script and see if the game can actually use it to do what I want to do? I'm not sure if I understand everything fully.
Scriptname DynamicWalkSpeed extends ObjectReference;every time cell loads, script activatesEvent OnCellLoad();default stateauto state Default Game.GetPlayer().ModActorValue("SpeedMult", 1) if Game.GetPlayer().IsRunning() GotoState("Run") elseif Game.GetPlayer().IsSprinting() GotoState("Sprint") else GotoState("Walk") endifendState;special state that activates when player IsRunning from the Default statestate Run Game.GetPlayer().ModActorValue("SpeedMult", 1) GotoState("Default")endState;special state that activates when player IsSprinting from the Default statestate Sprint Game.GetPlayer().ModActorValue("SpeedMult", 1) GotoState("Default")endState;special state that activates when player is walking. Then, it checks what the skymode is, and changes SpeedMult depending on that mode. If player runs or sprints while in the walk state, it reverts back to the default state.state Walk if Weather.GetSkyMode() == 1 Game.GetPlayer().ModActorValue("SpeedMult", 1.75) elseif Weather.GetSkyMode() == 2 Game.GetPlayer().ModActorValue("SpeedMult", 2) elseif Weather.GetSkyMode() == 3 Game.GetPlayer().ModActorValue("SpeedMult", 2.5) endif if Game.GetPlayer().IsRunning() GotoState("Default") elseif Game.GetPlayer().IsSprinting() GotoState("Default") endifendStateGotoState("Default")endEventThere's also an issue of how I get the game to actually use this script. So far, the Wiki appears to only cover how to attatch scripts to objects. What if I want a script to happen all the time? What do I do to get the script to "start" once I'm in game?


