Hi everyone. I'm just having some problems here with setting item charges using triggers. I can't seem to find ANY trigger condition that can detect the amount of charges left in an item, nor is there an action that can set the amount of charges in an item. Does anyone know a solution to this?
If you are using triggers than why not have a variable for the item? Set an integer variable to the amount of charges you want the item to have and everytime you use a charge set that variable to its current value - 1 and when there are 0 charge counters left remove it from the inventory.
Err i'm not sure if you misunderstood my question or not but i don't seem to be able to find any conditions that can detect the amount of charges left in an item, nor can i find any trigger actions that can change that charge amount. So if i don't know how to find out the charge amount or set the charge amount, how can i do what you just suggested? Correct me by telling me the proper way to do it if i'm wrong.
EDIT: Ok looking back at your post now i saw what you meant. Well, the problem here now is that the players have to be able to see the amount of charges left for that item in the UI, so if i use a variable to keep track of charges, how would the players know the amount left?
i too would like to know how to use triggers to reduce the charges on an item
a separate integer variable for each weapon might be messy in my map, because weapons are generated randomly from a shops and there has to be tracking of each weapons ammo, even if they are dropped and picked up by another player
in warcraft 3 this was so easy to do....just have an item stock decrease from set item charge to N and then (n-1) etc until the trigger removes the weapon
anyone know for the release of sc2 , is there a way to set item charges via triggers?
Hi everyone. I'm just having some problems here with setting item charges using triggers. I can't seem to find ANY trigger condition that can detect the amount of charges left in an item, nor is there an action that can set the amount of charges in an item. Does anyone know a solution to this?
If you are using triggers than why not have a variable for the item? Set an integer variable to the amount of charges you want the item to have and everytime you use a charge set that variable to its current value - 1 and when there are 0 charge counters left remove it from the inventory.
Err i'm not sure if you misunderstood my question or not but i don't seem to be able to find any conditions that can detect the amount of charges left in an item, nor can i find any trigger actions that can change that charge amount. So if i don't know how to find out the charge amount or set the charge amount, how can i do what you just suggested? Correct me by telling me the proper way to do it if i'm wrong.
EDIT: Ok looking back at your post now i saw what you meant. Well, the problem here now is that the players have to be able to see the amount of charges left for that item in the UI, so if i use a variable to keep track of charges, how would the players know the amount left?
i too would like to know how to use triggers to reduce the charges on an item
a separate integer variable for each weapon might be messy in my map, because weapons are generated randomly from a shops and there has to be tracking of each weapons ammo, even if they are dropped and picked up by another player
in warcraft 3 this was so easy to do....just have an item stock decrease from set item charge to N and then (n-1) etc until the trigger removes the weapon
anyone know for the release of sc2 , is there a way to set item charges via triggers?
The item utility library should be able to help you out:
BTW, item charges are of type fixed/real not int - just keep that in mind.
Item Utility Library
Edit: I wrote a solution in regards to Ability Charges, and misread original topic (item charges), so created a new thread http://forums.sc2mapster.com/development/map-development/7626-setting-ability-charges/ .