HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Remembering Learned Spells

09-20-2006, 05:14 AM#1
Nubcookie
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
PipeDream
Try this function from PitzerMike: http://www.wc3jass.com/viewtopic.php?t=304
09-20-2006, 07:03 AM#3
Anitarf
You could also use a chaos morphing ability instead of replacing the unit with triggers.
09-20-2006, 06:01 PM#4
Moss
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
[VDM]Amn
Use burrow ability
09-20-2006, 07:42 PM#6
The)TideHunter(
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
Nubcookie
Quote:
Try this function from PitzerMike: http://www.wc3jass.com/viewtopic.php?t=304
I don't know too much jass but I'll take a look at it.

My heroes learn abilities as they normally would, from leveling up.

I'll look into burrow and morphing as well.

Quote:
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.
How do you check to see what abilities a unit has? through if/then/else actions?

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
The)TideHunter(
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
Nubcookie
Thank you! I guess I'll put some restriction of changing models.

+... 1 rep...
09-21-2006, 06:37 PM#10
Anitarf
Chaos morphing didn't work?
09-21-2006, 08:16 PM#11
Nubcookie
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
shadow1500
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
Nubcookie
<- self sufficent. ignore

edited out~