Problem adding ability to trigger that morphs a unit

D

DsD)Core(

Guest
Hey. I have a pyromancer hero that has an ability called Fire Entity. This morphs the pyromancer into a powerful firelord form, and it's supposed to remove 2 of his abilities (spells that keep enemies on distance and damage them from distance) and add 2 other abilities to it (immolation and an ability that keeps units close) as the fire entity form is a melee form.

This ability adding and removing doesn't seem to work at ALL lol. It just removes all abilities and doesn't do what I want it to. What am I doing wrong? Here's my trigger..

Code:
Spell Fire Entity
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to |c00E3CF57Fire Entity 
    Actions
        Player - Set the current research level of Pyro Entity upgrade  to (Level of |c00E3CF57Fire Entity  for (Triggering unit)) for (Owner of (Triggering unit))
        Set LF_Point1 = (Position of (Triggering unit))
        Special Effect - Create a special effect at LF_Point1 using Objects\Spawnmodels\Human\SmallFlameSpawn\SmallFlameSpawn.mdl
        Special Effect - Destroy (Last created special effect)
        Custom script:   call RemoveLocation(udg_LF_Point1)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                EntityCheck[(Player number of (Owner of (Triggering unit)))] Equal to False
            Then - Actions
                Set EntityCheck[(Player number of (Owner of (Triggering unit)))] = True
                Unit - Remove |c00E3CF57Fire Nova  from (Triggering unit)
                Unit - Remove |c00E3CF57Fireblast  from (Triggering unit)
                Unit - Add |c00E3CF57Explosion  to (Triggering unit)
                Unit - Add |c00E3CF57Immolation  to (Triggering unit)
                Unit - Set level of |c00E3CF57Explosion  for (Triggering unit) to (Level of |c00E3CF57Fire Entity  for (Triggering unit))
                Unit - Set level of |c00E3CF57Immolation  for (Triggering unit) to (Level of |c00E3CF57Fire Entity  for (Triggering unit))
            Else - Actions
                Set EntityCheck[(Player number of (Owner of (Triggering unit)))] = False
                Unit - Remove |c00E3CF57Explosion  from (Triggering unit)
                Unit - Remove |c00E3CF57Immolation  from (Triggering unit)
                Unit - Add |c00E3CF57Fire Nova  to (Triggering unit)
                Unit - Add |c00E3CF57Fireblast  to (Triggering unit)

By the way, the upgrade thing does seem to work, but that's irrelevant. It's about the ability adding and removing.
 
D

DsD)Core(

Guest
I actually tried to add the abilities to the firelord form first, but it didn't seem to work. It simply doesn't have the abilities in-game, eventho it does in the object editor. It's really weird and doesn't make sense.
 

nabbig2

New Member
Reaction score
43
Hmmmm....Are they item abilities?

Also, try turning off the trigger THEN try it.
 
D

DsD)Core(

Guest
I just did that and tried it, no difference, doesn't get the abilities I gave it in the object editor. Really, I'm quite a mapmaker but this just doesn't make sense. It's probably something simple I didn't catch, but it's frustrating me.
 

nabbig2

New Member
Reaction score
43
Hmmmmmm.....are you SURE it has the abilities in the object editor, and your SURE the hero is transforming into the right thing?
 
D

DsD)Core(

Guest
One of my members made the ability and I do have my doubts about it. How do I make a unit change into another unit by triggers?

Edit:
Everything IS correct, it doesn't make bloody sense.
 

nabbig2

New Member
Reaction score
43
You can do this:

Code:
Super Form
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to SUPER FORM ABILITY
    Actions
        Special Effect - Create a special effect at (Position of (Triggering unit)) using Abilities\Spells\Items\AIil\AIilTarget.mdl 
        Unit - Replace (Triggering unit) with a Transformed Fire Lord using The new unit's max life and mana

Special effect is completely optional.
 
D

DsD)Core(

Guest
I tried that but the skills are completely messed up, it loses skills and gets spendable points reset and shit.. So I came up with this but the skills in the trigger AREN'T ADDED... WHY? Retarded world editor.

Code:
Spell Fire Entity
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to |c00E3CF57Fire Entity 
    Actions
        Player - Set the current research level of Pyro Entity upgrade  to (Level of |c00E3CF57Fire Entity  for (Triggering unit)) for (Owner of (Triggering unit))
        Set LF_Point1 = (Position of (Triggering unit))
        Special Effect - Create a special effect at LF_Point1 using Objects\Spawnmodels\Human\SmallFlameSpawn\SmallFlameSpawn.mdl
        Special Effect - Destroy (Last created special effect)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                EntityCheck[(Player number of (Owner of (Triggering unit)))] Equal to False
            Then - Actions
                Set EntityCheck[(Player number of (Owner of (Triggering unit)))] = True
                Unit - Replace (Triggering unit) with a |c0083F52Pyromancer (morph) using The old unit's relative life and mana
                Selection - Select (Last replaced unit) for (Owner of (Triggering unit))
                Hero - Learn skill for (Last replaced unit): |c00E3CF57Immolation 
                Hero - Learn skill for (Last replaced unit): |c00E3CF57Explosion 
                Unit - Set level of |c00E3CF57Immolation  for (Last replaced unit) to (Level of |c00E3CF57Fire Entity  for (Triggering unit))
                Unit - Set level of |c00E3CF57Explosion  for (Last replaced unit) to (Level of |c00E3CF57Fire Entity  for (Triggering unit))
            Else - Actions
                Set EntityCheck[(Player number of (Owner of (Triggering unit)))] = False
                Unit - Replace (Triggering unit) with a |c0083F52CPyromancer using The old unit's relative life and mana
                Selection - Select (Last replaced unit) for (Owner of (Triggering unit))
        Custom script:   call RemoveLocation(udg_LF_Point1)
 

Nerfpl

New Member
Reaction score
53
I tried that but the skills are completely messed up, it loses skills and gets spendable points reset and shit.. So I came up with this but the skills in the trigger AREN'T ADDED... WHY? Retarded world editor.

Code:
Spell Fire Entity
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to |c00E3CF57Fire Entity 
    Actions
        Player - Set the current research level of Pyro Entity upgrade  to (Level of |c00E3CF57Fire Entity  for (Triggering unit)) for (Owner of (Triggering unit))
        Set LF_Point1 = (Position of (Triggering unit))
        Special Effect - Create a special effect at LF_Point1 using Objects\Spawnmodels\Human\SmallFlameSpawn\SmallFlameSpawn.mdl
        Special Effect - Destroy (Last created special effect)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                EntityCheck[(Player number of (Owner of (Triggering unit)))] Equal to False
            Then - Actions
                Set EntityCheck[(Player number of (Owner of (Triggering unit)))] = True
                Unit - Replace (Triggering unit) with a |c0083F52Pyromancer (morph) using The old unit's relative life and mana
                Selection - Select (Last replaced unit) for (Owner of (Triggering unit))
                Hero - Learn skill for (Last replaced unit): |c00E3CF57Immolation 
                Hero - Learn skill for (Last replaced unit): |c00E3CF57Explosion 
                Unit - Set level of |c00E3CF57Immolation  for (Last replaced unit) to (Level of |c00E3CF57Fire Entity  for (Triggering unit))
                Unit - Set level of |c00E3CF57Explosion  for (Last replaced unit) to (Level of |c00E3CF57Fire Entity  for (Triggering unit))
            Else - Actions
                Set EntityCheck[(Player number of (Owner of (Triggering unit)))] = False
                Unit - Replace (Triggering unit) with a |c0083F52CPyromancer using The old unit's relative life and mana
                Selection - Select (Last replaced unit) for (Owner of (Triggering unit))
        Custom script:   call RemoveLocation(udg_LF_Point1)

If you replace unit, you need to make complete transfer. items,skills,level of skills, stats etc. also replacing unit need to have same stats growth and such (best if its a copy)

Btw i think you use wrong morph ability, check again. there are few morph abilities, and some works better etc.

Also about that first trigger post. there is possibility that morphed unit have diffrent ID so its not "casting unit" anymore.
 
D

DsD)Core(

Guest
The root ability is Bear Form, isn't that supposed to work? And how do I do a complete transfer? What's a good trigger example of doing so?
 

nabbig2

New Member
Reaction score
43
No, Bear form is a unit ability; that might mess you up. First, try using metamoprhosis, and try that without triggers. See if that will work first.
 
D

DsD)Core(

Guest
Alright I made a new spell from Metamorphosis and it's working (the form switching) but it's completely IGNORING the spells I put on the alternate form. Nothing changes except for the unit name and model atm. How do I change spells & levels?
 
D

DsD)Core(

Guest
They do, I can switch forth and back, that's not the problem. Any other abilities I add, however, are completely ignored. I want the normal form to have different abilities than the alternate form.
 

Nerfpl

New Member
Reaction score
53
add abilities from object editor to morphed unit.
i bet that morphed unit gets other ID and you are not able to show it to trigger (you do but wrong)

after casting, in trigger make wait ~1 sec, then pick all units of type (morphed when you cast from normal, normal when you cast in morphed) and then add/remove to "picked unit"

EDIT: its quite complicated actually (for me)
Pick can be done without w8 if you set event to "finished casting" but i found some problems with setting levels, at end i screwed whole trigger and gived up ;p

btw i noticed that abilities from "Abilities - normal" stay at hero, i mean, if you morph in warden, you will get shadowmeld by default.
 
D

DsD)Core(

Guest
My current trigger is this:

And note that it IS working for some reason, because I do get the health and damage bonus from the upgrade. So it does catch the upgrade. But the special effects, the abilities, are all completely neglected. What the hell is wrong? Please.. I give +rep for an answer!

Code:
Spell Fire Entity
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to |c00E3CF57Fire Entity1 
    Actions
        Set Caster = (Casting unit)
        Set id[1] = (Level of |c00E3CF57Fire Entity1  for Caster)
        Set id[2] = (Player number of (Owner of Caster))
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                EntityCheck[id[2]] Equal to False
            Then - Actions
                Set LF_Point1 = (Position of Caster)
                Special Effect - Create a special effect at LF_Point1 using Objects\Spawnmodels\Human\SmallFlameSpawn\SmallFlameSpawn.mdl
                Special Effect - Destroy (Last created special effect)
                Custom script:   call RemoveLocation(udg_LF_Point1)
            Else - Actions
                Do nothing
        Wait 1.00 seconds
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                EntityCheck[(Player number of (Owner of (Triggering unit)))] Equal to False
            Then - Actions
                Set LF_UnitGroup3 = (Units of type |c0083F52Pyromancer (morph))
                Unit Group - Pick every unit in LF_UnitGroup3 and do (Actions)
                    Loop - Actions
                        Player - Set the current research level of Pyro Entity upgrade  to id[1] for (Owner of (Picked unit))
                        Set EntityCheck[id[2]] = True
                        Hero - Learn skill for (Picked unit): |c00E3CF57Immolation 
                        Hero - Learn skill for (Picked unit): |c00E3CF57Explosion 
                        Unit - Set level of |c00E3CF57Immolation  for (Picked unit) to id[1]
                        Unit - Set level of |c00E3CF57Explosion  for (Picked unit) to id[1]
            Else - Actions
                Set LF_UnitGroup3 = (Units of type |c0083F52CPyromancer)
                Unit Group - Pick every unit in LF_UnitGroup3 and do (Actions)
                    Loop - Actions
                        Set EntityCheck[id[2]] = False
        Custom script:   call DestroyGroup(udg_LF_UnitGroup3)
 

UndeadDragon

Super Moderator
Reaction score
448
I don't know why, but spawn effects don't seem to work very well when created with triggers. I have had a problem with them before.
 
D

DsD)Core(

Guest
So what do you suggest when wanting to change abilities for a different form?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top