• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Hero Morphing Spell

Status
Not open for further replies.
Level 6
Joined
Aug 29, 2004
Messages
159
Heya guys

i'm making a footman wars map with custom heroes, one of which is an Archon (ie starcraft) who has the ability to transform back and forth into a Dark Archon.
They have abilities which share a common theme (ie Psionic Storm to Maelstrom, Hallucination to Mind Control), which i want to transfer as he transforms. Ie if he has lv3 Hallucination as an Archon and transforms to a Dark Archon, he will have Lv3 Mind Control.
So far i have decided that the transformation needs to be based off 'Bear Form', with two alternate heroes, primarily so that the learning of skills makes sense. Does anyone know a way to to do the triggers such that it will find the level of his ability before he morphs, and then change the level of the secondary ability after the morphing is done?
BTW it is a 12 player map so it needs to work multiplayer, but not simultaneously for the same player.
At the moment some wierd things are happening: the first morphing command is sometimes basically ignored, or when he morphs the Dark Archon only learns Archon spells, but it hasnt worked properly once yet :(.
Any ideas?
Bort
 
Level 11
Joined
Jul 20, 2004
Messages
2,760
Well, since you know each ability you can store the level of each into a variable, just when the unit begins the morphing. And then, when the unit is morphed just give to the paired unit the level stored in the variable. It would be like this (I'll make the example only for one ability.

Make an integer array variables for each ability. You'll need two triggers:

1) Archon to Dark Archon

Event - An Unit Starts The Effect of an Ability
Conditions - Ability Being Cast equal to MorphDark
Actions - set Ability1[Player Number (Owner of (Triggering Unit))] = Level of Hallucination for (Triggering Unit)
- Wait 1.50 //time in which the morphing takes place. If the morphing takes less/more, reduce/increase it.
- Set level of Mind Control for (Triggering unit) to Ability1[Player Number (Owner of (Triggering Unit))]

2) Dark Archon to Archon

Event - An Unit Starts The Effect of an Ability
Conditions - Ability Being Cast equal to Morph
Actions - set Ability1[Player Number (Owner of (Triggering Unit))] = Level of Mind Control for (Triggering Unit)
- Wait 1.50 //time in which the morphing takes place. If the morphing takes less/more, reduce/increase it.
- Set level of Hallucination for (Triggering unit) to Ability1[Player Number (Owner of (Triggering Unit))]

That's kinda all! It may sound complicated but in truth it is simple. If you have other questions, don't hesitate to post!

~Daelin
 
Level 6
Joined
Aug 29, 2004
Messages
159
sounded really simple, i'd tried basically the same thing before but shied away from it on principal: it was half again the number of variables i already had in the map!
Unfortunately, the damn thing still isnt working. (!!)

At least they morph the right way around now, but even with a "Remove ability from unit" function the morphed unit still has an 'unbearform' ability. Hmm. Also, he will morph, but when morphed the Dark Archon still learns all the Archon spells (and vice-versa if i start with a dark archon).
Grr.
Also i have another thing, about another hero, who can build :). I want one of his abilities to be 'tech up' but i dont want it to appear in his interface, how do i do that (if i put 'NONE' as the field value there's just a green square). It doesnt matter what the ability is so long as he can learn it and can't use it, really, as i have the learning of it tied to a trigger function setting the upgrade level.

Thanks for help, Daelin, help me again please :D

Bort
 
Level 11
Joined
Jul 20, 2004
Messages
2,760
For the invisible icon of the ability, if it is passive, then just Player - Disable Ability, and if it doesn't work properly add it to a Spellbook ability, give the spellbook to the caster and don't forget to disable it. Such abilities should be disabled at Map Initialization. I didn't try to make a hero learn disabled abilities. But channel for example can be made so that its icon doesn't appear, but it exists. Just don't mess up with fields, except description, icon and usually look stuff.

I guess you will have to play with morphings and remove them/add them. When you morph the unit to dark archon, remove the "dark archon morph" and add "archon morph" and vice versa.

And as for the "dark archon" learning "Archon" abilities, just remove those when morphing is complete, and vice versa. When unit morphs back, it should get them back. Play with removing and adding until you get the right result!

~Daelin
 
Level 6
Joined
Aug 29, 2004
Messages
159
OMG i dont get whats happening.
Both Archon and Dark Archon are Voidwalkers, with different colours (archon = blue, darkon = red). When i click the morph button, it will change from "lv 10 Archon" to "lv 10 Darkon" but it won't change the shading value?!?!? omg this is annoying me

*EDIT: This works as well even if the models are different: Changing it to a sasquatch ignores the first colour change! Could this be some inherent programming of the spell which is working against me?
 
Level 6
Joined
Aug 29, 2004
Messages
159
[email protected] for MSN

I've modified the ability etc. Now what happens is that the hero morphs, changes colour correctly, and is put with all the abilities of the new form at the correct levels, but can't learn those abilties.
I think the problem is that i'm morphing a hero to another hero, and world edit doesnt like that, it still counts him as having 8 hero abilities i think...
 
Level 11
Joined
Jul 20, 2004
Messages
2,760
There is a huge problem I guess, because you want it as a hero. Adding abilities to a hero doesn't allow that hero to learn further levels of that ability. If you want those two units independent, with no common abilities, don't give any dependency equivalents. It should still work that way!

~Daelin
 
Status
Not open for further replies.
Top