Detect If Current Cell Is Wilderness Cell

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search


Tools used in this tutorial

Required


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:

  1. If the CellName is "Anvil" it will return true for cells "AnvilBenirusMansion" and "AnvilCastleBarracks".
  2. If the CellName is "AnvilCastle" it will return false for "AnvilBenirusMansion" and true for "AnvilCastleBarracks"
  3. 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

  1. Create a dummy interior cell.
  2. For the EditorID, use the desired CellName.

Notes[edit | edit source]

  • You can check for Wilderness cells by using the CellName/EditorID "Wilderne"