Difference between revisions of "AddItem"

4 bytes removed ,  06:36, 10 February 2009
m
Formatting fix
imported>Cipscis
(→‎Notes: Added information about Effect Script bug)
imported>Cipscis
m (Formatting fix)
Line 18: Line 18:
=='''Notes'''==
=='''Notes'''==
*You can use a FormList as the item parameter - in this case, the function adds the count for each item in the list.  
*You can use a FormList as the item parameter - in this case, the function adds the count for each item in the list.  
*Calling [[AddItem]] in an Effect Script will cause the target Actor's Weapon to toggle between being visible and usable and being invisible and unusable.  To fix this, use something like this in the script of the item that is being added:<pre>ref rContainer
*Calling [[AddItem]] in an Effect Script will cause the target Actor's Weapon to toggle between being visible and usable and being invisible and unusable.  To fix this, use something like this in the script of the item that is being added:
Begin OnAdd
ref rContainer
set rContainer to GetContainer
Begin OnAdd
rContainer.AddItem Pencil01 1 1
set rContainer to GetContainer
rContainer.RemoveItem Pencil01 1 1
rContainer.AddItem Pencil01 1 1
End</pre>
rContainer.RemoveItem Pencil01 1 1
End


=='''See Also'''==
=='''See Also'''==
Anonymous user