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

"Repair" add effect...

Status
Not open for further replies.
Level 7
Joined
Jul 17, 2018
Messages
185
Hello everyone, I was planning to use the Repair (or Renew) ability in a range of 300 or 400, that works, but I wanted to add a Graphic-missile by editing certain options, but the ability doesn't work...manages to repair at the distance I want, but to launch the effect it does it only once, and I want the missile graph to be repetitive.

It seems that the use of detonators is needed, but I do not know what actions to use in the detonator.
I hope it is understood...xd
 
Level 28
Joined
Feb 18, 2014
Messages
3,574
You can trigger it.

  • Repair Effect Start
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Repair
    • Actions
      • Set Integer = (Integer + 1)
      • Unit - Set the custom value of (Triggering unit) to Integer
      • Custom script: set udg_Repair_Effect[GetUnitUserData(GetTriggerUnit())] = AddLightningEx("DRAM", true, GetUnitX(GetTriggerUnit()), GetUnitY(GetTriggerUnit()), 75.00, GetUnitX(GetSpellTargetUnit()), GetUnitY(GetSpellTargetUnit()), 75.00)
  • Repair Effect End
    • Events
      • Unit - A unit Stops casting an ability
    • Conditions
      • (Ability being cast) Equal to Repair
    • Actions
      • Lightning - Destroy Repair_Effect[(Custom value of (Triggering unit))]
If you want to change the effect, replace "DRAM" with the rawcode of the effect.
 
Level 7
Joined
Jul 17, 2018
Messages
185
You can trigger it.

  • Repair Effect Start
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Repair
    • Actions
      • Set Integer = (Integer + 1)
      • Unit - Set the custom value of (Triggering unit) to Integer
      • Custom script: set udg_Repair_Effect[GetUnitUserData(GetTriggerUnit())] = AddLightningEx("DRAM", true, GetUnitX(GetTriggerUnit()), GetUnitY(GetTriggerUnit()), 75.00, GetUnitX(GetSpellTargetUnit()), GetUnitY(GetSpellTargetUnit()), 75.00)
  • Repair Effect End
    • Events
      • Unit - A unit Stops casting an ability
    • Conditions
      • (Ability being cast) Equal to Repair
    • Actions
      • Lightning - Destroy Repair_Effect[(Custom value of (Triggering unit))]
If you want to change the effect, replace "DRAM" with the rawcode of the effect.

The Custom Script I do not understand very well. That I have to establish there?
 
Level 7
Joined
Jul 17, 2018
Messages
185
Everything is as you indicated...except that this error came out :C

upload_2020-7-23_14-20-33.png
 
Level 7
Joined
Jul 17, 2018
Messages
185
It worked, but with certain errors:

-When I interrupt the ability, the effect continues and does not disappear, causing various effects.
-I forgot to mention that the unit was flying.
-When you move the camera, the effect changes point

upload_2020-7-23_16-48-58.png
upload_2020-7-23_16-50-57.png
 
Level 28
Joined
Feb 18, 2014
Messages
3,574
-When I interrupt the ability, the effect continues and does not disappear, causing various effects.
Did you copy the second trigger?
-I forgot to mention that the unit was flying.
You can adjust the height of the effect by modifing the value 75.
-When you move the camera, the effect changes point
Strange, well, another trick you can do is instead of using lightning effect, create a dummy unit when the worker start repairing and order it to cast for example siphon mana on the building.
 
Level 7
Joined
Jul 17, 2018
Messages
185
Sorry i just connected

Did you copy the second trigger?

Yes, I have verified and everything is correct.

Strange, well, another trick you can do is instead of using lightning effect, create a dummy unit when the worker start repairing and order it to cast for example siphon mana on the building.

I'll try to do it. Thank you very much, in case the first option does not come out, I will try the dummy unit :thumbs_up:
(Apart from the DRAM, where do I find the other codes?)
 
Last edited:
Status
Not open for further replies.
Top