- Joined
- Jul 12, 2017
- Messages
- 139
Hi, I wanna create a trigger that if a unit equips this item, he/she will gain bonus xp but mine seem to leak and cause lag so I need help here.
There are 3 levels of this equipment so I separate its trigger to 3 but I think there might be a better way to do this? Any suggestion?
There are 3 levels of this equipment so I separate its trigger to 3 but I think there might be a better way to do this? Any suggestion?
-
Boots of Experience 1
-

Events
-


Unit - A unit Dies
-
-

Conditions
-


((Dying unit) belongs to an enemy of Neutral Hostile) Equal to True
-


(Random integer number between 1 and 100) Less than or equal to 20
-
-

Actions
-


Set UnitGroup1 = (Units in (Playable map area))
-


Unit Group - Pick every unit in UnitGroup1 and do (Actions)
-



Loop - Actions
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






((Picked unit) has an item of type Boots of Experience) Equal to True
-
-





Then - Actions
-






Hero - Add 10 experience to (Picked unit), Hide level-up graphics
-
-





Else - Actions
-
-
-
-


Custom script: call DestroyGroup(udg_UnitGroup1)
-
-
-
Golden Boots 1
-

Events
-


Unit - A unit Dies
-
-

Conditions
-


((Dying unit) belongs to an enemy of Neutral Hostile) Equal to True
-


(Random integer number between 1 and 100) Less than or equal to 75
-
-

Actions
-


Set UnitGroup1 = (Units in (Playable map area))
-


Unit Group - Pick every unit in UnitGroup1 and do (Actions)
-



Loop - Actions
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






((Picked unit) has an item of type Golden Boots) Equal to True
-
-





Then - Actions
-






Player - Add 1 to (Owner of (Picked unit)) Current gold
-
-





Else - Actions
-
-
-
-


Unit Group - Pick every unit in UnitGroup1 and do (Actions)
-



Loop - Actions
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






((Dying unit) belongs to an enemy of Neutral Hostile) Equal to True
-






((Dying unit) is A Hero) Equal to True
-






((Picked unit) has an item of type Golden Boots) Equal to True
-
-





Then - Actions
-






Set Point1 = (Position of (Picked unit))
-






Player - Add 25 to (Owner of (Picked unit)) Current gold
-






Floating Text - Create floating text that reads |c00FFFF00+25 Gold!... at Point1 with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
-






Set Floating_Text10 = (Last created floating text)
-






Floating Text - Set the velocity of Floating_Text10 to 64.00 towards 90.00 degrees
-






Floating Text - Change Floating_Text10: Disable permanence
-






Floating Text - Change the lifespan of Floating_Text10 to 5.00 seconds
-






Floating Text - Change the fading age of Floating_Text10 to 2.50 seconds
-






Custom script: call RemoveLocation(udg_Point1)
-
-





Else - Actions
-
-
-
-


Custom script: call DestroyGroup(udg_UnitGroup1)
-
-






