Unit - Any Unit uses (Ability[transform to Form 1]) at Morph 11 - Unit Start stage (Ignore shared abilities)
Local Variables
Conditions
Actions
Unit - Add 1 Behavior:Morphing to (Triggering unit) from (Triggering unit)
General - If (Conditions) then do (Actions)
Else If
(Unit type of (Triggering unit)) == Form 2
Then
Variable - Set Experience Tracker[2] = ((Triggering unit) Experience (Current))
General - If (Conditions) then do (Actions)
Else If
(Unit type of (Triggering unit)) == Form 3
Then
Variable - Set Experience Tracker[3] = ((Triggering unit) Experience (Current))
Trigger: Form 2 Start
Events
Unit - Any Unit uses (Ability[transform to Form 2]) at Morph 11 - Unit Start stage (Ignore shared abilities)
Local Variables
Conditions
Actions
Unit - Add 1 Behavior:Morphing to (Triggering unit) from (Triggering unit)
General - If (Conditions) then do (Actions)
Else If
(Unit type of (Triggering unit)) == Form 1
Then
Variable - Set Experience Tracker[1] = ((Triggering unit) Experience (Current))
General - If (Conditions) then do (Actions)
Else If
(Unit type of (Triggering unit)) == Form 3
Then
Variable - Set Experience Tracker[3] = ((Triggering unit) Experience (Current))
Trigger: Form 3 Start
Events
Unit - Any Unit uses (Ability[transform to Form 3]) at Morph 11 - Unit Start stage (Ignore shared abilities)
Local Variables
Conditions
Actions
Unit - Add 1 Behavior:Morphing to (Triggering unit) from (Triggering unit)
General - If (Conditions) then do (Actions)
Else If
(Unit type of (Triggering unit)) == Form 1
Then
Variable - Set Experience Tracker[1] = ((Triggering unit) Experience (Current))
General - If (Conditions) then do (Actions)
Else If
(Unit type of (Triggering unit)) == Form 2
Then
Variable - Set Experience Tracker[2] = ((Triggering unit) Experience (Current))
Trigger: Form 1 End
Events
Unit - Any Unit uses (Ability[transform to form 1]) at Morph 12 - Unit End stage (Ignore shared abilities)
Local Variables
Conditions
Actions
Unit - Set (Triggering unit) Experience to Experience Tracker[1]
Wait 0.0002 Real Time seconds.
Unit - Remove 1 Behavior:Morphing from (Triggering unit)
Trigger: Form 2 End
Events
Unit - Any Unit uses (Ability[transform to form 2]) at Morph 12 - Unit End stage (Ignore shared abilities)
Local Variables
Conditions
Actions
Unit - Set (Triggering unit) Experience to Experience Tracker[2]
Wait 0.0002 Real Time seconds.
Remove 1 Behavior:Morphing from (Triggering unit)
Trigger: Form 3 End
Events
Unit - Any Unit uses (Ability[transform to form 3]) at Morph 12 - Unit End stage (Ignore shared abilities)
Local Variables
Conditions
Actions
Unit - Set (Triggering unit) Experience to Experience Tracker[3]
Wait 0.0002 Real Time seconds.
Remove 1 Behavior:Morphing from (Triggering unit)
End Solution
What I Have
I have a shapeshifting unit made using Auracy's morphing tutorial and it works great! I also have some Marines for it to kill.
What I Want
What I want to do is give each form it's own experience bar and level, which only increase while in the form.
For example, Hero unit can transform into a Zergling and a Hydralisk. Both start at LVL 0,
Hero, in Zergling form, kills 10 Marines and dings LVL 1,
Hero switches to Hydralisk form, which should still be LVL 0, then kills 10 Marines, dings LVL 1, then kills 15 more and dings LVL 2,
Hero switches to Zergling form, which is still LVL 1.
What I Tried
I tried this by giving all units associated with the Hero the veterancies of all forms, then disabling/enabling appropriate experience gains when unit uses appropriate ability morph, but this didn't seem to work.
I tried using a real variable array to track the number of Marines killed by the Hero and setting the killing unit's experience to the value of the real variable each time a Marine was killed, but this doesn't work either.
I have a shapeshifting unit made using Auracy's morphing tutorial and it works great! I also have some Marines for it to kill. What I Want
What I want to do is give each form it's own experience bar and level, which only increase while in the form.
For example, Hero unit can transform into a Zergling and a Hydralisk. Both start at LVL 0, Hero, in Zergling form, kills 10 Marines and dings LVL 1, Hero switches to Hydralisk form, which should still be LVL 0, then kills 10 Marines, dings LVL 1, then kills 15 more and dings LVL 2, Hero switches to Zergling form, which is still LVL 1. What I Tried
I tried this by giving all units associated with the Hero the veterancies of all forms, then disabling/enabling appropriate experience gains when unit uses appropriate ability morph, but this didn't seem to work.
I tried using a real variable array to track the number of Marines killed by the Hero and setting the killing unit's experience to the value of the real variable each time a Marine was killed, but this doesn't work either. Suggestions To Make This Work?
Are you using Blizzard's experience bar and leveling? Technically you can create your own leveling system, such as keeping track of the hero's experience gains etc2. I dont see how that wont work. I have never delved into the hero system in sc2 because to me its kind of complicated lol.
An easy solution would probably be to create different heroes for each different form. When your hero "morphs" all you do is switch out the units via move unit instantly, and Hiding the hero's inactive forms with Unit Show/Hide.
Almost solved. I still have a problem in that the Track Veterancy Gains trigger executes twice during a morph and counts the set experience as experience gained, effectively doubling the end unit's resulting experience. I.e., whenever you switch into a form, that form's experience is set to twice what it was last seen with, twice what it should be.
I tried turning off the Track Veterancy Gains trigger at the beginning of each morph Start trigger and turning it back on at the end of each morph End trigger. This didn't work.
I tried making a behavior called Morphing and adding it to the unit at the each morph Start trigger and removing it at each morph End trigger, and making a condition in Track Veterancy Gains trigger "Unit has behavior:Morphing == False." This didn't work.
Solution
This will explain the triggers necessary to do this with 3 forms, including the original form or caster form.
Global Variable: Experience Tracker = 0.0 <Real[3]>
Trigger: Track Veterancy Gains
Trigger: Form 1 Start
Trigger: Form 2 Start
Trigger: Form 3 Start
Trigger: Form 1 End
Trigger: Form 2 End
Trigger: Form 3 End
End Solution
What I Have
I have a shapeshifting unit made using Auracy's morphing tutorial and it works great! I also have some Marines for it to kill.
What I Want
What I want to do is give each form it's own experience bar and level, which only increase while in the form.
For example, Hero unit can transform into a Zergling and a Hydralisk. Both start at LVL 0, Hero, in Zergling form, kills 10 Marines and dings LVL 1, Hero switches to Hydralisk form, which should still be LVL 0, then kills 10 Marines, dings LVL 1, then kills 15 more and dings LVL 2, Hero switches to Zergling form, which is still LVL 1.
What I Tried
I tried this by giving all units associated with the Hero the veterancies of all forms, then disabling/enabling appropriate experience gains when unit uses appropriate ability morph, but this didn't seem to work.
I tried using a real variable array to track the number of Marines killed by the Hero and setting the killing unit's experience to the value of the real variable each time a Marine was killed, but this doesn't work either.
Suggestions To Make This Work?
Are you using Blizzard's experience bar and leveling? Technically you can create your own leveling system, such as keeping track of the hero's experience gains etc2. I dont see how that wont work. I have never delved into the hero system in sc2 because to me its kind of complicated lol.
An easy solution would probably be to create different heroes for each different form. When your hero "morphs" all you do is switch out the units via move unit instantly, and Hiding the hero's inactive forms with Unit Show/Hide.
Almost solved. I still have a problem in that the Track Veterancy Gains trigger executes twice during a morph and counts the set experience as experience gained, effectively doubling the end unit's resulting experience. I.e., whenever you switch into a form, that form's experience is set to twice what it was last seen with, twice what it should be.
I tried turning off the Track Veterancy Gains trigger at the beginning of each morph Start trigger and turning it back on at the end of each morph End trigger. This didn't work.
I tried making a behavior called Morphing and adding it to the unit at the each morph Start trigger and removing it at each morph End trigger, and making a condition in Track Veterancy Gains trigger "Unit has behavior:Morphing == False." This didn't work.