How do I detect a Fast Travel cell change via script?

Post » Fri Nov 18, 2011 11:31 pm

My first thought was to watch for a Loading screen via MenuMode 1007, however...

I swear I'm not doing anything wrong, but I can't get MenuMode 1007 to trigger. I've tried its own block like:
Begin MenuMode 1007printc "Loading"End

and as an if statement within a basic menu block:
Begin Menumodeif MenuMode 1007printc "Loading"endifEnd

But neither ever prints to the console.

Aside from this, I'm watching for a cell change for the player. If the old cell and the new cell are both outdoors, then it just falls to if the player had to load to make the cell change or not, right? Which goes back to the issue I'm having with MenuMode. My current kludge is tor ecord the player's X/Y every time the cell changes, and if either is a large distance from the old value, assume it was via fast travel, but this is obviously flawed.

Queue
User avatar
Alexandra Ryan
 
Posts: 3438
Joined: Mon Jul 31, 2006 9:01 am

Post » Fri Nov 18, 2011 3:18 pm

I'd recommend using http://geck.gamesas.com/index.php/GetInSameCell, using a marker of your own to check if it's in the same cell as the player. If it isn't, then the player has changed cells and you should move your marker to them.

Cipscis
User avatar
Rebecca Clare Smith
 
Posts: 3508
Joined: Fri Aug 04, 2006 4:13 pm

Post » Fri Nov 18, 2011 9:41 pm

That only checks if the player has changed cells though, not whether he's now just in the adjacent outdoor cell or across the worldspace due to fast travel, and the same can be accomplished just by keeping track of player.GetParentCell, or am I missing something?

Is there some way to get a list of the 8 cell refs adjacent to the current outdoor cell, or to check if cell A is connected to cell B? I guess one could use your approach of leaving a marker and then ref walk with a 1 cell radius to check for the marker after cell change, then move the marker to the player regardless...

Queue

Edit - Oh, I wonder what happens if you ref walk with type 57 (Cell) specified... if it just returns your current cell and the 8 surrounding it, you could compare them to your last known player.GetParentCell and check for a match, and if none, assume fast travel. I'll need to try that later.
User avatar
Alexx Peace
 
Posts: 3432
Joined: Thu Jul 20, 2006 5:55 pm


Return to Fallout: New Vegas