Metamorphosis.

avalya

New Member
Reaction score
37
I haz an idea! Use engineering upgrade that replaces the old ability with the new one (engineering upgrade is in a disabled spellbook that the morphed unit has as a standard ability).
 

Ryuu

I am back with Chocolate (:
Reaction score
64
Weep, your new trigger still doesn't work as it should. y was still added, whether or not the unit has x.

vypur85, your trigger didn't work too. When my unit doesn't have x in its original form, this happened:

When I clicked on my ability, y was added for a moment, but disappears after I have morphed.​

And when my unit has x in its original form:

When I clicked on my ability, y replaced x for a moment, but both x and y disappears after I have morphed. When my unit reverts back to its original form, x reappears.​

> I haz an idea! Use engineering upgrade that replaces the old ability with the new one (engineering upgrade is in a disabled spellbook that the morphed unit has as a standard ability).

Hmm.. does engineering upgrade restores back x when my unit reverts back to its original form?​
 

vypur85

Hibernate
Reaction score
803
Code:
Event
 A unit starts the effect of an ability
Condition
 Ability being cast Equal to Metamorphosis
 [B]Level of Ability X Greater than 0[/B]
Actions
 If then else
  Condition
    Unit-type of (Triggering unit) Equal to YourNormalUnitType
  Then - Action
    [B]Wait 0.01 seconds[/B]
    Unit - Add Ability Y to (Triggering unit)
    Unit - Set level of Ability Y to level of Ability X...
    Player - Disable Ability X for (Owner of (Triggering unit))
  Else - Action
    [B]Wait 0.01 seconds[/B]
    Player - Enable Ability X for (Owner of (Triggering unit))
    Unit - Remove Ability Y to (Triggering unit)

Try adding the bolded stuff.
 

Ryuu

I am back with Chocolate (:
Reaction score
64
I don't understand why it still didn't work the way it should.
What happens now is, y wasn't added at all.
 

avalya

New Member
Reaction score
37
Yes, the engineering upgrade reverts once the spell is removed, since your other unit (the morphed one) has it as a standard ability (added in the object editor and not via triggers) it will be removed when the spell ends, thus reverting the spell(s) back to normal.
 

Weep

Godspeed to the sound of the pounding
Reaction score
400
Weep, your new trigger still doesn't work as it should. y was still added, whether or not the unit has x.
Oh, right, whoops:

Trigger:
  • Morph Ability Swap
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Metamorphosis
      • Or - Any (Conditions) are true
        • Conditions
          • (Level of X for (Triggering unit)) Greater than 0
          • (Level of Y for (Triggering unit)) Greater than 0
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of X for (Triggering unit)) Greater than 0
        • Then - Actions
          • Unit - Add Y to (Triggering unit)
          • Unit - Set level of Y for (Triggering unit) to (Level of X for (Triggering unit))
          • Unit - Remove X from (Triggering unit)
        • Else - Actions
          • Unit - Add X to (Triggering unit)
          • Unit - Set level of X for (Triggering unit) to (Level of Y for (Triggering unit))
          • Unit - Remove Y from (Triggering unit)
 
General chit-chat
Help Users

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top