Ok, this trigger was suppose to be simple but is turning out really long. The trigger is to make it so when a hero uses an item with the right conditions then the owner of that unit will receive a new hero. NOTE: I am using ROC editor so the If/Then/Else action will be long.
The conditions is that the hero must be at least level 5, and the owner must have at least 30 gold.
I broke this down into two triggers and this is what I have so far. The first trigger listed is working fine so far and is just for reference
-A unit owned by player 1 (red) uses an item
-Owner of (triggering unit) current gold is greater/equal to 30
Hero level of (triggering unit) is greater/equal to 5
Unit type of (triggering unit) is equal to MY HERO
Item type of (item manipulated) is equal to (CUSTOM Item hero uses)
-Unit - Remove (triggering unit) from game
Unit - Create 1 NEW HERO at position of (triggering unit)
Player - Set Owner of (triggering unit) - 30 gold
The trigger below is where problems keep showing up. It seems that all other conditions are being met except the one where when a player has the hero at level 5 but not enough gold to meet the second condition.
-A unit owned by player 1 (red) loses an item
-Unit type of (triggering unit) is equal to MY HERO
Item type of (item manipulated) is equal to (CUSTOM Item hero uses)
-If (owner of triggering unit) current gold is greater/equal to 30 then do If Hero level of (triggering unit) is greater/equal to 5 then do skip remaining actions
-If (owner of triggering unit) current gold is less then 30 then do If Hero level of (triggering unit) is less than/equal to 5 then do Create 1 (CUSTOM ITEM) and give it to (triggering unit) else do nothing else do if Hero level of (triggering unit) is less than/equal to 5 then do Create 1 (CUSTOM ITEM) and give it to (triggering unit) else do If (owner of triggering unit) current gold is less then 30 then do Create 1 (CUSTOM ITem and give it to (triggering unit) else do nothing
[/B]
The conditions is that the hero must be at least level 5, and the owner must have at least 30 gold.
I broke this down into two triggers and this is what I have so far. The first trigger listed is working fine so far and is just for reference
-A unit owned by player 1 (red) uses an item
-Owner of (triggering unit) current gold is greater/equal to 30
Hero level of (triggering unit) is greater/equal to 5
Unit type of (triggering unit) is equal to MY HERO
Item type of (item manipulated) is equal to (CUSTOM Item hero uses)
-Unit - Remove (triggering unit) from game
Unit - Create 1 NEW HERO at position of (triggering unit)
Player - Set Owner of (triggering unit) - 30 gold
The trigger below is where problems keep showing up. It seems that all other conditions are being met except the one where when a player has the hero at level 5 but not enough gold to meet the second condition.
-A unit owned by player 1 (red) loses an item
-Unit type of (triggering unit) is equal to MY HERO
Item type of (item manipulated) is equal to (CUSTOM Item hero uses)
-If (owner of triggering unit) current gold is greater/equal to 30 then do If Hero level of (triggering unit) is greater/equal to 5 then do skip remaining actions
-If (owner of triggering unit) current gold is less then 30 then do If Hero level of (triggering unit) is less than/equal to 5 then do Create 1 (CUSTOM ITEM) and give it to (triggering unit) else do nothing else do if Hero level of (triggering unit) is less than/equal to 5 then do Create 1 (CUSTOM ITEM) and give it to (triggering unit) else do If (owner of triggering unit) current gold is less then 30 then do Create 1 (CUSTOM ITem and give it to (triggering unit) else do nothing
[/B]