- Joined
- Jun 27, 2010
- Messages
- 2,763
I made this trigger that gives items and upgrades them (ability items)for each hero of the computer players. However, every time after it's triggered it causes brief lag. An if the computer players are more so is the lag. So, can you advice me how to make the trigger not cause lag?
-
Items for Computers
-
Events
-
Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Level Less than or equal to 5
-
-
Then - Actions
-
Unit Group - Pick every unit in Computer_Players_Gr and do (Actions)
-
Loop - Actions
-
Set random[(Player number of (Owner of (Picked unit)))] = (Random integer number between 1 and 100)
-
Hero - Create Item[random[(Player number of (Owner of (Picked unit)))]] and give it to (Picked unit)
-
Item - Set charges remaining in (Last created item) to 2
-
Unit - Increase level of Ability[random[(Player number of (Owner of (Picked unit)))]] for (Picked unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Level Equal to 1
-
-
Then - Actions
-
Set random[(Player number of (Owner of (Picked unit)))] = (Random integer number between 1 and 100)
-
Hero - Create Item[random[(Player number of (Owner of (Picked unit)))]] and give it to (Picked unit)
-
Item - Set charges remaining in (Last created item) to 2
-
Unit - Increase level of Ability[random[(Player number of (Owner of (Picked unit)))]] for (Picked unit)
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Level Greater than 1
-
-
Then - Actions
-
Set random[(Player number of (Picked player))] = (Random integer number between 1 and 6)
-
For each (Integer A) from 1 to 120, 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 (Picked unit) in slot random[(Player number of (Owner of (Picked unit)))])) Equal to Item[(Integer A)]
-
-
Then - Actions
-
Item - Set charges remaining in (Item carried by (Picked unit) in slot random[(Player number of (Owner of (Picked unit)))]) to ((Charges remaining in (Item carried by (Picked unit) in slot (Player number of (Owner of (Picked unit))))) + 1)
-
Unit - Increase level of Ability[(Integer A)] for (Picked unit)
-
-
Else - Actions
-
-
-
-
-
Else - Actions
-
-
-
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Level Greater than 5
-
-
Then - Actions
-
Unit Group - Pick every unit in Computer_Players_Gr and do (Actions)
-
Loop - Actions
-
Set random[(Player number of (Picked player))] = (Random integer number between 1 and 6)
-
For each (Integer A) from 1 to 120, 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 (Picked unit) in slot random[(Player number of (Owner of (Picked unit)))])) Equal to Item[(Integer A)]
-
-
Then - Actions
-
Item - Set charges remaining in (Item carried by (Picked unit) in slot random[(Player number of (Owner of (Picked unit)))]) to ((Charges remaining in (Item carried by (Picked unit) in slot (Player number of (Owner of (Picked unit))))) + 1)
-
Unit - Increase level of Ability[(Integer A)] for (Picked unit)
-
-
Else - Actions
-
-
-
-
Set random[(Player number of (Picked player))] = (Random integer number between 1 and 6)
-
For each (Integer A) from 1 to 120, 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 (Picked unit) in slot random[(Player number of (Owner of (Picked unit)))])) Equal to Item[(Integer A)]
-
-
Then - Actions
-
Item - Set charges remaining in (Item carried by (Picked unit) in slot random[(Player number of (Owner of (Picked unit)))]) to ((Charges remaining in (Item carried by (Picked unit) in slot (Player number of (Owner of (Picked unit))))) + 1)
-
Unit - Increase level of Ability[(Integer A)] for (Picked unit)
-
-
Else - Actions
-
-
-
-
-
-
-
Else - Actions
-
-
-