Rllulium
New Member
- Reaction score
- 10
Here is the beginning of a Agility to Evasion system I was building for my map. It works the way it should, except that the second If function in the second trigger ALWAYS goes to "Else - Actions" no matter what. And having the spellbook removed, added and disabled every time the trigger fires is not that great. (It closes the skill leveling menu for example.)
Trigger:
- Attribute Setup
- Events
- Unit - A unit Sells a unit
- Conditions
- ((Sold unit) is A Hero) Equal to True
- Actions
- Set AttributeHero[AttributeIndex] = (Sold unit)
- Set AttributeIndex = (AttributeIndex + 1)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- AttributeIndex Greater than or equal to (Number of players)
- Then - Actions
- Set AttributeIndex = 0
- Trigger - Turn on Evasion <gen>
- Trigger - Turn off (This trigger)
- Else - Actions
- If - Conditions
- Events
Trigger:
- Evasion
- Events
- Time - Every 1.00 seconds of game time
- Conditions
- Actions
- Set AttributeIndex = (AttributeIndex + 1)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- AttributeIndex Greater than or equal to (Number of players)
- Then - Actions
- Set AttributeIndex = 0
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- AttributeAgility[AttributeIndex] Equal to (Agility of AttributeHero[AttributeIndex] (Include bonuses))
- Then - Actions
- Skip remaining actions
- Else - Actions
- Unit - Remove Evasion +90% (book) from AttributeHero[AttributeIndex]
- Unit - Remove Evasion +45% (book) from AttributeHero[AttributeIndex]
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Agility of AttributeHero[AttributeIndex] (Include bonuses)) Greater than or equal to 90
- Then - Actions
- Unit - Add Evasion +90% (book) to AttributeHero[AttributeIndex]
- Player - Disable Evasion +90% (book) for (Owner of AttributeHero[AttributeIndex])
- Skip remaining actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Agility of AttributeHero[AttributeIndex] (Include bonuses)) Greater than or equal to 45
- Then - Actions
- Unit - Add Evasion +45% (book) to AttributeHero[AttributeIndex]
- Player - Disable Evasion +45% (book) for (Owner of AttributeHero[AttributeIndex])
- Skip remaining actions
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- Set AttributeAgility[AttributeIndex] = (Agility of AttributeHero[AttributeIndex] (Include bonuses))
- Events