Gold Return Trigger Doesn't Work

Kahiera

Active Member
Reaction score
9
Trigger:
  • ER
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Item-type of (Item being manipulated)) Equal to Entangling Roots 1
          • (Item-type of (Item being manipulated)) Equal to Entangling Roots 2
          • (Item-type of (Item being manipulated)) Equal to Entangling Roots 3
          • (Item-type of (Item being manipulated)) Equal to Entangling Roots 4
          • (Item-type of (Item being manipulated)) Equal to Entangling Roots 5
          • (Item-type of (Item being manipulated)) Equal to Entangling Roots 6
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to Entangling Roots 1
          • (Level of (Triggering unit)) Less than 8
        • Then - Actions
          • Player - Add -2 to (Owner of (Triggering unit)) Current gold
        • Else - 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 (Item being manipulated)) Equal to Entangling Roots 2
                  • (Level of (Triggering unit)) Less than 18
            • Then - Actions
              • Player - Add -22 to (Owner of (Triggering unit)) Current gold
            • Else - 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 (Item being manipulated)) Equal to Entangling Roots 3
                      • (Level of (Triggering unit)) Less than 28
                • Then - Actions
                  • Player - Add -54 to (Owner of (Triggering unit)) Current gold
                • Else - 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 (Item being manipulated)) Equal to Entangling Roots 4
                          • (Level of (Triggering unit)) Less than 36
                    • Then - Actions
                      • Player - Add -140 to (Owner of (Triggering unit)) Current gold
                    • Else - 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 (Item being manipulated)) Equal to Entangling Roots 5
                              • (Level of (Triggering unit)) Less than 48
                        • Then - Actions
                          • Player - Add -310 to (Owner of (Triggering unit)) Current gold
                        • Else - 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 (Item being manipulated)) Equal to Entangling Roots 6
                                  • (Level of (Triggering unit)) Less than 58
                            • Then - Actions
                              • Player - Add -350 to (Owner of (Triggering unit)) Current gold
                            • Else - Actions
what do i need to change to get it to work? the hero buying the item is level 1
 

Cookiemaster

New Member
Reaction score
36
First of all, remove all the "And all conditions are true" in there. It is automatically like that. You will only need to use that if you combine it with "Or" conditions and stuff like that.

Second, what do you want to actually achieve?
 

Kahiera

Active Member
Reaction score
9
ok i've tried separating the if-thens, and removing the "and all conditions are true"
still doesn't work
and as for what im trying to accomplish, i want it so that if my hero buys the item and is not the proper level, the item will be removed (different trigger that works) and will recieve a refund for the item
also i knoticed that i have negative values, although, when i fix them to be positive, and even doubled, the owner of the hero doesn't recieve a refund.

