Jump to content

[LE] Cannot disable fast traveling or player controls


Musjes

Recommended Posts

I'm working on a mod where at some point I have to disable player controls and fast traveling, like so:

 

Game.DisablePlayerControls(false, true, false, false, true, false, true, false, 0)
Game.EnableFastTravel(false)

However I found out that this doesn't work. I tried to disable fast traveling by other means, i.e. through the console, or by using the settings in mods like Frostfall. None of them have any effect.

This is a relatively new playthrough, and I remember having similar issues in previous playthroughs with another mod that tried to disable player controls.

 

So there are several mods in my game that mess with fast traveling and player controls, so I could understand if player controls got enabled or disabled unexpectedly from time to time. But what I don;t get is how these are forcibly enabled all the time, even after disabling them manually through the console or Papyrus. Any ideas what can be causing this?

 

Link to comment
Share on other sites

1) Maybe next script is useful to aim your goal. No guarentee of working.. Using of "Debug.Notification()" is for screen information only, it will be anoying a lot.

xyzFastTravelTestScript

 

Scriptname xyzFastTravelTestScript extends Quest
; https://forums.nexusmods.com/index.php?/topic/7256286-cannot-disable-fast-traveling-or-player-controls/

  Bool bEnableFastTravel = False        ; You want to disable FastTravel!
  Int  iCounter          = 0

; -- FUNCTION --

;------------------------------------
FUNCTION myF_SetFastTravel(Bool bSet)  ; call it from other scripts
;------------------------------------
; TRUE, enable FastTravel
; False, disable FastTravel

    bEnableFastTravel = bSet
    iCounter = 0
ENDFUNCTION

; -- EVENTs -- 2

EVENT OnInit()
    RegisterForSingleUpdate(0.0)        ; first call here
ENDEVENT

EVENT OnUpdate()
    bool bOK = Game.IsFastTravelControlsEnabled()    ; Can the player fast travel from here?
    ; https://www.creationkit.com/index.php?title=IsFastTravelControlsEnabled_-_Game

    IF ( bOK )
        Debug.Notification("FastTravel controls are enabled..")
    ELSE
          Debug.Notification("Scripts have disabled FastTravel!")
    ENDIF

    IF Game.IsFastTravelEnabled()
        IF ( !bEnableFastTravel )
            Game.EnableFastTravel(False)                ; disable fast travel by script
            iCounter += 1
            Debug.Notification("FastTravel disabled! " +iCounter)
        ENDIF
    ELSE
        IF ( bEnableFastTravel )
            Game.EnableFastTravel(TRUE)                 ; enable fast travel by script
            iCounter += 1
            Debug.Notification("FastTravel enabled. " +iCounter)
        ENDIF        
    ENDIF

    RegisterForSingleUpdate(1.0)        ; call this event again in a second (as long as you wish)
ENDEVENT

 

 

 

2) A second way to disable fasttravel is a permanent magiceffect of life drain. I found here https://www.creationkit.com/index.php?title=Settings

the game string setting "sFastTravelNoTravelHealthDamage" = You can't fast travel while taking health damage. That means if player is loosing health, he cannot fast travel.

 

Every second 1 damage point, and every 10 second +10 points of healing. So the player is loosing health, but cannot die by this effect.

 

3) Maybe next control is also involved to fasttravel (on/off)?

https://www.creationkit.com/index.php?title=IsMenuControlsEnabled_-_Game

; Can the player use the menu?
if Game.IsMenuControlsEnabled()
  Debug.Trace("Player can use the menu!")
endIf

https://www.creationkit.com/index.php?title=EnableFastTravel_-_Game

; "Fast travel is reenabled automatically when the player is moved via MoveTo() or SetPosition()"

https://www.creationkit.com/index.php?title=IsFastTravelEnabled_-_Game

; Can the player fast travel from here?
if Game.IsFastTravelEnabled()
  Debug.Trace("Player can fast travel!")
else
  Debug.Trace("Fast travel is not allowed!")
endIf
Edited by ReDragon2013
Link to comment
Share on other sites

Thanks, that script gave me an idea. So I disable fast travel, then I monitor if fast traveling is enabled at 0.5 second intervals. Typically fast travel will be disabled immediately after I call the function to disable it, but it gets re-enabled about 1 second later. Even stranger, sometimes it will show up as disabled again for a moment even though I didn't make a call to do this. It looks like this (0=FT disabled, 1=FT enabled, 0.5 second interval)

 

0

1 <- immediately before this check, I call EnableFastTravel(false)

1

1

0

0

1

0

0

0

0

1

0

etc

 

So it is almost like there's a script that checks if FT is enabled, remembers that state and enables FT, then restores it to the previously recorded state. I don't know of any mod where it would make sense to do this.

Also I do not have this issue in new games, but after a while it always manifests itself. If I don't disable FT in a script or console, the above script will always report FT as enabled.

 

I searched the scripts for FT enabling but found no relevant entries. Of course many mods have scripts in a bsa file or dont even include the sources.

So I am kind of stuck... I'm just hoping that someone else has the same behaviour and might have figured out what mod is causing it.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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