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

Help with Scroll of Multiheal

Status
Not open for further replies.
Level 13
Joined
May 10, 2009
Messages
868
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.
 
Level 6
Joined
Aug 5, 2017
Messages
251
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)
 
Level 13
Joined
May 10, 2009
Messages
868
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.
 
Level 13
Joined
May 10, 2009
Messages
868
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

  • Healing Wave (item).w3x
    23.4 KB · Views: 36
Last edited:
Status
Not open for further replies.
Top