modding:function:itmsetcharges
Discuss this page on this pages TalkPage
itmSetCharges
Syntax | (itmSetCharges item charges) → item |
---|---|
Arguments | item: the item whose charges you want to change |
charges: the amount of charges you want to make the item have | |
Returns | a new item, with the charges set. This item contains all other attributes of the original item |
Category | 0.99, item |
Description | Some items in game use charges to keep track of a certain value. This function can be used to set that value. |
Example
How to double the charges on Blue Credit Chip:
(block (creditChip charges) (setq creditChip (itmCreate &itCashCardBlue; 1)) (setq charges (itmGetCharges creditChip)) (setq creditChip (itmSetCharges creditChip (multiply charges 2))) )
This returns a new creditChip with double the amount of charges Return to Functions list
modding/function/itmsetcharges.txt · Last modified: 2014/12/27 04:40 by 127.0.0.1