- Joined
- Jul 20, 2009
- Messages
- 295
Hello everyone.
Explanation:
Im creating several heroes each with different SpellBook Ability, after certain levels (in an irregular pattern) the SpellBook Ability increases in level (containing more spells in it as it levels)
Problem:
In triggers, I have to do the following [Shortened Version]:
I got to do this (IfThenElse sequence) for a single hero about 40 times, and times this by the number of heroes that my map contains (Number of triggers containing this amount of IfThenElse)... it will be a lot.
What I'm asking for is, is there a way to reduce this and make it as simple as possible without changing the concept of how I want it to be. (e.g. the SpellBook has to be levelled whenever the hero gains some irregular levels)
Thank you.
Explanation:
Im creating several heroes each with different SpellBook Ability, after certain levels (in an irregular pattern) the SpellBook Ability increases in level (containing more spells in it as it levels)
Problem:
In triggers, I have to do the following [Shortened Version]:
-
Hero1 Levels
-
Events
- Unit - A unit Gains a level
-
Conditions
- (Unit-type of (Triggering unit)) Equal to Hero1
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Hero level of (Triggering unit)) Greater than or equal to 75
-
Then - Actions
- Unit - Set level of SpellBook [Hero1] for (Triggering unit) to 16
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Hero level of (Triggering unit)) Greater than or equal to 70
-
Then - Actions
- Unit - Set level of SpellBook [Hero1] for (Triggering unit) to 15
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Hero level of (Triggering unit)) Greater than or equal to 68
-
Then - Actions
- Unit - Set level of SpellBook [Hero1] for (Triggering unit) to 14
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
What I'm asking for is, is there a way to reduce this and make it as simple as possible without changing the concept of how I want it to be. (e.g. the SpellBook has to be levelled whenever the hero gains some irregular levels)
Thank you.