• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

help with auto cast

Status
Not open for further replies.
Level 9
Joined
Jun 10, 2013
Messages
472
Hey >:D I've made a custom rejuvenation spell and 1 dummy heal spell that has no values but the targets allowed, mana cost, cast range and cooldown now how do I trigger it so that when the Dummy heal auto cast on a unit, the unit gets the effects of my custom rejuvenation?
 
Last edited:
  • HealTrigger
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Heal
    • Actions
      • Unit - Order DummyUnit to Night Elf Druid Of The Claw - Rejuvenation (Target unit of ability being cast)
I think this is what they are suggesting. DummyUnit would be the unit you want casting your rejuvenation.
 
It should work:
  • spell
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equals to DummyAbility
    • Actions
      • Set DummyCaster = (Triggering unit)
      • Set DummyTarget = (Target unit of ability being cast)
      • Set DummyPoint = (Position of DummyCaster)
      • Unit - Create 1 SpawnDummyUnit for (Owner of DummyCaster) at DummyPoint facing Default building facing degrees
      • Unit - Add a 3.00 second default expiration timer to (Last created unit)
      • Unit - Add Rejuvenation to (Last created unit)
      • Unit - Order (Last created unit) to Night Elf - Druid of the Claw: Rejuvenation DummyTarget
      • Custom script: call RemoveLocation(udg_DummyPoint)
It works if you want your caster to autocast heal, but without having non-autocast rejuvenation ability. SpawnDummyUnit is an empty unit without anything and with locust ability. Also, in this line:
  • Unit - Add Rejuvenation to (Last created unit)
you have to give it YOUR Rejuvenation.

EDIT: don't forget to delete mana cost of your rejuvenation ability
 
say thank you to MatiS please, sarumanthecursed?
 

Attachments

  • 1.png
    1.png
    22.2 KB · Views: 125
  • Unit - Create 1 SpawnDummyUnit for (Owner of DummyCaster) at DummyPoint facing Default building facing degrees
  • Unit - Add a 3.00 second default expiration timer to (Last created unit)
  • Unit - Add Rejuvenation to (Last created unit)
  • Unit - Order (Last created unit) to Night Elf - Druid of the Claw: Rejuvenation DummyTarget
-->
  • Unit - Create 1 SpawnDummyUnit for (Owner of DummyCaster) at DummyPoint facing Default building facing degrees
  • Set TempUnit=(Last Created Unit)
  • Unit - Add a 3.00 second default expiration timer to TempUnit
  • Unit - Add Rejuvenation to TempUnit
  • Unit - Order TempUnit to Night Elf - Druid of the Claw: Rejuvenation DummyTarget
Edit: Also, you only use DummyCaster once so it is probably more efficient to not use a variable to grab Triggering Unit. Another thing I kind of want to mention is that the point variable is really unnecessary too. If the spell has a huge range, it doesn't really matter where you put the unit. It could simply be spawned at a non-volatile point variable, which means you wouldn't need to set the point variable and clear it. I would personally just do it like this:

  • Unit - Create 1 SpawnDummyUnit for (Owner of Triggering Unit) at CenterofMap facing Default building facing degrees
  • Set TempUnit=(Last Created Unit)
  • Unit - Add a 3.00 second default expiration timer to TempUnit
  • Unit - Add Rejuvenation to TempUnit
  • Unit - Order TempUnit to Night Elf - Druid of the Claw: Rejuvenation DummyTarget
 
You could also just reuse the unit. I know some spells can't target enemies, so if that's an issue, just change its owner before casting. Spawn the unit at the start or at the time someone creates a unit with the auto-cast ability. Then reuse that unit for the rest of the game. No need to make a new unit each time.
 
Status
Not open for further replies.
Back
Top