This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
give_item [2020/02/19 09:40] – justin | give_item [2023/04/26 12:22] (current) – justin | ||
---|---|---|---|
Line 6: | Line 6: | ||
====Signature: | ====Signature: | ||
<code python> | <code python> | ||
- | give_item(item_id, | + | give_item(item_id, |
</ | </ | ||
^Argument^Description^Type^Required^ | ^Argument^Description^Type^Required^ | ||
|item_id|ID of the [[item]] (as defined in the [[Item Editor]]).|[[String]]|Yes| | |item_id|ID of the [[item]] (as defined in the [[Item Editor]]).|[[String]]|Yes| | ||
- | |count|How many of the [[item]] to give to the player.|[[Number]]|No| | + | |count|How many of the [[item]] to give to the player |
+ | |character|[[Character]] the [[item]] will be given to (defaults to main [[player character]]).|[[Entity]]|No| | ||
+ | |||
+ | ^Return Value^Description^Type^ | ||
+ | |Number Given|Returns the actual number of [[item|items]] that were given to the player. This could be less than the count supplied to the function, for example if the player' | ||
====Example: | ====Example: | ||
<code bauxite> | <code bauxite> | ||
- | give_item(" | + | give_item(" |
</ | </ | ||
// | // |