• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Change ability charges using triggers (Train Ability, not normal)

Status
Not open for further replies.
Level 5
Joined
Aug 27, 2008
Messages
126
I'm trying to add charges to Merc Compounds - War Pigs.
I saw Dr.SuperGood's solution in another map but I'm unable to make it work for the Merc Compund.
I really don't see what's wrong.
I've attached the map.
 

Attachments

  • Ability charge test fixed.SC2Map
    83.5 KB · Views: 49

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,223
The charge type on of the second merc calldown is set to global and not unit, hence the action targeting it will not work as that action is for charges on units only.

Additionally the compound starts out at maximum charge count. More charges cannot be added until at least 1 charge is depleted and even then it will still max out at the maximum charge count.

One can set the maximum charge count to something large, eg 999, while keeping the starting count low to allow a lot of charges to be added and stored up. One might also be able to dynamically modify maximum charge amount for a player using catalog actions to set it to a new value, however last time I checked each catalog modification performed by the catalog actions resulted in a permanent memory leak.
 
Level 5
Joined
Aug 27, 2008
Messages
126
I understand that and that's why in the map i've adjusted the unit train ability charge to be located at the Unit.
I will attach an updated version as I saw a fault in the triggering. I left the fault there and added another trigger which should work, but I am unable to manipulate the charges in any way.
I think I've set up everything as it should be yet it's not working.
 

Attachments

  • Ability charge test fixed (1).SC2Map
    83.5 KB · Views: 57

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,223
Completely understandable as the charge link is wrong. Needs to be from scope Train and not the scope Effect - Target. It was trying to read a field that did not exist! It even tells you an error happened reading the charge link in the trigger debug windows...

As one can see, here it is with 3 charges being added when the unit enters the circle. If a positive number is used then charges will be removed.
 

Attachments

  • Br3akth3w1nd Ability charge test fixed (1).SC2Map
    74.7 KB · Views: 46
Status
Not open for further replies.
Top