HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Giving a morphed unit a levelable ability

05-27-2005, 07:50 PM#1
StealthFox
I gave a Mountain King the Stone Form ability which turns it into a Mountain Giant. It is also a hero ability and has 5 levels. The Mountain Giant also has a Spiked Carapace ability so that it can still deal damage to units that attack it. I need help in leveling the Spiked Carapace ability to the same level of the Stone Form ability. The problem is that I can't figure out how to locate the Mountain Giant. (I can't figure out how to do actions on morphed units)
05-27-2005, 08:34 PM#2
Earth-Fury
random unit owned by (player ##) of type (morphed MK unit) ?
05-27-2005, 08:43 PM#3
StealthFox
That doesn't work....I need to figure out how to set a unit variable to the morphed unit.
05-27-2005, 08:46 PM#4
Earth-Fury
unless blizzard coded the game like they usually do,
wouldent a variable refrencing the origional unit referance the morphed unit?
05-27-2005, 08:52 PM#5
StealthFox
Code:
Events

A unit Starts the effect of an ability

Conditions

(Ability being cast) Equal to Mountain Form 

Actions

Set UnitVar = (Triggering unit)
Unit - Add Stalagmite Armor  to UnitVar
Set IntegerVar = (Unspent skill points of UnitVar)
Unit - Set Level of Stalagmite Armor  for UnitVar to (Level of Mountain Form  for (Triggering unit))
Hero - Modify unspent skill points of UnitVar: Set to IntegerVar points

There is the trigger. Doesn't work.
05-27-2005, 09:20 PM#6
Earth-Fury
try casting unit...
05-27-2005, 10:23 PM#7
StealthFox
Casting unit doesn't work either.

[I found out that Stone Form doesn't change the proper name of the hero.]
05-28-2005, 04:22 AM#8
StealthFox
Does anybody know if they can set a morphed unit into a unit variable?
05-28-2005, 05:18 AM#9
StealthFox
I figured out what was wrong. The unit remains the same (It's still the triggering unit), but I have to put a wait on it so that the unit has time to morph, then I can perform actions on it.
05-28-2005, 07:59 AM#10
Earth-Fury
i thoght that was a given 0.o remmeber to used polled waits!
05-28-2005, 10:18 AM#11
Anitarf
And remember about the bug with cast event responses and waits. Lord Vexorian experimented with this and it turned out that "triggering unit" wasn't as buggy as "casting unit" and could still be used to some extent with waits, but I don't remember the details regarding this.

Edit: Just tested a bit and "triggering unit" seems to work quite without problems. Just use that and not "casting unit" and you should be ok. The only thing you need to worry about when using cast event responses and waits are "target point of ability being cast" or "target unit of ability being cast" event responses.
05-28-2005, 10:28 AM#12
Earth-Fury
waits are bugged all around... avoid using them as much as possible.

edit: 1kth post :) more like 5kth if u count my other accounts i used during a time when... erm... yeah. *trails off*