Jump to content

Script Question


Tyrant99

Recommended Posts

Posted

Fallout4 has:

Function RegisterForPlayerTeleport() native Link

 

SSE 1.5.3 has:

Event OnPlayerFastTravelEnd(float afTravelGameTimeHours) Link

 

Both of these can register for Fast Travel, but I can't seem to find a similar function available for regular Skyrim. Also came up blank perusing SKSE functions.

 

Is there any way to register for Fast Travel events in regular Skyrim similar to above?

Posted

I am not aware of this function for Oldrim.

The way it is usually done is by checking the cell change event.

 

But it is not a very good solution.

Posted
47 minutes ago, CPU said:

I am not aware of this function for Oldrim.

The way it is usually done is by checking the cell change event.

 

But it is not a very good solution.

Thanks for the reply, too bad basic Skyrim can't handle it.

 

I was trying to temporarily disable a feature that is on a RegisterForSingleUpdateGameTime loop so it wouldn't fire after a Fast Travel event.

 

The idea would be to maybe have it toggle a Global Variable after registering a Fast Travel event:

 

Function JustFastTraveled()

GlobalJustFastTraveled.SetValueInt(1)

Utility.Wait(15)

GlobalJustFastTraveled.SetValueInt(0)

EndFunction

 

Then the Event on Game Time would just return

If GlobalJustFastTraveled.GetValueInt() == 1

  return

Else

 Do Stuff

 

Something like this, Cell Change doesn't quite work for me.

 

I'm wondering if the SKSE:

 

RegisterForMenu("MapMenu")

 

Event OnMenuOpen(String MenuName)

If MenuName == "MapMenu"

JustFastTraveled()

EndIf

EndEvent

 

So I would treat it as if the Player Fast Traveled whether they did or not whenever they open the Map, and presumably this would catch actual Fast Travel events and as Utility.Wait() I believe does not count Menu Modes, it should be unaffected by Fast Travel time while toggling the Global Variable to temporarily shut down my function?

 

Maybe this would be a good compromise? I'd have to test it out... Does it seem plausible?

 

Posted

You still need to - at least - check if the cell was changed.

Not a big deal to do, but you need to do it.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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