- Joined
- Apr 21, 2012
- Messages
- 344
I'm trying to make it so that when a specific unit uses an ability he is replaced by another one. The unit he is replaced with also has an ability that when used turns him back to his original unit.
For a better mental picture...
Unit 1 (Default): Abilities -> Military Structures, Tech Structures, Defensive Structures
Unit 2 (Military): Abilities -> Default Structures, Tech Structures, Defensive Structures
Unit 3 (Tech): Abilities -> Default Structures, Military Structures, Defensive Structures
Unit 4 (Defensive): Abilities -> Default Structures, Military Structures, Tech Structures
Here is what the trigger looks like...
Problem is, when i use Military Structures, I get Worker (Military). But, when i use Default Structures, I get Worker (Defensive). All in all, it doesn't do what i wan't it to. Any advice/tips?
For a better mental picture...
Unit 1 (Default): Abilities -> Military Structures, Tech Structures, Defensive Structures
Unit 2 (Military): Abilities -> Default Structures, Tech Structures, Defensive Structures
Unit 3 (Tech): Abilities -> Default Structures, Military Structures, Defensive Structures
Unit 4 (Defensive): Abilities -> Default Structures, Military Structures, Tech Structures
Here is what the trigger looks like...
-
Events
- Unit - A unit Begins casting an ability
- Conditions
-
Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Ability being cast) Equal to (==) Default Structures
-
Then - Actions
- Unit - Replace (Casting unit) with a Worker using The old unit's relative life and mana
-
Multiple FuctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Owner of (Last replaced unit)) Equal to (==) (Owner of (Casting unit))
-
Then - Actions
- Selection - Add (Last replaced unit) to selection for (Owner of (Casting unit))
-
Else - Actions
- Do nothing
-
If - Conditions
-
Else - Actions
- Do nothing
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
Problem is, when i use Military Structures, I get Worker (Military). But, when i use Default Structures, I get Worker (Defensive). All in all, it doesn't do what i wan't it to. Any advice/tips?