This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
give_item [2023/01/02 20:59] – justin | give_item [2023/04/26 12:14] – justin | ||
---|---|---|---|
Line 6: | Line 6: | ||
====Signature: | ====Signature: | ||
<code python> | <code python> | ||
- | give_item(item_id, | + | give_item(item_id, |
</ | </ | ||
Line 12: | Line 12: | ||
|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 (defaults to 1).|[[Number]]|No| | |count|How many of the [[item]] to give to the player (defaults to 1).|[[Number]]|No| | ||
+ | |character|[[Character]] the [[item]] will be given to (defaults to the main [[player character]].|[[Entity]]|No| | ||
- | ====Return Value:==== | + | ^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: |