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

change and increase item ability

Status
Not open for further replies.
Level 2
Joined
Jul 21, 2020
Messages
14
hi,

is it possible to change the stats or add an ability of an item with a Trigger?
I want, that a Hero is able to buy a base item with like +1 int and +2 str and if he buys a dummy foliant the stats of this item should be changing to +2 int and +4 str.
I was trying to do it with this, but it wont work

  • Test
    • Events
      • Unit - A unit Sells an item (from shop)
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • (Item-type of (Sold Item)) Equal to Cape of Mistweaver +1
              • (Item-type of (Item carried by (Buying unit) of type Cape of Mistweaver (Level 1))) Equal to Cape of Mistweaver (Level 1)
        • Then - Actions
          • Hero - Drop (Item carried by (Buying unit) of type Cape of Mistweaver (Level 1)) from (Buying unit).
          • Item - For Item: (Last dropped item), Add Ability: Ge: Str (+1)
          • Item - Set Name of (Last dropped item) to Cape of Mistweaver (Level 2)
          • Item - Set Tooltip of (Last dropped item) to ...new tooltip...
          • Set VariableSet Int_Test = (Int_Test + 1)
          • Ability - Set Ability: (Item: (Last dropped item)'s Ability with Ability Code: Ge: int (+3))'s Integer Level Field: Intelligence Bonus ('Iint') of Level: 0 to Int_Test
          • Hero - Give (Last dropped item) to (Buying unit)
        • Else - Actions

In this trigger the str is not added, the int is not changing and the text is also not changing.
I have tryed it with dropping the item and just changing the stats of the item in the inventory of the Hero.
I now i could just create a simular item to the base item and if he buyes the dummy foliant take the old item and add a new one. But that would too much work to do...creating hundrets of items and more abilities.
 
Level 2
Joined
Jul 21, 2020
Messages
14
that is what i did with this:

  • Item - For Item: (Last dropped item), Add Ability: Ge: Str (+1)
 
Level 24
Joined
Jun 26, 2020
Messages
1,852
that is what i did with this:

  • Item - For Item: (Last dropped item), Add Ability: Ge: Str (+1)
Oh sorry I didn't see it, but why did you ask this?
is it possible to change the stats or add an ability of an item with a Trigger?
, but now seeing better the trigger, what is this condition?
  • (Item-type of (Item carried by (Buying unit) of type Cape of Mistweaver (Level 1))) Equal to Cape of Mistweaver (Level 1)
Did you know if the trigger even run? Display a text to see if is running.
 
Level 2
Joined
Jul 21, 2020
Messages
14
yes it is running through i have tryed it with a text output.

and yes this trigger exist, but it is not working like i am thinking of. If i have the item in my inventory and change the ability of this item, nothing will happen. So i dropped the item and change the ability than, but this is also not working.
 
Level 24
Joined
Jun 26, 2020
Messages
1,852
One more thing (because I don't know what is happening), do you know the tooltip only is visible when you buy the item? (Is basically the name), if you wanna change the description you should change the extended tooltip and the description.
 
Level 2
Joined
Jul 21, 2020
Messages
14
Thanks i will change it,
but i still dont know why this is not working
  • Item - For Item: (Last dropped item), Add Ability: Ge: Str (+1)
or this
  • Ability - Set Ability: (Item: (Last dropped item)'s Ability with Ability Code: Ge: int (+3))'s Integer Level Field: Intelligence Bonus ('Iint') of Level: 0 to Int_Test
am i doing something wrong?
 
Status
Not open for further replies.
Top