- Joined
- Apr 23, 2010
- Messages
- 312
After much work and still to no avail I can not add previously used abilities to transformed units.
The whole point is so they don't have to be added manually, but whenever (for example) a druid of the claw transforms into the bear state, that unit loses the ability that was added via triggers. I want to transfer over the level of the ability and add abilities depending on the current level of the first ability (more info in the trigger "End Ability" below).
Any help is appreciated, thank you in advance!
The whole point is so they don't have to be added manually, but whenever (for example) a druid of the claw transforms into the bear state, that unit loses the ability that was added via triggers. I want to transfer over the level of the ability and add abilities depending on the current level of the first ability (more info in the trigger "End Ability" below).
-
V Setup
-
Events
- Map initialization
- Conditions
-
Actions
- -------- --------------------------------------------------------------------------------------------- --------
- -------- Set this to how many kills you want before a bonus is given! --------
- Set V_KillLimit = 3
- -------- --------------------------------------------------------------------------------------------- --------
- Hashtable - Create a hashtable
- Set V_Hashtable = (Last created hashtable)
-
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
-
Loop - Actions
- Set V_HashUnit = (Key (Picked unit))
- Set V_Unit = (Picked unit)
- Hashtable - Save 0 as 0 of V_HashUnit in V_Hashtable
- Unit - Add Rank (Dummy) to V_Unit
- Unit - Add V_Damage Bonus to V_Unit
- Unit - Add V_Armor Bonus to V_Unit
-
Loop - Actions
-
Events
-
V End Ability
-
Events
- Unit - A unit Finishes casting an ability
-
Conditions
-
Or - Any (Conditions) are true
-
Conditions
- (Ability being cast) Equal to Bear Form
- (Ability being cast) Equal to Phoenix Morphing (Egg Related)
-
Conditions
-
Or - Any (Conditions) are true
-
Actions
- Game - Display to (All players) the text: Running
- Set V_HashUnit = (Key (Triggering unit))
- Set V_AbilityUnit[V_HashUnit] = (Triggering unit)
- Set V_RankLevel = (Level of Rank (Dummy) for V_AbilityUnit[V_HashUnit])
- Unit - Add Rank (Dummy) to V_AbilityUnit[V_HashUnit]
- Unit - Set level of Rank (Dummy) for V_AbilityUnit[V_HashUnit] to V_RankLevel
- Unit - Add V_Damage Bonus to V_AbilityUnit[V_HashUnit]
- Unit - Set level of V_Armor Bonus for V_AbilityUnit[V_HashUnit] to V_RankLevel
- Unit - Add V_Armor Bonus to V_AbilityUnit[V_HashUnit]
- Unit - Set level of V_Damage Bonus for V_AbilityUnit[V_HashUnit] to V_RankLevel
- If (V_RankLevel Greater than or equal to 5) then do (Unit - Add V_Level 5 to V_AbilityUnit[V_HashUnit]) else do (Do nothing)
- If (V_RankLevel Greater than or equal to 10) then do (Unit - Add V_Level 10 to V_AbilityUnit[V_HashUnit]) else do (Do nothing)
- If (V_RankLevel Equal to 15) then do (Unit - Add V_Level 15 to V_AbilityUnit[V_HashUnit]) else do (Do nothing)
-
Events
-
V Record
-
Events
- Unit - A unit Dies
- Conditions
-
Actions
- Set V_Unit = (Triggering unit)
- Unit - Remove V_Level 5 from V_Unit
- Unit - Remove V_Level 10 from V_Unit
- Unit - Remove V_Level 15 from V_Unit
- Set V_Killer = (Killing unit)
- Set V_HashUnit = (Key (Killing unit))
- Set V_RankKills = ((Load 0 of V_HashUnit from V_Hashtable) + 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- V_RankKills Equal to V_KillLimit
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Level of Rank (Dummy) for V_Killer) Greater than 0) and ((Level of Rank (Dummy) for V_Killer) Less than 15)
-
Then - Actions
- Unit - Increase level of Rank (Dummy) for V_Killer
- Unit - Increase level of V_Armor Bonus for V_Killer
- Unit - Increase level of V_Damage Bonus for V_Killer
- Special Effect - Create a special effect attached to the origin of V_Killer using Abilities\Spells\Items\AIre\AIreTarget.mdl
- Special Effect - Destroy (Last created special effect)
- If ((Level of Rank (Dummy) for V_Killer) Equal to 5) then do (Unit - Add V_Level 5 to V_Killer) else do (Do nothing)
- If ((Level of Rank (Dummy) for V_Killer) Equal to 10) then do (Unit - Add V_Level 10 to V_Killer) else do (Do nothing)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Rank (Dummy) for V_Killer) Equal to 15
-
Then - Actions
- Unit - Remove V_Level 10 from V_Killer
- Unit - Add V_Level 15 to V_Killer
- Else - Actions
-
If - Conditions
- Set V_RankKills = ((Load 0 of V_HashUnit from V_Hashtable) - V_KillLimit)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
- Hashtable - Save V_RankKills as 0 of V_HashUnit in V_Hashtable
-
Events