Problem with added items in shop

Ragnar Rök

New Member
Reaction score
0
Hello!

I want this trigger to exchange a Tome of Agility(1) (costs 1 lumber) with a Tome of Agility(2) (costs 2 lumber) as soon as the buying hero has 11* agility. Well the trigger almost does, it adds a "Tome of Agility(2)" but the "Tome of Agility(1)" stays:confused:.

However I can live with that.
The serious problem is that the "Tome of Agility(2)" is not given to the hero and instantly used as with the first one, instead it drops on the ground below the shop:banghead:

The two Items are exact copies except for the lumbercost and it works when the shop has the item from the beginning aswell! So it has nothing to do with the items stats.

Thank you.


Code:
Stats
    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
                (Agility of (Buying unit) (Exclude bonuses)) Equal to 10
            Then - Actions
                Neutral Building - Add Tome of Agility (2) to (Selling unit) with 5 in stock and a max stock of 5
                Neutral Building - Remove Tome of Agility (1) from (Selling unit)
            Else - Actions

*Note that
Code:
If - Conditions
                (Agility of (Buying unit) (Exclude bonuses)) Equal to 10
means that while the hero still has 10 agility he buys the 11:th book and gets 11 agility before the books are changed.
 

hi_im_bob

......and you are?
Reaction score
44
I dont have WE editor open, I can if you need me to, but I believe that there are two actions under Hero.

Hero - Give Hero Item
Hero (Or Unit) - Order Unit to Use Item
 

Ragnar Rök

New Member
Reaction score
0
I dont have WE editor open, I can if you need me to, but I believe that there are two actions under Hero.

Hero - Give Hero Item
Hero (Or Unit) - Order Unit to Use Item

Yes I could give the dropped item to the hero but if there are several heroes and shops in the region I can't come up with a way to refer to the buying hero.
 

hi_im_bob

......and you are?
Reaction score
44
All you would have to do is add
Code:
Set tempUnit = Buying Unit       BEFORE the IF/Then/Else
Hero - Give tempUnit Item        AFTER The Then
Hero (Or Unit) - Order tempUnit to Use Item       After the Then
 

Ragnar Rök

New Member
Reaction score
0
I have found out why it didnt work!

Even though it was not needed for items allready on the shop list, the shop did not have the "Select hero" ability witch was required for added items to function properly.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top