Difference between revisions of "IsInSameCurrentLocAsRef"

960 bytes added ,  22:31, 1 December 2021
no edit summary
imported>Scornett-Bot
m (Script running global find and replace: = for '''=)
 
Line 8: Line 8:
Usually you will be supplying a keyword that helps define the "range" of the location you are looking at, above the particular immediate location the reference is placed. For example, are these two references in the same dungeon, or town, or Hold, rather than are these two reference in the same house, or room.
Usually you will be supplying a keyword that helps define the "range" of the location you are looking at, above the particular immediate location the reference is placed. For example, are these two references in the same dungeon, or town, or Hold, rather than are these two reference in the same house, or room.


''Note: When used as a condition when filling Location Alias, it will be filled with a location having the keyword type and that is (or is the parent location of) the parameter reference's current location.''
===When used to fill a Location Alias===
 
When you use <code>IsInSameCurrentLocAsRef</code> to fill a Location Alias, the game will first find the parent location of <code>OtherRef</code> that has the specified keyword. It will then select a Location at random ''within that parent Location'', regardless of whether <code>OtherRef</code> is currently in the selected Location. To emphasize, '''<code>OtherRef</code> might not be in the selected Location or one of its children at all'''.
 
For example, if you fill an alias using <code>IsInSameCurrentLocAsRef PlayerRef LocTypeHold</code> while the player is standing in Candlehearth Hall in Eastmarch, this will select a location ''within Eastmarch hold'', but it will not necessarily select ''the hold itself''. It may even select a Location that has ''no other parent Location in common'' with the player other than Eastmarch hold. It could select a Location in Darkwater Crossing or in Kynesgrove, even though the player is standing in Windhelm. Using this example, if you want to force selection of the player's current hold, you must also use [[LocationHasKeyword]] as one of the conditions on the Location Alias.


==Syntax==
==Syntax==
56

edits