Difference between revisions of "Talk:Detect If Current Cell Is Wilderness Cell"

Original Discussion
imported>Scruggs
(yes, it works)
imported>Haama
(Original Discussion)
Line 5: Line 5:


:: Yeah, it works. Vanilla scripts use the same approach - there are cells named "IC" and whatnot that can be tested against in exterior cells to find out if the player's in the Imperial City. [[User:Scruggs|Scruggs]] 11:50, 15 March 2008 (EDT)
:: Yeah, it works. Vanilla scripts use the same approach - there are cells named "IC" and whatnot that can be tested against in exterior cells to find out if the player's in the Imperial City. [[User:Scruggs|Scruggs]] 11:50, 15 March 2008 (EDT)
== Original Discussion ==
== Get In Wilderness? ==
[[User:DragoonWraith|<font face="Oblivion,Daedric Runes" size=3>D</font>ragoon <font face="Oblivion,Daedric" size=3>W</font>raith]] [[User_talk:DragoonWraith|<font face="Oblivion,Daedric" size=2>TALK</font>]] 18:49, 22 July 2006 (EDT): Is there any way to determine if an object is in a "Wilderness" cell, that is, not in a named cell, short of making sure he's in any of the named cells? I really don't feel like checking for every cell other than the one I want to make sure he's in one of the outside cells, and besides, that won't work with mods that change cells from Wilderness cells to actual places (like Frostcrag or something). I'd appreciate help here.
:I'm guessing
<pre>player.getincell wilderness</pre>
:doesn't work? [[User:Treleth|Treleth]] 21:24, 22 July 2006 (EDT)
::[[User:DragoonWraith|<font face="Oblivion,Daedric Runes" size=3>D</font>ragoon <font face="Oblivion,Daedric" size=3>W</font>raith]] [[User_talk:DragoonWraith|<font face="Oblivion,Daedric" size=2>TALK</font>]] 22:10, 22 July 2006 (EDT): No, it doesn't, because [[GetInCell]] only works for interiors.
:::[[User:ShadowDancer|ShadowDancer]] 22:25, 22 July 2006 (EDT): K, so do you mean he is outside of one of the towns and not in a dungeon?  If you are looking to make sure that he is not "in an interior" the scripting is as follows:
<pre>
Begin GameMode
  If XXX.GetInWorldSpace Tamriel == 1
      **Whatever coding**
  EndIf
End
</pre>
:::Or you can do whatever if the condition is checked ''!= 1'' as the case may be depending on what you are trying to do.  Hope that helps.  It will also return false if the object you are checking is in one of the ''City Worlds'' or ''Oblivion Worlds''.  If you are just looking to find out if they are in a cell named ''Wilderness'', then I don't have a clue other than checking every other named cell.
::::[[User:DragoonWraith|<font face="Oblivion,Daedric Runes" size=3>D</font>ragoon <font face="Oblivion,Daedric" size=3>W</font>raith]] [[User_talk:DragoonWraith|<font face="Oblivion,Daedric" size=2>TALK</font>]] 00:33, 23 July 2006 (EDT): Well, no, because there are places with their own names that don't have their own worldspaces, so that doesn't really do me much good... Ah, well, never mind, I won't bother trying to do it then. Wasn't that important.
:::::[[User:ShadowDancer|ShadowDancer]] 10:08, 23 July 2006 (EDT): Have you tried [[GetInCellParam]]?  I haven't ever tried it so I don't know if it will work or not, but it doesn't say that it only works on interior cells.  If it works on exterior cells, it should work fine as long as you are checking against an actor or the player.
::::::[[User:DragoonWraith|<font face="Oblivion,Daedric Runes" size=3>D</font>ragoon <font face="Oblivion,Daedric" size=3>W</font>raith]] [[User_talk:DragoonWraith|<font face="Oblivion,Daedric" size=2>TALK</font>]] 12:00, 23 July 2006 (EDT): Haven't tried it, but "same functionality as GetInCell" reads to me to mean that it has the exact same workings, i.e. same limitations. Maybe I'll test it later - at the moment, I have no need for it, as I've figured out a better way to do it anyway.
:::::::[[User:Sarkandar|Sarkandar]] 19 October 2006: Of course months later, but a solution for this is to create a dummy interior cell called Wilderne (no this is not a typo) with nothing in it. Now you can do getincell on that one as it is an interior. The beauty of this solution is that this returns true if the name is '''included''' in the actual cell's name, so it will return true in a wilderness cell.
::::::::[[User:DragoonWraith|<font face="Oblivion,Daedric Runes" size=2>D</font>ragoon <font face="Oblivion,Daedric Runes" size=2>W</font>raith]] [[User_talk:DragoonWraith|<font face="Oblivion,Daedric" size=2>TALK</font>]] 18:52, 19 October 2006 (EDT): That's brilliant, thank you!
Anonymous user