Enable Liberty.SC2Campaign under dependencies and then take a look at the Healing Potion items, those are items with charges, too. Just modify them to suit your needs.
Edit: Be careful when you use Talon0815's trigger, because it will remove the scrap metals nonetheless, when you use the ability and you only have 1 or 2 of them.
Well, there is no trigger that allows you to do that. Maybe you can do something with the trigger that allows you to move items to different inventories.
These banks work for multiplayer, they're used in the Card Game by Clord to save something like player experience.
But I think these banks are stored locally, so they might be hackable.
@Ranctifier: Yes, you just have to change the Shared Radius to something a lot higher. I think 40 or something like that might be 2.5 screens.
And the problem with the heroes is, when a hero kills a unit the xp is split equally between all the heroes in the Shared Radius (that's the way it is in WC3). But to emulate that you have to change the Shared Fraction to 1/2 for 2 heroes in the Shared Radius, to 1/3 for 3 heroes, to 1/4 for 4 heroes etc. and that's not possible with only the data editor afaik.
This tutorial will teach you how to create a WC3-like experience system. So not only the killing unit gets the experience, but all nearby heroes get the experience.
Note: This tutorial wont teach you how to create a hero unit. I recommend Bifuu's tutorial for that: Complete Hero Tutorial
For non-hero units
1. Create a Behavior of type Veterancy and call it whatever you want.
2. Set the Flags to Hidden.
3. Check Ally in the value for Kills in Share Filters and set Heroic to required.
4. Change the value for Kills in Shared Fraction to 1.
5. Change the value for Kills in Shared Radius to 10.
6. Now give this behavior to all the non-hero units in your map.
7. And give every hero in your map the attribute Heroic.
For hero units
I did not find any way to exactly replicate WC3's experience system via the data editor yet, when multiple heroes are in action and one of the heroes kills a unit. The best way is to repeat every step and then change the Shared Fraction to something that suits your needs better.
0
Enable Liberty.SC2Campaign under dependencies and then take a look at the Healing Potion items, those are items with charges, too. Just modify them to suit your needs.
Edit: Be careful when you use Talon0815's trigger, because it will remove the scrap metals nonetheless, when you use the ability and you only have 1 or 2 of them.
0
Oh, right, I totally forgot that.
0
First, create a region that covers the whole map. Then create this trigger:
Note: That's not the actual wording in the trigger editor, I don't have the english one.
0
Well, there is no trigger that allows you to do that. Maybe you can do something with the trigger that allows you to move items to different inventories.
0
You could make the meat a consumable item with 1 charge and just remove the ability from the unit.
0
These banks work for multiplayer, they're used in the Card Game by Clord to save something like player experience. But I think these banks are stored locally, so they might be hackable.
0
Yes, you could use local variables in WC3, but only via Custom Script/JASS.
Anyway, nice tutorial.
0
@Ranctifier: Yes, you just have to change the Shared Radius to something a lot higher. I think 40 or something like that might be 2.5 screens.
And the problem with the heroes is, when a hero kills a unit the xp is split equally between all the heroes in the Shared Radius (that's the way it is in WC3). But to emulate that you have to change the Shared Fraction to 1/2 for 2 heroes in the Shared Radius, to 1/3 for 3 heroes, to 1/4 for 4 heroes etc. and that's not possible with only the data editor afaik.
0
Create a WC3-like experience sharing system
Introduction
This tutorial will teach you how to create a WC3-like experience system. So not only the killing unit gets the experience, but all nearby heroes get the experience.
Note: This tutorial wont teach you how to create a hero unit. I recommend Bifuu's tutorial for that: Complete Hero Tutorial
For non-hero units
1. Create a Behavior of type Veterancy and call it whatever you want.
2. Set the Flags to Hidden.
3. Check Ally in the value for Kills in Share Filters and set Heroic to required.
4. Change the value for Kills in Shared Fraction to 1.
5. Change the value for Kills in Shared Radius to 10.
6. Now give this behavior to all the non-hero units in your map.
7. And give every hero in your map the attribute Heroic.
For hero units
I did not find any way to exactly replicate WC3's experience system via the data editor yet, when multiple heroes are in action and one of the heroes kills a unit. The best way is to repeat every step and then change the Shared Fraction to something that suits your needs better.