GiveActorItem
Gives an actor one item more - worn unless told otherwise.
Adds to the list SetActorInventory keeps. The first item given replaces the presets’ dress, as a whole list would.
Syntax
Section titled “Syntax”GiveActorItem(id, item [, amount, wear])| Parameter | Type | |
|---|---|---|
id |
number | the actor |
item |
string | the item class (a name, id or GUID) |
amount |
number | how many (1 by default) (optional) |
wear |
boolean | true (the default) = worn; false = only carried (optional) |
Returns
Section titled “Returns”boolean - false for an unknown item, a full list (64) or anything but a living person actor
Example
Section titled “Example”GiveActorItem(guard, "KettleHat01_m01_E1") -- on its headGiveActorItem(guard, "bread", 2, false) -- in its pocketsSee also
Section titled “See also”SetActorInventory · RemoveActorItem · the NPC actors group of the index
