Jump to content

[LE] function OnPlayerFastTravelEnd(Float afTravelGameTimeHours) SSE similar function for LE?


MariosB

Recommended Posts

This is how I do it in one of my mods. It's not perfect because it won't trigger if a script is causing the player to fast travel, only when the player fast travels from the map menu. This one also listens for the loading menu. Maybe doing something like this in conjunction with OnLocationChange as Sphered suggested will get it done. Requires SKSE.

Actor Property pPlayerRef Auto
Cell CurrentCell
 
Event OnInit()
    RegisterforMenu("MapMenu")
    RegisterForMenu("Loading Menu")
EndEvent  
 
Event OnMenuOpen(String menuName)
    if menuName == "MapMenu"
        CurrentCell = pPlayerRef.GetParentCell()
    Endif
EndEvent
 
Event OnMenuClose(String menuName)
    Utility.Wait(1)
    if menuName == "MapMenu"
        If pPlayerRef.GetParentCell() != CurrentCell
            SendModEvent("SCC_OnFastTravelEvent")
        Endif
 
    Elseif menuName == "Loading Menu"
        SendModEvent("SCC_OnLoadMenuExitEvent")
    Endif
EndEvent
  • Like 1
Link to comment
Share on other sites

  • Recently Browsing   0 members

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