Difference between revisions of "Detect If Current Cell Is Wilderness Cell"
Jump to navigation
Jump to search
Detect If Current Cell Is Wilderness Cell (edit)
Revision as of 14:05, 15 March 2008
, 14:05, 15 March 2008Going to do some tests
imported>Haama (Moved to Discussion) |
imported>Haama (Going to do some tests) |
||
Line 1: | Line 1: | ||
{{Unfinished}} | |||
If you want to detect if an actor is in a set of cells you need to use [[GetInCell]], [[GetInCellParam]], or [[GetInWorldspace]]. Basically, each function takes two flags: ''ActorID'' and ''CellName''. The function will return true (1) if the referenced ''ActorID'' is in a cell whose EditorID (name) includes the name in ''CellName''. Some examples: | |||
#If the ''CellName'' is "Anvil" it will return true for cells "AnvilBenirusMansion" and "AnvilCastleBarrakcs". | |||
#If the ''CellName'' is "AnvilCastle" it will return false for "AnvilBenirusMansion" and true for "AnvilCastleBarracks" | |||
#If the ''CellName'' is "MagesGuild" it will return true for the Mages Guilds (i.e., "CheydinhalMagesGuild", "AnvilMagesGuild"). | |||
#*That doesn't include the Arcane University as "MagesGuild" is not part of the cell's name (i.e., "ICArcaneUniversityAlchemyHeadquarters", "ICArcaneUniversitySpellMaker"). Instead, use "ICArcaneUniversity" for the ''CellName''. | |||
Good cell names should be broad enough to cover every cell you want to check, but not so broad that every cell is included. | |||
*For instance, when checking for Oblivion cells "Ob" would be too short and would return true for '''RobbersGlenCave'''. Instead, use "Oblivion". | |||
The ''CellName'' flag is a bit unusual - it requires that you create a cell with the name you wish to search for. To do so | |||
#Create a [[Creating_a_New_Cell|dummy interior cell]]. | |||
#For the EditorID, use the desired ''CellName''. | |||
==Notes== | |||
*You can check for Wilderness cells by using the ''CellName''/EditorID "Wilderne" | |||
[[Category:Standardized Snippets]] | |||
[[Category:Scripting Tutorials]] |