Difference between revisions of "Foreach"

1 byte added ,  06:10, 22 January 2015
imported>Odessa
(Expanded and clarified)
imported>Odessa
Line 41: Line 41:
foreach rItem <- rActor
foreach rItem <- rActor
   if rItem.IsEquipped
   if rItem.IsEquipped
         rItem.RemoveMeIR
         rItem.UnequipMe
   endif
   endif
loop
loop


; Will remove all equipped items from rActor
; Will unequip all equipped items from rActor
</pre>
</pre>


Line 104: Line 104:
</pre>
</pre>
Note that above we reference <b>Entry["value"]</b> in the [[Print]] function directly, rather than use an intermediary variable (<b>let SomeVar := Entry["value"]..</b>). This is only possible when using NVSE aware functions or the [[Script Compiler Override]].
Note that above we reference <b>Entry["value"]</b> in the [[Print]] function directly, rather than use an intermediary variable (<b>let SomeVar := Entry["value"]..</b>). This is only possible when using NVSE aware functions or the [[Script Compiler Override]].
==See Also==
==See Also==
*[[While]]
*[[While]]
Anonymous user