A problem with evolution

Erkki2

New Member
Reaction score
0
I'm making a pokemon map. Pokemon can evolve and become stronger by reaching a certain level or by usin items. My problem is that my item evolution triggers don't work. This trigger works perfectly:
Code:
Cyndaquil
    Events
        Unit - A unit Gains a level
    Conditions
        (Hero level of (Leveling Hero)) Greater than or equal to 14
        (Unit-type of (Leveling Hero)) Equal to Cyndaquil
    Actions
        Unit - Pause all units
        Special Effect - Create a special effect at (Position of (Leveling Hero)) using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
        Wait 0.20 seconds
        Special Effect - Destroy (Last created special effect)
        Wait 0.20 seconds
        Special Effect - Create a special effect at (Position of (Leveling Hero)) using Abilities\Spells\Items\AIlm\AIlmTarget.mdl
        Wait 0.20 seconds
        Special Effect - Destroy (Last created special effect)
        Wait 0.20 seconds
        Special Effect - Create a special effect at (Position of (Leveling Hero)) using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
        Wait 0.20 seconds
        Special Effect - Destroy (Last created special effect)
        Wait 0.20 seconds
        Special Effect - Create a special effect at (Position of (Leveling Hero)) using Abilities\Spells\Items\AIlm\AIlmTarget.mdl
        Wait 0.20 seconds
        Special Effect - Destroy (Last created special effect)
        Wait 0.20 seconds
        Special Effect - Create a special effect at (Position of (Leveling Hero)) using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
        Wait 0.20 seconds
        Special Effect - Destroy (Last created special effect)
        Wait 0.20 seconds
        Special Effect - Create a special effect at (Position of (Leveling Hero)) using Abilities\Spells\Items\AIlm\AIlmTarget.mdl
        Wait 0.20 seconds
        Special Effect - Destroy (Last created special effect)
        Unit - Replace (Leveling Hero) with a Quilava using The old unit's relative life and mana
        Unit - Unpause all units
And this trigger only pauses all units:
Code:
Nidorina
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Unit-type of (Target unit of ability being cast)) Equal to Nidorina
        (Ability being cast) Equal to Moon Stone 
    Actions
        Unit - Pause all units
        Special Effect - Create a special effect at (Position of (Target unit of ability being cast)) using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
        Wait 0.20 seconds
        Special Effect - Destroy (Last created special effect)
        Wait 0.20 seconds
        Special Effect - Create a special effect at (Position of (Target unit of ability being cast)) using Abilities\Spells\Items\AIlm\AIlmTarget.mdl
        Wait 0.20 seconds
        Special Effect - Destroy (Last created special effect)
        Wait 0.20 seconds
        Special Effect - Create a special effect at (Position of (Target unit of ability being cast)) using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
        Wait 0.20 seconds
        Special Effect - Destroy (Last created special effect)
        Wait 0.20 seconds
        Special Effect - Create a special effect at (Position of (Target unit of ability being cast)) using Abilities\Spells\Items\AIlm\AIlmTarget.mdl
        Wait 0.20 seconds
        Special Effect - Destroy (Last created special effect)
        Wait 0.20 seconds
        Special Effect - Create a special effect at (Position of (Target unit of ability being cast)) using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
        Wait 0.20 seconds
        Special Effect - Destroy (Last created special effect)
        Wait 0.20 seconds
        Special Effect - Create a special effect at (Position of (Target unit of ability being cast)) using Abilities\Spells\Items\AIlm\AIlmTarget.mdl
        Wait 0.20 seconds
        Special Effect - Destroy (Last created special effect)
        Unit - Replace (Target unit of ability being cast) with a Nidoqueen using The old unit's relative life and mana
        Unit - Unpause all units
        Item - Remove (Item carried by (Casting unit) of type Moon Stone)
Moon Stone is an item with an ability Moon Stone. Why doesn't this trigger work?
 

Yizzy

New Member
Reaction score
20
My guess would be that
Code:
Target unit of ability being cast
Dosen't work if the ability dosen't have a target, try Event Response - Casting Unit.

Also your triggers have a point leak..
Make a point variable, this one is named A_Point..
Code:
Cyndaquil
    Events
        Unit - A unit Gains a level
    Conditions
        (Hero level of (Leveling Hero)) Greater than or equal to 14
        (Unit-type of (Leveling Hero)) Equal to Cyndaquil
    Actions
        Unit - Pause all units
        Set A_Point = Position of (Leveling Hero)
        Special Effect - Create a special effect at A_Point using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
        Wait 0.20 seconds
        Special Effect - Destroy (Last created special effect)
        Wait 0.20 seconds
        Special Effect - Create a special effect at A_Point using Abilities\Spells\Items\AIlm\AIlmTarget.mdl
        Wait 0.20 seconds
        Special Effect - Destroy (Last created special effect)
        Wait 0.20 seconds
        Special Effect - Create a special effect at A_Point using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
        Wait 0.20 seconds
        Special Effect - Destroy (Last created special effect)
        Wait 0.20 seconds
        Special Effect - Create a special effect at A_Point using Abilities\Spells\Items\AIlm\AIlmTarget.mdl
        Wait 0.20 seconds
        Special Effect - Destroy (Last created special effect)
        Wait 0.20 seconds
        Special Effect - Create a special effect at A_Point using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
        Wait 0.20 seconds
        Special Effect - Destroy (Last created special effect)
        Wait 0.20 seconds
        Special Effect - Create a special effect at A_Point using Abilities\Spells\Items\AIlm\AIlmTarget.mdl
        Wait 0.20 seconds
        Special Effect - Destroy (Last created special effect)
        Unit - Replace (Leveling Hero) with a Quilava using The old unit's relative life and mana
        Unit - Unpause all units
        Custom script:   call RemoveLocation(udg_A_Point)

Code:
Nidorina
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Unit-type of (Casting unit)) Equal to Nidorina
        (Ability being cast) Equal to Moon Stone 
    Actions
        Unit - Pause all units
        Set A_Point = Position of (Casting unit)
        Special Effect - Create a special effect at A_Point using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
        Wait 0.20 seconds
        Special Effect - Destroy (Last created special effect)
        Wait 0.20 seconds
        Special Effect - Create a special effect at A_Point using Abilities\Spells\Items\AIlm\AIlmTarget.mdl
        Wait 0.20 seconds
        Special Effect - Destroy (Last created special effect)
        Wait 0.20 seconds
        Special Effect - Create a special effect at A_Point using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
        Wait 0.20 seconds
        Special Effect - Destroy (Last created special effect)
        Wait 0.20 seconds
        Special Effect - Create a special effect at A_Point using Abilities\Spells\Items\AIlm\AIlmTarget.mdl
        Wait 0.20 seconds
        Special Effect - Destroy (Last created special effect)
        Wait 0.20 seconds
        Special Effect - Create a special effect at A_Point using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
        Wait 0.20 seconds
        Special Effect - Destroy (Last created special effect)
        Wait 0.20 seconds
        Special Effect - Create a special effect at A_Point using Abilities\Spells\Items\AIlm\AIlmTarget.mdl
        Wait 0.20 seconds
        Special Effect - Destroy (Last created special effect)
        Item - Remove (Item carried by (Casting unit) of type Moon Stone)
        Unit - Replace (Casting unit) with a Nidoqueen using The old unit's relative life and mana
        Unit - Unpause all units
        Custom script:   call RemoveLocation(udg_A_Point)

Edit:
Saw that you have
Code:
(Unit-type of (Target unit of ability being cast)) Equal to Nidorina
As a condition, if that works then I'm probably wrong..
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top