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

Arrow skill in an object [consuption]

Status
Not open for further replies.
Level 2
Joined
Jul 10, 2009
Messages
26
Well, first hi everybody... now i'd like to know how can i make an hability that consumes an object for every use [repleaces the mana for an object].
For example the skill FROST ARROW, it uses 8 mana per shot [but it adds some damage else] so i only want the aditional damage and every time the skill is used, one potion [only and example], be consumed.
I will really thanks who can help me with this
:infl_thumbs_up::infl_thumbs_up::infl_thumbs_up:
 
Last edited:
Level 10
Joined
Mar 16, 2009
Messages
354
For example the skill FROST ARROW, it uses 8 mana per shot [but ir adds some damage else] so i only want the aditional damage and every time the skill is used, one potion [only and example], be consumed.

Trigger:
event - generic unit event - unit starts the effect of an ability
condition - ability comparison - ability being cast equal to "FROST ARROW"
condition - variable ItemEquiped equal 1
action - if/then/else multi function
if - Boolean - Hero has item of type "potion" equal to true
then - item - set charges - set charges remaining in item carried by hero of type "potion" equal to(arithmatic(charges remaining in potion -1)
else - set variable ItemEquiped equal 0
Action - if/then/else -
if - Boolean - Hero has item of type "potion" equal to false
then - set variable ItemEquiped equal to 0

Trigger:
Event - Generic unit - unit obtains an item
Condition - item type comparison - (item being manipulated) equal to potion
Action - set variable ItemEquiped equal 1
 
Level 2
Joined
Jul 10, 2009
Messages
26
Trigger:
event - generic unit event - unit starts the effect of an ability
condition - ability comparison - ability being cast equal to "FROST ARROW"
condition - variable ItemEquiped equal 1
action - if/then/else multi function
if - Boolean - Hero has item of type "potion" equal to true
then - item - set charges - set charges remaining in item carried by hero of type "potion" equal to(arithmatic(charges remaining in potion -1)
else - set variable ItemEquiped equal 0
Action - if/then/else -
if - Boolean - Hero has item of type "potion" equal to false
then - set variable ItemEquiped equal to 0

Trigger:
Event - Generic unit - unit obtains an item
Condition - item type comparison - (item being manipulated) equal to potion
Action - set variable ItemEquiped equal 1

THAT'S GREAT! but i'm sorry i was not clear.. i'm looking for an spell for an object, the object is able to be AUTO-CAST or not, then when i active the skill one "POTION" is consumed and some damage is added to my character until i attack, then after i attak the damage added desappears until i back to active the skill.
P.D The skill is not in the hero, it is in the object to do not use the skill slots of the hero.
Else could you add an action that adds an effect light BOLTS in the hands?
 
Level 2
Joined
Jul 10, 2009
Messages
26
too many steps, too lazy to type, but I uploaded my tested map to epicwar. Link bellow download it and copy the triggers.

Hope this is what you wanted this time . . . xD

click here to download the map

that's almost complete the only problem is a bug that happens when i finish one kind of arrows, when i have activated the frost arrows and i attak the times you have configurated [10] and i use them all after that when i try to charge the other kind of arrows it doesn't work, like if it be stopped or i don't know what.
After that all, the triggers are great :infl_thumbs_up::infl_thumbs_up:
 
Status
Not open for further replies.
Top