• 🏆 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!

[Unsolved] Add Charge Trigger not working

Status
Not open for further replies.
Level 1
Joined
Apr 27, 2014
Messages
3
Hi,

I just can't get the Add Charge Trigger to work properly...
JASS:
    if ((UnitGetType(EventUnit()) == "PickupMines")) {
        UnitAbilityAddChargeUsed(EventUnitTargetUnit(), "VultureSpiderMines", "Abil/VultureSpiderMines", -1.0);
        UnitAddChargeUsed(EventUnitTargetUnit(), "VultureSpiderMines", -2.0);
        UnitAddChargeUsed(EventUnitTargetUnit(), "RaynorTossGrenade", -1.0);
        UnitAddChargeUsed(EventUnitTargetUnit(), "\"VultureSpiderMines\"", -1.0);
        UnitAddChargeUsed(EventUnitTargetUnit(), "VultureSpiderMines", -1.0);
I tried all possibilities, but it just won't charge the mines... This Trigger does however add Charges to the RaynorTossGrenade - though for this to work i had to copy the Trigger from the original Campaign map, if I set the value RaynorTossGrenade it just didn't work aswell.
 
Level 1
Joined
Apr 27, 2014
Messages
3
I don't have access to the hdd holding this map currently. Could you post the jass version of your working trigger?
 
Level 3
Joined
Feb 12, 2008
Messages
25
Would probably be some issue with the name of your link? Check to see if in the Cost field of the ability has Ability/Unit is in the drop menu for charges, and that the Link Name corresponds with that one you have in the triggers.

Ofcourse, it could also be because you dont actually have anything in the cost field for the ability?
 
Status
Not open for further replies.
Top