Fast travel Event

Post » Wed Jun 20, 2012 11:43 am

Hi, i'm trying to catch when a player fast-travels with a script. I can't find nothing like the RegisterForSleep()/OnSleepStart(). It doesn't exists, or i've missed it?
User avatar
Rebekah Rebekah Nicole
 
Posts: 3477
Joined: Fri Oct 13, 2006 8:47 pm

Post » Wed Jun 20, 2012 12:25 pm

well OnCellLoad would trigger whenever a cell loads, but they're loading and unloading all the time, even when running around.

Does the player get an OnInit event after the loading screen? That might be a good event to use...you could store the previous cell's Indoor/outdoor status, and if the player is doing a loading screen from one outdoor cell to another, he is either fast travelling, using a horse cart, or going through a city gate. What you probably want is to save the game time periodically and check for big jumps where the time jumps forward much further than an ordinary loading screen time jump.
User avatar
Lilit Ager
 
Posts: 3444
Joined: Thu Nov 23, 2006 9:06 pm

Post » Wed Jun 20, 2012 11:22 am

http://www.creationkit.com/Events

There is most certainly events for sleeping, though I doubt they would trigger for fast travel. You could try http://www.creationkit.com/OnLocationChange_-_Actor. I haven't played around with it and can't say when it does or doesn't fire.
User avatar
Lori Joe
 
Posts: 3539
Joined: Tue Jun 20, 2006 6:10 am

Post » Wed Jun 20, 2012 9:14 am

Maybe you could keep track of the game hour in an OnUpdate() event. If the game hour has a sudden change between updates, then the cause was probably one of three things:

1. Sleep
2. Wait
3. Fast travel

You could use GetParentCell() in the OnUpdate() in order to see whether or not the player really moved somewhere. May be a good idea to check the time difference against the timescale global variable too.
User avatar
Juanita Hernandez
 
Posts: 3269
Joined: Sat Jan 06, 2007 10:36 am

Post » Wed Jun 20, 2012 5:21 pm

I think tracking the time will be the best solution. I'll try that way.
Thank you for your help ;)
User avatar
RaeAnne
 
Posts: 3427
Joined: Sat Jun 24, 2006 6:40 pm


Return to V - Skyrim