IsPlayerMovingIntoNewSpace

From the Fallout3 GECK Wiki
Revision as of 12:08, 12 August 2009 by imported>Geckbot (Robot: Automated text replacement (-\[\[Category:(.*?)Functions\]\] +Category:\1Functions\nCategory:\1Functions (GECK 1.0)))
Jump to navigation Jump to search

Returns 1 if the player is in the process of moving into a new space, i.e. fast traveling or moving through a load door.


The use of this function is a bit arcane, but you probably want to put it on any follow package which is conditionalized by the player's location. Say you have an NPC whose follow package on the player is conditionalized to not go into interiors or outside of Megaton. Trouble is, followers get moved before the player arrives, so they don't reevaluate that the target is in an interior or outside of Megaton until they and the player are already there -- so you'd get the NPC fast traveling with you, and then walking all the way back to Skingrad from whereever you happened to go.


This function returns true when the player is in the middle of loading into a new cell or fast travelling -- so if you put


	IsPlayerMovingIntoNewSpace == 0


as a condition on the NPC's follow package, he reevaluates during the load and won't follow the player outside of Megaton or into interiors.