• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

need a spell

Status
Not open for further replies.
Level 6
Joined
Aug 26, 2009
Messages
221
someone help me! i need a spell with this criteria:

name: chemistry modificator
type: passive
effect: if the hero use potion, it's automatically heal 50% of the potion effect to all the allies near him, making animation alchemist's potion spray, and make the hero invernureable for 3 sec.

anybody can help?
 
Level 13
Joined
Sep 14, 2008
Messages
1,407
Well you need something like this:

Event: Unit starts effect of ability
Condition: Level of "chemistry modificator" for trigg unit > 0
Actions:

If(ability being cast) = "small potion"
Pick every unit in range of 400 of trig unit and do: set hp of picked unit to "hp of picked unit + "thePotionValue/2"

Do an if for every potion.




I just got an idea how to do this shorter. but it will be dificult.

->
Event: Unit manipulates an item
Same condition:
Actions:

Create "dummyHero" for owner of trig unit (dummy hero has 9999999 hp)
set hp of last create unit to 1
Create "item of type of "item being manipulated" for last created unit
Make "last created unit" use "item in slot 1" (i think it is possible isnt it?)

If(hp of last created unit > 1)
Then:
Pick every unit in range of "400" of trig unit and do actions:
Set hp of picked unit to hp of picked unit + "(hp of last created unit -1) /2"

remove last created unit





I think this should also work :/ but it might bug
 
Status
Not open for further replies.
Top