| 09-20-2006, 05:14 AM | #1 |
Hello. In my map you can type a command to change your model. It 'replaces' the units and they keep their xp/hp/mp but not their abilities learned. When you replace your character, I have it so you automatically learn 'Shoot', (The basic attack). Other than that, you need to repick a dozen spells. How should I go about making it automatically remember and repick the spells? I tried to start something with the 'A unit learns a skill' event but it was quite buggy. Just a little help and direction would be appreciated very much. Thanks in advanced! |
| 09-20-2006, 06:00 AM | #2 |
Try this function from PitzerMike: http://www.wc3jass.com/viewtopic.php?t=304 |
| 09-20-2006, 07:03 AM | #3 |
You could also use a chaos morphing ability instead of replacing the unit with triggers. |
| 09-20-2006, 06:01 PM | #4 |
You have a custom skill learning system for your heroes from the sound of it? How do your heroes get skills? On my Onslaught map heroes technically buy items from skill trainers, which is used as the event for a trigger which gives them the appropriate ability based on the item they picked. It then logs the ability in a global array (or you could use attached variables on the hero) so you can refer to that to know which abilities the hero has. |
| 09-20-2006, 07:00 PM | #5 |
Use burrow ability |
| 09-20-2006, 07:42 PM | #6 |
Before you replace the abilities, see what abilities he has learnt, and what level they are, store them to a integer, then when you replace it, if the level of the ability is >0, add it and set it to the integer. |
| 09-20-2006, 09:59 PM | #7 | ||
Quote:
My heroes learn abilities as they normally would, from leveling up. I'll look into burrow and morphing as well. Quote:
Thanks for the replies! edit: Tried Burrow... crashed wc3. >.< edit2: Map is in sig, try it out *cough* |
| 09-21-2006, 07:17 AM | #8 |
Yes, throuhg If/Then/Else Its either boolean: Unit has ability equal to true or integer: Level of ability for unit greater than 0. |
| 09-21-2006, 02:25 PM | #9 |
Thank you! I guess I'll put some restriction of changing models. +... 1 rep... |
| 09-21-2006, 06:37 PM | #10 |
Chaos morphing didn't work? |
| 09-21-2006, 08:16 PM | #11 |
How do you get the unit to use chaos morphing? Issue Order With No Target didn't have any chaos related commands and I couldn't find another way to make it morph. |
| 09-21-2006, 09:10 PM | #12 |
You add a chaos based ability to the unit and he will morph. Like the human chaos ability for the siege engine. |
| 09-21-2006, 11:18 PM | #13 |
<- self sufficent. ignore edited out~ |
