- Joined
- Dec 12, 2012
- Messages
- 96
OK, so this is my first post on this site and kinda frustrated working on a trigger for a certain event.
I'm trying to create a hero for whoever completes or acquires 6 items of the same type. This hero will be created for the owner of the acquiring unit and at the position of that acquiring unit.
I had this new trigger based on some post I found somewhere on the net but it doesn't work for me.
I had two triggers before that one and they work but not properly.
Item_Arch1 is also an integer variable
Item_Arch_Hero is a unit variable
MaltheoA - Acquiring the item, everytime the unit acquires the item, the int variable which is initially set on 0 are then added by 1 on loop.
MaltheoB - Losing/Dropping the item, the int variable is decreased by 1
The problem on these triggers (MaltheoA & MaltheoB) is that acquiring the item, REGARDLESS of whatever units acquire it, adds up to the int variable. So taking for example UnitA acquires 3 items of the same type and UnitB acquires the item with same number and type, the last one to acquire the 6th item gets the Price.
This is somehow similar to the Dota item Orchid Malevolence, but here the unit is created, not the item.
I hope I explained it carefully here, if not please tell me so. Hope somebody can help.
I'm trying to create a hero for whoever completes or acquires 6 items of the same type. This hero will be created for the owner of the acquiring unit and at the position of that acquiring unit.
I had this new trigger based on some post I found somewhere on the net but it doesn't work for me.
-
Maltheo II
-
Events
- Unit - A unit Acquires an item
-
Conditions
- (Item-type of (Item being manipulated)) Equal to Crown of Archimonde +10000
-
Actions
- Set Item_ArchInt = 0
-
For each (Integer A) from 1 to 6, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Item-type of (Item carried by Item_Arch_Hero in slot Item_ArchInt)) Equal to Crown of Archimonde +10000
-
Then - Actions
- Set Item_ArchInt = (Item_ArchInt + 1)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Item_ArchInt Equal to 6
-
Then - Actions
- Item - Remove (Item carried by (Triggering unit) of type Crown of Archimonde +10000)
- Item - Remove (Item carried by (Triggering unit) of type Crown of Archimonde +10000)
- Item - Remove (Item carried by (Triggering unit) of type Crown of Archimonde +10000)
- Item - Remove (Item carried by (Triggering unit) of type Crown of Archimonde +10000)
- Item - Remove (Item carried by (Triggering unit) of type Crown of Archimonde +10000)
- Item - Remove (Item carried by (Triggering unit) of type Crown of Archimonde +10000)
- Unit - Create 1 Maltheo for (Owner of Item_Arch_Hero) at (Position of Item_Arch_Hero) facing Default building facing degrees
- Else - Actions
-
If - Conditions
-
Events
I had two triggers before that one and they work but not properly.
-
MaltheoA
-
Events
- Unit - A unit Acquires an item
-
Conditions
- ((Triggering unit) has an item of type Crown of Archimonde +10000) Equal to True
-
Actions
- Set Item_Arch1 = (Item_Arch1 + 1)
- Set Item_Arch_Hero = (Triggering unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Item_Arch1 Equal to 6
-
Then - Actions
- Item - Remove (Item carried by Item_Arch_Hero in slot 1)
- Item - Remove (Item carried by Item_Arch_Hero in slot 2)
- Item - Remove (Item carried by Item_Arch_Hero in slot 3)
- Item - Remove (Item carried by Item_Arch_Hero in slot 4)
- Item - Remove (Item carried by Item_Arch_Hero in slot 5)
- Item - Remove (Item carried by Item_Arch_Hero in slot 6)
- Unit - Create 1 Maltheo for (Owner of Item_Arch_Hero) at (Position of Item_Arch_Hero) facing Default building facing degrees
- Else - Actions
-
If - Conditions
-
Events
-
MaltheoB
-
Events
- Unit - A unit Loses an item
-
Conditions
-
And - All (Conditions) are true
-
Conditions
- (Item-type of (Item being manipulated)) Equal to Crown of Archimonde +10000
- (Triggering unit) Equal to Item_Arch_Hero
-
Conditions
-
And - All (Conditions) are true
-
Actions
- Set Item_Arch1 = (Item_Arch1 - 1)
-
Events
Item_Arch1 is also an integer variable
Item_Arch_Hero is a unit variable
MaltheoA - Acquiring the item, everytime the unit acquires the item, the int variable which is initially set on 0 are then added by 1 on loop.
MaltheoB - Losing/Dropping the item, the int variable is decreased by 1
The problem on these triggers (MaltheoA & MaltheoB) is that acquiring the item, REGARDLESS of whatever units acquire it, adds up to the int variable. So taking for example UnitA acquires 3 items of the same type and UnitB acquires the item with same number and type, the last one to acquire the 6th item gets the Price.
This is somehow similar to the Dota item Orchid Malevolence, but here the unit is created, not the item.
I hope I explained it carefully here, if not please tell me so. Hope somebody can help.