Complete Example Scripts: Difference between revisions
Jump to navigation
Jump to search
m
→Cycle Through a List of Objects and Perform an Action on Each Object(FormLists): Syntax
imported>JustinOther m (→Cycle Through a List of Objects and Perform an Action on Each Object(FormLists): Wups. Pulled extra 'EndIf' + reindented) |
imported>JustinOther |
||
| Line 129: | Line 129: | ||
Int iIndex | Int iIndex | ||
ObjectReference | ObjectReference Reference | ||
FormList Property ListOfObjectsFLST Auto ; see notes after script for more info on this property | FormList Property ListOfObjectsFLST Auto ; see notes after script for more info on this property | ||
| Line 137: | Line 137: | ||
While(iIndex > 0) | While(iIndex > 0) | ||
iIndex -= 1 | iIndex -= 1 | ||
Reference = ListOfObjectsFLST.GetAt(iIndex) as ObjectReference ; Note that you must typecast the entry from the formlist using 'As'. | |||
If | If Reference.IsEnabled() | ||
Reference.Disable() | |||
Else ; If | Else ; If Reference.IsDisabled() | ||
Reference.Enable() | |||
EndIf | EndIf | ||
EndWhile | EndWhile | ||