• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • 💡 We're thrilled to announce that our upcoming texturing contest is in the works, and we're eager to hear your suggestions! Please take this opportunity to share your ideas in this theme discussion thread for the Texturing Contest #34!
  • 🏆 Hive's 7th HD Modeling Contest: Icecrown Creature is now open! The frozen wastes of Icecrown are home to some of Azeroth’s most terrifying and resilient creatures. For this contest, your challenge is to design and model a HD 3D monster that embodies the cold, undead, and sinister essence of Icecrown! 📅 Submissions close on April 13, 2025. Don't miss this opportunity to let your creativity shine! Enter now and show us your frozen masterpiece! 🔗 Click here to enter!

[General] Repair Autocast Trigger Problem

Status
Not open for further replies.
Level 9
Joined
May 21, 2014
Messages
580
Greetings Hive!

I have noticed a problem in my trigger of activating autocast of a certain unit.

The trigger works like this:
When a unit finishes an upgrade (in which the unit is a structure, and that unit upgrades to a better version like Town Hall to Keep), I order the upgrading unit to activate autocast of the Repair Skill.

The autocast is activated, though it has the behavior of NOT ACTUALLY repairing stuff around it, as if the autocast is off.

I also observed this too on Abilities - Default Active Ability field of the unit. When the structure is built, it does have its autocast repair on, but then again, it doesn't actually repair stuff, as if the autocast is off.

Is there a way out of this to fix this weird problem? I want those units, when they have upgraded/constructed, to actually repair when autocast is turned on by trigger/Default Active Ability field.

Thanks Hive.:ogre_kawaii:
 
Level 9
Joined
May 21, 2014
Messages
580
Try ordering that unit to turn on autocast and ordering it to repair a nearby building with damaged hp via triggers. Maybe autocast will work once the unit starts to repair buildings.

Indeed it does start doing their repairs when commanded to repair.

The problem will still persist if there are no damaged structures nearby if I did that solution of commanding it to repair a damaged structure.
 
Level 23
Joined
Feb 6, 2014
Messages
2,466
Indeed it does start doing their repairs when commanded to repair.

The problem will still persist if there are no damaged structures nearby if I did that solution of commanding it to repair a damaged structure.

Then if no building is damaged, trigger the damage by about -1 HP or if 0.5 works, try that so it is unnoticed.
 
Level 9
Joined
May 21, 2014
Messages
580
Then if no building is damaged, trigger the damage by about -1 HP or if 0.5 works, try that so it is unnoticed.

I did this. Apparently, 0.1 to 0.99 subtraction doesn't. Minus 1 works, though, but it is noticeable, not that I mind.

This is a temporary solution, but I think this works for me.

If anybody, though, has a better solution, please post here.
Some people doesn't want to show the noticeable effect done by this solution.
 
Level 23
Joined
Feb 6, 2014
Messages
2,466
I did this. Apparently, 0.1 to 0.99 subtraction doesn't. Minus 1 works, though, but it is noticeable, not that I mind.

This is a temporary solution, but I think this works for me.

If anybody, though, has a better solution, please post here.
Some people doesn't want to show the noticeable effect done by this solution.

Another Solution is to use a Damage Detection System. If a building is damaged, then trigger your worker to repair the closest building and at the same time, order it to autocast repair.
 
Combine a DDS as Shadow Flux suggested with a custom edit of phoenix fire with its own buff and order the unit who should have that custom phoenix fire ability with the repair ability to repair the damaged unit.

Another method which maps like castle fight and other famous genre's used dummy units/peasants/workers with the repair ability and the default active ability as repair.
The last method/solution has already been mentioned before I posted. Otherwise that is all the known ways of easily resolving this problem. Other ways can be like finding which units are currently selected and enter a chat message to order them to be repaired or to repair a certain unit through clicking another unit after typing the command or using a dummy ability.
 

sentrywiz

S

sentrywiz

Solution #1 (tested)

When your structure finishes an upgrade, quickly replace the structure.
This will reset its autocast bug and it works just as well.

Triggers:

  • Untitled Trigger 001
    • Events
      • Unit - A unit Finishes an upgrade
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Triggering unit)) Equal to Keep
          • (Unit-type of (Triggering unit)) Equal to Town Hall
    • Actions
      • Unit - Replace (Triggering unit) with a Keep using The new unit's max life and mana
Solution #2 (not tested)

Create a dummy unit where the structure it and give it the repair ability.

When you start an upgrade, hide the dummy.
When the upgrade is finished, unhide the dummy.

Though this way the structure will only be there for looks and will do nothing.
 
Level 9
Joined
May 21, 2014
Messages
580
Solution #1 (tested)

When your structure finishes an upgrade, quickly replace the structure.
This will reset its autocast bug and it works just as well.

Triggers:

  • Untitled Trigger 001
    • Events
      • Unit - A unit Finishes an upgrade
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Triggering unit)) Equal to Keep
          • (Unit-type of (Triggering unit)) Equal to Town Hall
    • Actions
      • Unit - Replace (Triggering unit) with a Keep using The new unit's max life and mana

Solution 1 will be good, it doesn't also hinder with tech-tree dependency equivalence.
+Rep for this.
 
Status
Not open for further replies.
Top