Difference between revisions of "IsPlayerMovingIntoNewSpace"
imported>Maturin |
imported>Vagrant0 |
||
(3 intermediate revisions by 3 users not shown) | |||
Line 7: | Line 7: | ||
This function returns true when the player is in the middle of loading into a new cell or fast travelling -- so if you put | 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 Skingrad or into interiors. | as a condition on the NPC's follow package, he reevaluates ''during'' the load and won't follow the player outside of Skingrad or into interiors. | ||
==Notes== | |||
* If used with scripting may only work within a [[MenuMode]], [[OnLoad]] or similar block due to only returning 1 while the load screen is displayed. | |||
* Some caution should be used within a [[MenuMode]] block, may cause some scripting to be used when not actually in game, such as the main menu when used within a constantly running quest script. <needs to be verified> | |||
[[Category: Functions]] | [[Category: Functions]] | ||
[[Category:Functions (CS)]] | |||
[[Category: Functions (CS 1.0)]] | |||
[[Category: Player Functions]] | [[Category: Player Functions]] | ||
[[Category: Player Functions (CS 1.0)]] | |||
[[Category: Condition Functions]] | [[Category: Condition Functions]] | ||
<!-- Begin Search Terms | |||
Is | |||
Player | |||
Moving | |||
Into | |||
New | |||
Space | |||
End Search Terms --> |
Latest revision as of 03:38, 8 August 2009
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 Skingrad. Trouble is, followers get moved before the player arrives, so they don't reevaluate that the target is in an interior or outside of Skingrad 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 Skingrad or into interiors.
Notes[edit | edit source]
- If used with scripting may only work within a MenuMode, OnLoad or similar block due to only returning 1 while the load screen is displayed.
- Some caution should be used within a MenuMode block, may cause some scripting to be used when not actually in game, such as the main menu when used within a constantly running quest script. <needs to be verified>