• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Charging item with other item

Status
Not open for further replies.
Level 22
Joined
Feb 4, 2005
Messages
3,971
[SOLVED] Charging item with other item

I made an item that is Effects-based (the item data that allows you to set charges, Effect, etc), I set it to have say 5 starting out of 10 charges and pickable in inventory. I have another unit/item (the charger/ammo) also Effect-based with 1 charge. I want this charger item that also in inventory to be able to add 1 charge to the main item when the charger is used. It is ok this charger to be inventory item too and not a Powerup (Auto) because, it would be wasted if it were picked and auto-used without the weapon.

I read about Vulture Replenish Mine but it adds charge to an ability right? Not to an Effect as in my case, actually it should add to the Unit that is the pickable item. So how do I do that?

(or in other words I am making the unusable Pickup items like Chrono Rift Device, Experimental Plasma Weapon from 'Piercing the Shroud' mission fully operational inventory items and without the need of triggers just custom item). So far the items work well, just need to add Chrono Charge and Plasma Rounds as inventory items that when used can give +1 charge to their respective weapons.

Would be nice if I can do that just in Data editor. The Vulture replenish mine effect adds to ability, I dont think I can charge Effect-based item.

[SOLVED]
 
Last edited:
Level 22
Joined
Feb 4, 2005
Messages
3,971
I'm goood! I found it with triggers when no one in SC2Mapster, TheHelper or here could help, so simple (because no one could find how to set charges with triggers too). So as I said I have inventory effect-based weapon and I want with effect-based inventory charges/ammo to add charges to the inventory weapon. The Charger item uses effect Vulture - Replenish Mines, which does nothing but with triggers, it does.

Since it is effect-based items, I use effect triggers:

  • Chrono Rift Charge
    • Events
      • Environment - Player Any Player uses Effect Vulture - Replenish Mines (Modify Mines charge count)
    • Local Variables
    • Conditions
      • (Triggering Effect Unit Type(Target)) == Pickup - Chrono Rift Device
    • Actions
      • Unit - Add -1.0 charges used for charge "Item/PickupChronoRiftDevice" on unit (Triggering Effect Unit(Target))
Negative number adds charge DUH, positive removes it, since this action is to remove charge and there is no action to add one. You just take the charge "STRING" from the Link in Data Editor>Item tab>your item, see link under charge.

Because I wanted with my inventory item to target the inventory weapon on the ground, here is how. One can use any other Events, Items to add a charge to Unit. For example you may want to use powerup ammo not inventory item like me that adds instantly to the inventory weapon. The problem was - Is there a trigger that adds/takes out charges from unit not ability, and this is: Add Charge Used For Unit

Pretty sure I didn't discover America with that and others also know this way to add/take out a charge to item but for some reason no one could answer and I thought I was clear on the forums...
 
Level 22
Joined
Feb 4, 2005
Messages
3,971
Yes, there is also a library. Im just doing the Pickup items as default as possible, with the least changes, just adding an item data to them to make them inventory. Otherwise with this library:

http://www.sc2mapster.com/forums/re...36-library-galaxy-item-utility-library/#posts
you can get the triggers that Blizzard 'accidently' forgot like the war3 triggers: item set charges remaining & condition, set charges, unit orders related to items.. If one can make brand new GUI triggers like that, one can fill all the missing triggers.
 
Status
Not open for further replies.
Top