Slayerxx
You can change this now in User CP.
- Reaction score
- 3
So i have two heros, Both the same but one is a stronger tank and the other is a weaker striker. What i want to do is when the Tank decides that her would like to hit faster, Use's an Attack Stance ability, it removes the tank and changes the hero to weaker striker. I have this setup in game Caches so it retains the other learned abilities and such. here are the triggers here.
This Trigger Sets up the Original Game cache and stores the Tank and Striker Unit into its own game Cache.
This Then Updates Each Hero in there Game Cache when they learn a Skill.
Finally This Changes the hero Between the 2 hero's.
So the Problem is that when you go to Cast the Attach Stance ability the Tank is Removed (as he is the Default hero) and Then the Weak Hero is not Created. Help.
This Trigger Sets up the Original Game cache and stores the Tank and Striker Unit into its own game Cache.
Trigger:
- Create GameCache
- Events
- Unit - A unit Finishes training a unit
- Conditions
- Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Unit-type of (Trained unit)) Equal to Arthas - Slow Strong
- Then - Actions
- Game Cache - Create a game cache from Full Hero.w3v
- Set GameCache[1] = (Last created game cache)
- Set USlow_Strong_Hero = (Trained unit)
- Game Cache - Store (Trained unit) as Strong Hero of StanceHeros in GameCache[1]
- Game Cache - Save GameCache[1]
- Unit - Create 1 Arthas - Fast Weak for (Owner of (Trained unit)) at ((Position of (Trained unit)) offset by (100.00, 100.00)) facing Default building facing degrees
- Set UFast_Weak_Hero = (Last created unit)
- Game Cache - Create a game cache from Full Hero.w3v
- Set GameCache[0] = (Last created game cache)
- Game Cache - Store (Last created unit) as Weak Hero of StanceHeros in GameCache[0]
- Game Cache - Save GameCache[0]
- Unit - Remove (Last created unit) from the game
- Game - Display to (All players) the text: (Name of UFast_Weak_Hero)
- Game - Display to (All players) the text: (Name of USlow_Strong_Hero)
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Events
This Then Updates Each Hero in there Game Cache when they learn a Skill.
Trigger:
- Update GameCache
- Events
- Unit - A unit Learns a skill
- Conditions
- Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Learning Hero) Equal to UFast_Weak_Hero
- Then - Actions
- Game Cache - Clear GameCache[0]
- Game Cache - Create a game cache from Full Hero.w3v
- Set GameCache[0] = (Last created game cache)
- Game Cache - Store (Learning Hero) as Weak Hero of StanceHeros in GameCache[0]
- Set UFast_Weak_Hero = (Learning Hero)
- Game Cache - Save GameCache[0]
- Game - Display to (All players) the text: (Name of UFast_Weak_Hero)
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Learning Hero) Equal to USlow_Strong_Hero
- Then - Actions
- Game Cache - Clear GameCache[1]
- Game Cache - Create a game cache from Full Hero.w3v
- Set GameCache[1] = (Last created game cache)
- Game Cache - Store (Learning Hero) as Strong Hero of StanceHeros in GameCache[1]
- Set USlow_Strong_Hero = (Learning Hero)
- Game Cache - Save GameCache[1]
- Game - Display to (All players) the text: (Name of USlow_Strong_Hero)
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Events
Finally This Changes the hero Between the 2 hero's.
Trigger:
- Change Stance
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) Equal to Attack Stance Change
- Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Casting unit) Equal to UFast_Weak_Hero
- Then - Actions
- Game Cache - Restore Strong Hero of StanceHeros from GameCache[1] for (Owner of (Casting unit)) at (Position of (Casting unit)) facing (Facing of (Casting unit))
- Unit - Remove (Casting unit) from the game
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Casting unit) Equal to USlow_Strong_Hero
- Then - Actions
- Game Cache - Restore Weak Hero of StanceHeros from GameCache[0] for (Owner of (Casting unit)) at (Position of (Casting unit)) facing (Facing of (Casting unit))
- Unit - Remove (Casting unit) from the game
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Events
So the Problem is that when you go to Cast the Attach Stance ability the Tank is Removed (as he is the Default hero) and Then the Weak Hero is not Created. Help.