Ok, so i asked for and got some help i needed from battle.net however i dont understand it. I've done some decent triggering in wc3 never got into jass but I havn't touched triggers in sc2 yet. can you explain to me how to go about setting up the triggers he is talking about here?
I had to do a lot of ability transfers in my map. I can explain to you how I did it. I'm assuming you're using triggers for your transformation. One warning: this takes a LOT of work, and I'm 90% sure this isn't the best way to do it.
Please note:
THIS WILL NOT WORK IF YOU DON'T HAVE A SEPARATE BUTTON FOR EVERY LEARN ABILITY/LEVELUP
For ability transfers, the hero needs to have the "Learn" ability (which the original unit had) in his ability roster (it does NOT have to be on his command card).
Next, you need a very large array of ability commands, with the first level of array matching the highest player number that has a hero (So if there are four players, and the first player is a hostile, you need 5. If you just have 4 players from 1-4, you just want 4 in the array).
Next, you want another array inside of that array, that equals the number of abilities available. Now you have two options, you can make one massive nested if then else statement, or you can make a lot of tiny triggers. The triggers will look like this
Events:
Unit - Any Unit uses Hellion - Hellion - Arm Overclocked Battery at Generic1 - Any stage (Ignore shared abilities)
Actions:
Variable - Set Abilities Learned[(Triggering player)][0] = (Triggering ability)
Now the annoying part is that you need a separate event and variable for each of these, because the second array [0] needs to change based on the ability. Also another important thing to note is that abilities that level up multiple times needs to have Level 1 before level 2, which needs to be before level 3...
Next, you'll want to restore these abilities. That is the easy part. In you're transformation trigger, you'll want this:
Unit - Order (Last created unit) to (Abilities Learned[(Triggering player)][Learning]) (Replace Existing Orders)
You can do this part however you want. You can use your choice in loops, or you could simply create one action per each ability array [1] [2] [3] [4] and so on.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Ok, so i asked for and got some help i needed from battle.net however i dont understand it. I've done some decent triggering in wc3 never got into jass but I havn't touched triggers in sc2 yet. can you explain to me how to go about setting up the triggers he is talking about here?
I had to do a lot of ability transfers in my map. I can explain to you how I did it. I'm assuming you're using triggers for your transformation. One warning: this takes a LOT of work, and I'm 90% sure this isn't the best way to do it.
Please note: THIS WILL NOT WORK IF YOU DON'T HAVE A SEPARATE BUTTON FOR EVERY LEARN ABILITY/LEVELUP
For ability transfers, the hero needs to have the "Learn" ability (which the original unit had) in his ability roster (it does NOT have to be on his command card).
Next, you need a very large array of ability commands, with the first level of array matching the highest player number that has a hero (So if there are four players, and the first player is a hostile, you need 5. If you just have 4 players from 1-4, you just want 4 in the array).
Next, you want another array inside of that array, that equals the number of abilities available. Now you have two options, you can make one massive nested if then else statement, or you can make a lot of tiny triggers. The triggers will look like this
Events: Unit - Any Unit uses Hellion - Hellion - Arm Overclocked Battery at Generic1 - Any stage (Ignore shared abilities)
Actions: Variable - Set Abilities Learned[(Triggering player)][0] = (Triggering ability)
Now the annoying part is that you need a separate event and variable for each of these, because the second array [0] needs to change based on the ability. Also another important thing to note is that abilities that level up multiple times needs to have Level 1 before level 2, which needs to be before level 3...
Next, you'll want to restore these abilities. That is the easy part. In you're transformation trigger, you'll want this:
Unit - Order (Last created unit) to (Abilities Learned[(Triggering player)][Learning]) (Replace Existing Orders)
You can do this part however you want. You can use your choice in loops, or you could simply create one action per each ability array [1] [2] [3] [4] and so on.