• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Help with Scroll of Multiheal

Status
Not open for further replies.
Yes, settings its charge to any number above 1 would fix it, but it would also deceive players. Now, it depends on what impression you want to give to them. Do you want to keep the 1 charge thing? If so, then use a trigger to detect when the healing wave item is used, and create a dummy, forcing it to cast the spell at the target unit. Otherwise, change the item classification to Miscellaneous, and set its charges to 0 - though it's going to be a permanent item.
 
After I use the scroll a second time, it heals only one unit. I did the triggering part. I am almost done, but I think I need another variable.
Here:
  • Scroll of Multiheal completion
    • Events
      • Unit - A unit Uses an item
    • Conditions
      • (Item-type of (Last created item)) Equal to Scroll of Multiheal
      • (Item-class of (Last created item)) Equal to Purchasable
    • Actions
      • Set Placement = (Position of (Casting unit))
      • Unit - Create 1 Dummy3 for (Owner of (Casting unit)) at Placement facing (Facing of (Casting unit)) degrees
      • Unit - Add Healing Wave (item) to (Last created unit)
      • Unit - Order (Last created unit) to Orc Shadow Hunter - Healing Wave (Triggering unit)
      • Custom script: call RemoveLocation(udg_Placement)
 
Use the other event for that, because the one you chose does not have a getter function that tells you the target unit. Instead, use starts the effect of an ability. I also suggest creating a target unit spell with no effect at all for your item, just so you wont run into an infinite loop.
 
There you go:

  • Healing Wave
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Healing Wave (Fake Spell)
    • Actions
      • -------- NOTE: The selected spell in the conditions block is not the ACTUAL ability (NO SHIT SHERLOCK!). --------
      • -------- Then, you might ask: Why are you doing this? Simple, if I were to choose the real spell in the conditions block, and also gave it to the item, the first unit would be healed until its HP gets full. --------
      • -------- Yes, that is correct, because I'd be creating a dummy unit casting the very same spell, and that will fire this trigger again. --------
      • -------- Despite the infinite loop that could be easily fixed (by turning this trigger off, ordering dummy to cast spell, and turning it back on) --------
      • -------- ... You'd be facing the double heal towards the first target anyway. --------
      • -------- Without any further ado, let's begin. --------
      • Set tempLoc = (Position of (Triggering unit))
      • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at tempLoc facing Default building facing degrees
      • -------- Make sure you're giving the correct ability to the dummy unit. --------
      • Unit - Add Healing Wave (Correct spell) to (Last created unit)
      • Unit - Order (Last created unit) to Orc Shadow Hunter - Healing Wave (Target unit of ability being cast)
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation(udg_tempLoc)
Note: Both abilities are based off the Healing Wave (neutral hostile), because, for the fake spell, the player won't waste their item on a unit that has its HP full.

EDIT: Also, the only downside is that the lightning effect won't follow the item caster while it lasts.
 

Attachments

Last edited:
Status
Not open for further replies.
Back
Top