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

Item Ability becomes Unit Ability {shield that provides armor and the Defend ability}

Status
Not open for further replies.
Level 10
Joined
Feb 7, 2005
Messages
409
Hey guys, I'm trying to make a shield that provides bonus armour and when you click it, cast's defend, making the unit move slower and use their defend animations. However when I try to do this, it gives the "defend" ability to the unit itself, instead of just activating when I click the ability. Does anyone know how to fix this?

basically, I want an item that casts defend when you click it, and does not give the Defend ability to the hero (just to clarify)

-Teld
 
Level 2
Joined
Mar 30, 2009
Messages
30
First make dummy ability for defend and add it to your item

Then you'll have to use trigger

;hope you have some knowledge

Events
-Uses item (your item)

Conditions
-Item used (your item)

Actions
-If,Then,Else
IF
- [Integer1] equals 0
THEN
-Order unit (your unit) [defend activate]
-Set [integer1] to "1"
Else
-order unit (your unit) [defend deactivate]
-Set [integer1] to "0"

this isn't c/p trigger. I can make one for pasting as soon as i install warcarft.

Next you have to give your unit defend ability and disable it for owner of that unit, that should hide it but not make it unusable.

Hope it helps

The Sorrow
 
Level 10
Joined
Mar 31, 2009
Messages
732
Copy an item that can be clicked, change its name and icons and whatever to your new item.
Remove its current action.
Make a trigger that catches when this item is used, and applies the defend effect to the unit holding the item.
Also in that trigger, check if the defend effect is already active, then remove the effect.
 
Level 2
Joined
Mar 7, 2005
Messages
23
hey..

first thing u should notice is defend animation is for footman and captain units.. but the effect can be trigger for every unit..

here ur answer :)
1 - open object editor --- > ability
2 - creat a new spell from (item) -> (spellbook) " YOUR_SPELL_BOOK"
3 - creat a new spell from (unit) -> (defend )
4 - in techtree - requirment -> remove defend upgrade from this ability.
5 - add ur defend spell to ur " YOUR_SPELL_BOOK"
6 - creat a new spell from ( for example ) Item Temporary Area Armor Bonus "YOUR_ITEM_SPELL"
7 - remove its art - caster attachment
8 - set data - defense bonuse -> 0
9 - set duration on both hero and normal -> 0
10 - set number of charges -> 0
11 - set target allowed -> self
12 - open object editor --- > effects/buff
13 - make a new buff from scroll of protaction "YOUR_ITEM_SPELL_BUFF"
14 - remove its art - target attachments
15 - set "YOUR_ITEM_SPELL" - buff -> "YOUR_ITEM_SPELL_BUFF"
16 - open object editor --- > items
17 - creat a new item from (for example) Lesser Clarity Potion "YOUR_ITEM"
18 - add "YOUR_ITEM_SPELL" to "YOUR_ITEM"
19 - now change icons of all things u made if u like

trigger part
============
20 - make a trigger for picking item
  • check if unit acquires item
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Your_Item_type
    • Actions
      • Player - Disable YOUR_SPELL_BOOK for (owner of (triggering unit))
      • Unit - Add YOUR_SPELL_BOOK to (Triggering unit)
21 - make another trigger + a boolean var-type with false defualt
  • when a unit use an item
    • Events
      • Unit - A unit Uses an item
    • Conditions
      • (Item being manipulated) Equal to YOUR_ITEM
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • MY_BOOLEAN_VAR Equal to False
        • Then - Actions
          • Unit - Order (triggering unit) to Human Footman - Defend
          • Set MY_BOOLEAN_VAR = True
        • Else - Actions
          • Unit - (triggering unit) to Human Footman - Stop Defend
          • Set MY_BOOLEAN_VAR = False
hope it works.. and tell me if u need morethings

i think u can make most of casting items with this way. not only defend

*** forgot about that u want the item gives even bonus armor.
for that..
make an spell from devution aura. set the target allowed to self and remov e the art caster attachment from ur aura buff.
add this armor aura to ur spell book .
 
Last edited:
Status
Not open for further replies.
Top