- Joined
- Apr 23, 2010
- Messages
- 312
I added a trigger that if a hero has an item with 0 charges on it the item is removed. This caused a problem that when a player drops "Venison" it would disappear and and I think is removed/destroyed. They are not the only items that I have made that have abilities though they are connected with another trigger, but it doesn't seem relevant.
Here is the code I used to drop all items that have 0 charges...
Here is the code I used to drop all items that have 0 charges...
-
Remove 0 Charge Items
-
Events
- Time - Every 0.01 seconds of game time
- Conditions
-
Actions
-
Player Group - Pick every player in (All players) and do (Actions)
-
Loop - Actions
- If ((Charges remaining in (Item carried by Players_Hero[(Player number of (Picked player))] in slot 1)) Equal to 0) then do (Item - Remove (Item carried by Players_Hero[(Player number of (Picked player))] in slot 1)) else do (Do nothing)
- If ((Charges remaining in (Item carried by Players_Hero[(Player number of (Picked player))] in slot 2)) Equal to 0) then do (Item - Remove (Item carried by Players_Hero[(Player number of (Picked player))] in slot 2)) else do (Do nothing)
- If ((Charges remaining in (Item carried by Players_Hero[(Player number of (Picked player))] in slot 3)) Equal to 0) then do (Item - Remove (Item carried by Players_Hero[(Player number of (Picked player))] in slot 3)) else do (Do nothing)
- If ((Charges remaining in (Item carried by Players_Hero[(Player number of (Picked player))] in slot 4)) Equal to 0) then do (Item - Remove (Item carried by Players_Hero[(Player number of (Picked player))] in slot 4)) else do (Do nothing)
- If ((Charges remaining in (Item carried by Players_Hero[(Player number of (Picked player))] in slot 5)) Equal to 0) then do (Item - Remove (Item carried by Players_Hero[(Player number of (Picked player))] in slot 5)) else do (Do nothing)
- If ((Charges remaining in (Item carried by Players_Hero[(Player number of (Picked player))] in slot 6)) Equal to 0) then do (Item - Remove (Item carried by Players_Hero[(Player number of (Picked player))] in slot 6)) else do (Do nothing)
-
Loop - Actions
-
Player Group - Pick every player in (All players) and do (Actions)
-
Events