HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Help with dysfunctional add Ability

07-06-2005, 08:45 PM#1
Tossrock
I posted this and another question on the General Development side, but figured since this is more trigger oriented, I'd ask it here too.

Code:
Contagion Use
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Contagion [Hero Abil]
    Actions
        Set ContagionActive[(Player number of (Owner of (Casting unit)))] = True
        Set ContagionLevel[(Player number of (Owner of (Casting unit)))] = (Level of Contagion [Hero Abil] for (Casting unit))
        Unit - Remove Contagion [Hero Abil] from (Casting unit)
        Unit - Add Contagion [Attack Mod] to (Casting unit)
        Unit - Set Level of Contagion [Attack Mod] for (Casting unit) to ContagionLevel[(Player number of (Owner of (Casting unit)))]

Contagion [Hero Abil] is a dummy based off Summon Bear, and Contagion [Attack Mod] is an edited version of Disease Cloud - Meatwagon. The trigger works as far as removing [Hero Abil], but it never adds [Attack Mod]. I thought it may be due to the setting of the level (It's a unit ability with three levels) but when I left it unset, or set it to one, it still didn't appear. Is there some kind of issue with giving heros unit abilities?
07-06-2005, 08:56 PM#2
Anitarf
No, that's not an issue, a bigger issue would be removing a Hero ability from the hero, as hero skilly can't be added back to him.

Apart from that, my only guess why your trigger isn't working is that after you remove the ability that is being cast from the hero, you loose the event response (casting unit)... just a guess, though, add an action that displays the name of casting unit after you remove the ability to verify if this is it, or just don't remove the hero skill, because you probably don't want to permanently loose it.
07-06-2005, 09:14 PM#3
Tossrock
<3 That seems to be it. Storing the unit as a variable and then adding the ability to the variable worked fine.

Now to get the ability itself working..