Difference between revisions of "Talk:GetNthRef - Cell"
imported>Terra Nova2 |
imported>Rasikko m |
||
(One intermediate revision by the same user not shown) | |||
Line 23: | Line 23: | ||
</source> | </source> | ||
--[[User:Terra Nova2|Terra Nova2]] ([[User talk:Terra Nova2|talk]]) 2015-02-28T07:11:07 (EST) | --[[User:Terra Nova2|Terra Nova2]] ([[User talk:Terra Nova2|talk]]) 2015-02-28T07:11:07 (EST) | ||
== Peeking in another cell externally == | |||
So long as the previous cell you entered from was not an exterior cell([[GetParentCell - ObjectReference]] will return none), you can use this function to walk through that cell while in another. --[[User:Rasikko|Rasikko]] ([[User talk:Rasikko|talk]]) 2018-01-06T13:51:10 (EST) | |||
== none refs == | |||
It's best to check if each ref isn't none. --[[User:Rasikko|Rasikko]] ([[User talk:Rasikko|talk]]) 2021-09-30T16:07:18 (EDT) |
Latest revision as of 15:07, 30 September 2021
Handling references without names[edit source]
This function as well as GetNumRefs - Cell doesn't take names in account when you're looking for a specific type. Furthermore, if you narrow down the amount in order to fit an array(not doing so will take the array out of bounds) it will also fill the array with forms that don't have a name, if you're trying to fill an array based on names.
For handling the ones without names.. do this:
Actor property PlayerRef auto
Cell kCell = PlayerRef.GetParentCell()
Int n
Int iRefs = kCell.GetNumRefs(38) ; trees
Function SomeFunction()
While (n < iRefs)
ObjectReference kRefs = kCell.GetNthRef(n, 38)
if kRefs.GetBaseObject().GetName() ; by default, strings are true if they a not empty.
; add to alias, array, etc. ONLY filled with references that have names!
endif
n += 1
EndWhile
EndFunction
--Terra Nova2 (talk) 2015-02-28T07:11:07 (EST)
Peeking in another cell externally[edit source]
So long as the previous cell you entered from was not an exterior cell(GetParentCell - ObjectReference will return none), you can use this function to walk through that cell while in another. --Rasikko (talk) 2018-01-06T13:51:10 (EST)
none refs[edit source]
It's best to check if each ref isn't none. --Rasikko (talk) 2021-09-30T16:07:18 (EDT)