-
Level Up System
-
Events
-
Player - Player 1 (Red) skips a cinematic sequence
-
Conditions
-
Actions
-
Unit Group - Pick every unit in (Units currently selected by Player 1 (Red)) and do (Actions)
-
Loop - Actions
-
Hero - Set (Picked unit) Hero-level to ((Hero level of (Picked unit)) + 1), Show level-up graphics
-
Unit - Reset ability cooldowns for (Picked unit)
-
Unit - Set mana of (Picked unit) to 100.00%
-
Unit - Set life of (Picked unit) to 100.00%
The unit group leaks, though I guess this is just a debug trigger so it doesn't
really matter.
-
Unit - Move ShunpoStrikeInvisDummy instantly to (Position of ShunpoStrikeEnemy)
Location leak.
-
EtherliteLevelUp
-
Events
-
Unit - A unit Gains a level
-
Conditions
-
(Unit-type of (Triggering unit)) Equal to Daughter of the Eltnam Family
-
Actions
-
-------- Level up "Etherlite" every 10 levels --------
-
If ((Real((Level of (Triggering unit)))) Equal to 10.00) then do (Unit - Increase level of Etherlite for (Triggering unit)) else do (Do nothing)
-
If ((Real((Level of (Triggering unit)))) Equal to 20.00) then do (Unit - Increase level of Etherlite for (Triggering unit)) else do (Do nothing)
-
If ((Real((Level of (Triggering unit)))) Equal to 30.00) then do (Unit - Increase level of Etherlite for (Triggering unit)) else do (Do nothing)
-
If ((Real((Level of (Triggering unit)))) Equal to 40.00) then do (Unit - Increase level of Etherlite for (Triggering unit)) else do (Do nothing)
-
If ((Real((Level of (Triggering unit)))) Equal to 50.00) then do (Unit - Increase level of Etherlite for (Triggering unit)) else do (Do nothing)
Triggers like this are very inefficient for a couple reasons,
1. Every time you see something in (brackets), that's a function call. The more you can minimize function calls the more efficient your trigger will be. So, for example, instead of getting ((Real((Level of (Triggering unit)))) every time, you can just set a temporary real variable so you only have to call those 4 functions once.
2. Running a bunch of separate single-function if/then/else like this in a row causes every one of them to run whenever the trigger is executed, whereas if you nested multi-function if/then/else blocks in eachother (e.g. if the unit isn't level 10, then check if it's level 20, otherwise level the ability up), the later would only run if the former came up false. Also, I'm pretty sure (Do nothing) is an absolutely meaningless function call which you can avoid using with the multi-function if/then/else. There's really no reason to ever use a single-function.