Difference between revisions of "Talk:GetInCell"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>Xilver
imported>ZuTheSkunk
(Unclear description)
Line 20: Line 20:
  endif
  endif
--[[User:Xilver|Xilverbulet]] 21:48, 12 August 2007 (EDT)
--[[User:Xilver|Xilverbulet]] 21:48, 12 August 2007 (EDT)
== Unclear description ==
''"Again, this not exactly "any" part of it's name, it has to be the first part of it's name... Chorrol will match Chorrol, Chorrol01, ChorrolFarm, etc. but using "Farm" would result in never finding ChorrolFarm."''
I must say I don't understand this part. Does it mean that I have to use "Chorrol" as the first word in both cell's name and its EditorID, or what? Let's say that I have a bunch of cells whose EditorIDs start with "ZUToD", including "ZUToDHalls01", "ZUToDLevel01"... will it work for all of them despite how they're called in-game? - [[User:ZuTheSkunk|ZuTheSkunk]] 04:25, 28 February 2011 (EST)

Revision as of 04:25, 28 February 2011

I looked around, but is there a good way to tell if the PC is in oblivion? In my mod I had to create a dummy cell called oblivion so I could do a "GetinCell Oblivion" First, I couldn't believe this hadn't already been done. Second, I'm not sure what doing this will break. Is there a better way?--Xilverbulet 18:31, 11 August 2007 (EDT)

GetInWorldspace, I believe. I think the Oblivion cells all share a world.
Dragoon Wraith TALK 01:39, 12 August 2007 (EDT)
I don't think GetInWorldspace works. First, it always returns 0 when the player is in an interior cell. Second, when you enter an Oblivion Gate, you get into one of the Oblivion worldspaces. I suggest using dummy cells for Oblivion planes. But you also need dummy cells for several other worldspaces. There is a list of worldspaces in the CS.
Tibixe 05:38, 12 August 2007 (EDT)
I don't think it'll break anything. After all, if any other mod uses a cell named "Oblivion", it will probably be just a dummy cell as well. If you want, I think (I've tried it, but I don't remember) you could also use OBSE's GetParentCell in conjunction with NameIncludes/CompareName to see if the cell name includes "Oblivion"
--Haama 10:24, 12 August 2007 (EDT)
Thanks all. I'm going to release with my dummy cell and see if anyone complains.Here's the code to check to see if the character is in a random oblivion world if anyone is interested.
if   GetInCell Oblivion || GetInWorldspace  OblivionRD001 || GetInWorldspace  OblivionRD002 || GetInWorldspace  OblivionRD003
 set SpellFail to 1
 Message "Cannot Cast in Oblivion."
elseif	GetInWorldspace  OblivionRD004 || GetInWorldspace  OblivionRD005 || GetInWorldspace  OblivionRD006 || GetInWorldspace  OblivionRD007
 set SpellFail to 1
 Message "Cannot Cast in Oblivion."
endif

--Xilverbulet 21:48, 12 August 2007 (EDT)

Unclear description

"Again, this not exactly "any" part of it's name, it has to be the first part of it's name... Chorrol will match Chorrol, Chorrol01, ChorrolFarm, etc. but using "Farm" would result in never finding ChorrolFarm."

I must say I don't understand this part. Does it mean that I have to use "Chorrol" as the first word in both cell's name and its EditorID, or what? Let's say that I have a bunch of cells whose EditorIDs start with "ZUToD", including "ZUToDHalls01", "ZUToDLevel01"... will it work for all of them despite how they're called in-game? - ZuTheSkunk 04:25, 28 February 2011 (EST)