• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Need Help concerning items in trigger...

Status
Not open for further replies.
Level 3
Joined
Dec 26, 2004
Messages
43
I want to make it so, when the hero has 3 spécific items, he'll have stats bonus, or a new ability, but when one of these items goes off, he loses the given bonus or ability...

Exemple : Hero has in inventory a wolf helmet (+10 intell), a wolf axe (+ 8 intell) , a wolf coat (+ 2 intell)
Instead of having 20 intel he gets a bonus of 10, so he has 30 intel with the message : +10 intel for aquiring all items of the wolf category...

Is it even possible :/ ?
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
  • Unknown
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Tome of Experience
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Triggering unit)) Equal to Player 1 (Red)
        • Then - Actions
          • Set Wolf_Set_Red = (Wolf_Set_Red + 1.00)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Owner of (Triggering unit)) Equal to Player 2 (Blue)
            • Then - Actions
              • Set Wolf_Set_Blue = (Wolf_Set_Blue + 1.00)
            • Else - Actions
  • Unknown
    • Events
      • Game - Wolf_Set_Red becomes Equal to 3.00
      • Game - Wolf_Set_Blue becomes Equal to 3.00
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Wolf_Set_Red Equal to 3.00
        • Then - Actions
          • Actions
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Wolf_Set_Blue Equal to 3.00
            • Then - Actions
              • Actions
            • Else - Actions
(Wolf_Set_[Color] = Real variable)


I think this should work fine.
Sadly can't use harrays in the event so it makes this trigger about x40 long.

You should of course add a trigger similar to the first one but event is when a unit drops an item and the real=real-1.

If you don't know how to add the attributes - you can either modify the hero's attributes directly with triggers, or add a ability (I suggest using a ability since you can add a description there and, well... you can't mess some how the hero's attributes ^^)/
 
Status
Not open for further replies.
Top