First of all, Hello.
I'm trying to create sort of a "requirement" system on my map, which implies using some integer to make it work, when the condition only includes one Integer Variable everything works fine, but when I tried to put 2 diferent conditions including integers on them it just won't work.
Here is the code:
Now, in the other one (the one of only 1 integer as condition) everything works fine, but here there is an issue, when I get at least ONE of the conditions (either getting 10 PuntosTroll or 15 PuntosArania) it gives the item to the hero, and it doesn't display ANY message to the players and also it doesn't subtracts the points of any of both integers, it's like it needed only one of the conditions, and it overrides the rest of the trigger.
The only way that this trigger works it's when you have the adecuate amount of points (15 and 10), and it displays the message, makes the subtraction of the integer and that.
Now the question is, why it displays "If all conditions are true" if it activates when only one of them is actually reached, and also, how can I make this trigger work?
Thanks in advance.
PS: just to clarify
PuntosArania and PuntosTroll are integers variables, you need to kill certains creeps to raise their values.
I'm trying to create sort of a "requirement" system on my map, which implies using some integer to make it work, when the condition only includes one Integer Variable everything works fine, but when I tried to put 2 diferent conditions including integers on them it just won't work.
Here is the code:
Trigger:
- Comprar Item 2
- Events
- Unit - A unit Acquires an item
- Conditions
- Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Item-type of (Item being manipulated)) Equal to Item Troll
- PuntosArania Less than or equal to 14
- PuntosTroll Less than or equal to 9
- Then - Actions
- Item - Remove (Item being manipulated)
- Unit - Order (Hero manipulating item) to Stop
- Game - Display to (All allies of (Owner of (Hero manipulating item))) the text: No tienes suficient...
- Else - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- PuntosArania Greater than or equal to 15
- PuntosTroll Greater than or equal to 10
- (Item-type of (Item being manipulated)) Equal to Item Troll
- Then - Actions
- Game - Display to (All allies of (Owner of (Hero manipulating item))) the text: (Has adquirido: + (Name of (Item being manipulated)))
- Set PuntosArania = (PuntosArania - 15)
- Set PuntosTroll = (PuntosTroll - 10)
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Events
Now, in the other one (the one of only 1 integer as condition) everything works fine, but here there is an issue, when I get at least ONE of the conditions (either getting 10 PuntosTroll or 15 PuntosArania) it gives the item to the hero, and it doesn't display ANY message to the players and also it doesn't subtracts the points of any of both integers, it's like it needed only one of the conditions, and it overrides the rest of the trigger.
The only way that this trigger works it's when you have the adecuate amount of points (15 and 10), and it displays the message, makes the subtraction of the integer and that.
Now the question is, why it displays "If all conditions are true" if it activates when only one of them is actually reached, and also, how can I make this trigger work?
Thanks in advance.
PS: just to clarify
PuntosArania and PuntosTroll are integers variables, you need to kill certains creeps to raise their values.