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

using hp regen item if unit has full hp already

Status
Not open for further replies.
Level 4
Joined
Mar 12, 2008
Messages
83
Well this is complete newb question but yeah i can't find a way to allow hp potion to be used if unit has full hp. I think that long time ago i did that but now i really can't find it.
 
Level 4
Joined
Mar 12, 2008
Messages
83
Thanks. One more thing, i would like the item ability to work like the hp potion, without a need of a target, so it casts always on caster automaticly. How to do that?
I already set "target is not required" to TRUE but that dont help.
 
You can use a dummy for that.
  • Trigger
  • Events
    • Unit - A unit uses an item
  • Conditions
    • (Item-type of (Item being manipulated)) Equal to X
  • Actions
    • Set Point1 = (Position of (Triggering unit))
    • Unit - Create 1 dummy for (Owner of (Triggering unit)) at Point1 facing default building degrees
    • Unit - Add Rejuvenation to (Last created unit) //Don't forget to remove "Stats - Mana cost"
    • Unit - Order (Last created unit) to Night Elf Druid of the Claw - Rejuvenation (Triggering unit)
    • Unit - Add a 2.00 seconds generic expiration timer to (Last created unit)
    • Custom script: call RemoveLocation (udg_Point1)
You can base the item ability off Channel with Target type = Instant or Howl of Terror with Targets Allowed only set to 'None' and duration of 0 seconds (Buff must be removed as well, along with the other, Howl of Terror component effects).
 
Level 14
Joined
Nov 18, 2007
Messages
1,084
If you're using a trigger to do that, it might as well be better to make the trigger do the healing. (At least if the healing is instant anyway)

I don't know what you did but setting the No Target Required to true should allow the hero to instantly use the item.

Here's a small test-map of Healing Salve that can be instantly used on the user.
To be honest, it looks kind of odd since the healing has to be done 1 second later after using it. (Blame WC3 for doing things in periods of 1 second)
This could be easily solved if you just trigger the healing.

Edit: Oh, you should just base the item ability off of Healing Salve. Just make sure that you set the fields to your preference.
 

Attachments

  • InstantHeal.w3x
    11.9 KB · Views: 38
Level 4
Joined
Mar 12, 2008
Messages
83
Well i don't know too why this wasn't working but seems like making this ability on base off healing salve works nice. Thank you both :).
 
Status
Not open for further replies.
Top