these are the 2 triggers that i currently have.
this one works
Trigger:
  • Entangling Roots
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Item-type of (Item being manipulated)) Equal to Entangling Roots 1
          • (Item-type of (Item being manipulated)) Equal to Entangling Roots 2
          • (Item-type of (Item being manipulated)) Equal to Entangling Roots 3
          • (Item-type of (Item being manipulated)) Equal to Entangling Roots 4
          • (Item-type of (Item being manipulated)) Equal to Entangling Roots 5
          • (Item-type of (Item being manipulated)) Equal to Entangling Roots 6
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to Entangling Roots 1
          • (Level of (Triggering unit)) Greater than or equal to 8
        • Then - Actions
          • Unit - Add EntanglingRoots to (Triggering unit)
          • Custom script: call UnitMakeAbilityPermanent(GetTriggerUnit(),true,'A00A')
          • Custom script: call UnitMakeAbilityPermanent(GetTriggerUnit(),true,'A009')
          • Hero - Drop (Item carried by (Triggering unit) of type (Item-type of (Item being manipulated))) from (Triggering unit)
          • Item - Remove (Last dropped item)
          • Set EntanglingLevel[(Player number of (Owner of (Triggering unit)))] = (Level of Entangling Roots for (Triggering unit))
          • Neutral Building - Remove Entangling Roots 1 from Balance[(Player number of (Triggering player))]
          • Neutral Building - Add Entangling Roots 2 to Balance[(Player number of (Triggering player))] with 1 in stock and a max stock of 1
        • Else - 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 (Item being manipulated)) Equal to Entangling Roots 2
                  • (Level of (Triggering unit)) Greater than or equal to 18
            • Then - Actions
              • Unit - Set level of Entangling Roots for (Triggering unit) to ((Level of Entangling Roots for (Triggering unit)) + 1)
              • Hero - Drop (Item carried by (Triggering unit) of type (Item-type of (Item being manipulated))) from (Triggering unit)
              • Item - Remove (Last dropped item)
              • Set EntanglingLevel[(Player number of (Owner of (Triggering unit)))] = (Level of Entangling Roots for (Triggering unit))
              • Neutral Building - Remove Entangling Roots 2 from Balance[(Player number of (Triggering player))]
              • Neutral Building - Add Entangling Roots 3 to Balance[(Player number of (Triggering player))] with 1 in stock and a max stock of 1
            • Else - 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 (Item being manipulated)) Equal to Entangling Roots 3
                      • (Level of (Triggering unit)) Greater than or equal to 28
                • Then - Actions
                  • Unit - Set level of Entangling Roots for (Triggering unit) to ((Level of Entangling Roots for (Triggering unit)) + 1)
                  • Hero - Drop (Item carried by (Triggering unit) of type (Item-type of (Item being manipulated))) from (Triggering unit)
                  • Item - Remove (Last dropped item)
                  • Set EntanglingLevel[(Player number of (Owner of (Triggering unit)))] = (Level of Entangling Roots for (Triggering unit))
                  • Neutral Building - Remove Entangling Roots 3 from Balance[(Player number of (Triggering player))]
                  • Neutral Building - Add Entangling Roots 4 to Balance[(Player number of (Triggering player))] with 1 in stock and a max stock of 1
                • Else - 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 (Item being manipulated)) Equal to Entangling Roots 4
                          • (Level of (Triggering unit)) Greater than or equal to 36
                    • Then - Actions
                      • Unit - Set level of Entangling Roots for (Triggering unit) to ((Level of Entangling Roots for (Triggering unit)) + 1)
                      • Hero - Drop (Item carried by (Triggering unit) of type (Item-type of (Item being manipulated))) from (Triggering unit)
                      • Item - Remove (Last dropped item)
                      • Set EntanglingLevel[(Player number of (Owner of (Triggering unit)))] = (Level of Entangling Roots for (Triggering unit))
                      • Neutral Building - Remove Entangling Roots 4 from (Selling unit)
                      • Neutral Building - Add Entangling Roots 5 to (Selling unit) with 1 in stock and a max stock of 1
                    • Else - 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 (Item being manipulated)) Equal to Entangling Roots 5
                              • (Level of (Triggering unit)) Greater than or equal to 48
                        • Then - Actions
                          • Unit - Set level of Entangling Roots for (Triggering unit) to ((Level of Entangling Roots for (Triggering unit)) + 1)
                          • Hero - Drop (Item carried by (Triggering unit) of type (Item-type of (Item being manipulated))) from (Triggering unit)
                          • Item - Remove (Last dropped item)
                          • Set EntanglingLevel[(Player number of (Owner of (Triggering unit)))] = (Level of Entangling Roots for (Triggering unit))
                          • Neutral Building - Remove Entangling Roots 5 from (Selling unit)
                          • Neutral Building - Add Entangling Roots 6 to (Selling unit) with 1 in stock and a max stock of 1
                        • Else - 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 (Item being manipulated)) Equal to Entangling Roots 6
                                  • (Level of (Triggering unit)) Greater than or equal to 58
                            • Then - Actions
                              • Unit - Set level of Entangling Roots for (Triggering unit) to ((Level of Entangling Roots for (Triggering unit)) + 1)
                              • Hero - Drop (Item carried by (Triggering unit) of type (Item-type of (Item being manipulated))) from (Triggering unit)
                              • Item - Remove (Last dropped item)
                              • Set EntanglingLevel[(Player number of (Owner of (Triggering unit)))] = (Level of Entangling Roots for (Triggering unit))
                              • Neutral Building - Remove Entangling Roots 6 from (Selling unit)
                            • Else - Actions
                              • EGUI - Simulate an error message for (Owner of (Triggering unit)) with the message Your hero is not yet at the correct level. You will recieve a refund for this item.
                              • Hero - Drop (Item carried by (Triggering unit) of type (Item-type of (Item being manipulated))) from (Triggering unit)
                              • Item - Remove (Last dropped item)

and this one doesn't
Trigger:
  • ER
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Item-type of (Item being manipulated)) Equal to Entangling Roots 1
          • (Item-type of (Item being manipulated)) Equal to Entangling Roots 2
          • (Item-type of (Item being manipulated)) Equal to Entangling Roots 3
          • (Item-type of (Item being manipulated)) Equal to Entangling Roots 4
          • (Item-type of (Item being manipulated)) Equal to Entangling Roots 5
          • (Item-type of (Item being manipulated)) Equal to Entangling Roots 6
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to Entangling Roots 1
          • (Level of (Triggering unit)) Less than 8
        • Then - Actions
          • Player - Add 2 to (Owner of (Triggering unit)) Current gold
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to Entangling Roots 2
          • (Level of (Triggering unit)) Less than 18
        • Then - Actions
          • Player - Add 22 to (Owner of (Triggering unit)) Current gold
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to Entangling Roots 3
          • (Level of (Triggering unit)) Less than 28
        • Then - Actions
          • Player - Add 54 to (Owner of (Triggering unit)) Current gold
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to Entangling Roots 4
          • (Level of (Triggering unit)) Less than 36
        • Then - Actions
          • Player - Add 140 to (Owner of (Triggering unit)) Current gold
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to Entangling Roots 5
          • (Level of (Triggering unit)) Less than 48
        • Then - Actions
          • Player - Add 310 to (Owner of (Triggering unit)) Current gold
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to Entangling Roots 6
          • (Level of (Triggering unit)) Less than 58
        • Then - Actions
          • Player - Add 350 to (Owner of (Triggering unit)) Current gold
        • Else - Actions
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> (Level of (Triggering unit)) Greater than or equal to 8

This passes for all levels from 8 on, including, for example, level 58.


The second "trigger" seems to work the other way around though:
> (Level of (Triggering unit)) Less than 8

Actually, all of those conditions there pass if you are, for example, level 1.



> and is not the proper level

Well, what is the correct level for a given item?
 

Kahiera

Active Member
Reaction score
9
the first trigger needs to know if the hero is at or above the proper level to purchase the item. that means if they're level 58 and they're buying the one that needs at least level 8 then they can get it. so that part is correct and it does work.
the other trigger is for when the hero is not yet at the level i want, so if the hero is below level 8 and tries to buy it, they recieve a refund for it. this is what isn't working. and the levels required are the ones listed in the first trigger. 8, 18, 28, 36, 48, 58
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top