Hey What's wrong this this one?

CBBPhoenix

New Member
Reaction score
1
HI everyone. I am working on a spell that should cause all units affected to be polymorphed (using dummies). It is an AoE spell and my trigger looks like this.
Trigger:
  • Events
    • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Multi Polymorph
      • (Level of (Ability being cast) for (Casting unit)) Equal to 1
    • Actions
      • Wait 0.10 seconds
      • Set Xsheepcaster = (Casting unit)
      • Set Morphgroup = (Units in (Playable map area) matching ((((Matching unit) has buff Multi Polymorph ) Equal to True) and (((Matching unit) has buff Polymorph) Equal to False)))
      • Unit - Create 1 Dummy unit (multisheep) for (Owner of Xsheepcaster) at (Position of Xsheepcaster) facing Default building facing degrees
      • Set sheep1 = (Last created unit)
      • Unit - Add Polymorph (dummy) (Neutral Hostile) to sheep1
      • Unit - Create 1 Dummy unit (multisheep) for (Owner of Xsheepcaster) at (Position of Xsheepcaster) facing Default building facing degrees
      • Set sheep2 = (Last created unit)
      • Unit - Add Polymorph (dummy) (Neutral Hostile) to sheep2
      • Unit - Create 1 Dummy unit (multisheep) for (Owner of Xsheepcaster) at (Position of Xsheepcaster) facing Default building facing degrees
      • Set sheep3 = (Last created unit)
      • Unit - Add Polymorph (dummy) (Neutral Hostile) to sheep3
      • Unit - Create 1 Dummy unit (multisheep) for (Owner of Xsheepcaster) at (Position of Xsheepcaster) facing Default building facing degrees
      • Set sheep4 = (Last created unit)
      • Unit - Add Polymorph (dummy) (Neutral Hostile) to sheep4
      • Unit - Order sheep1 to Human Sorceress - Polymorph (Random unit from Morphgroup)
      • Unit - Order sheep2 to Human Sorceress - Polymorph (Random unit from Morphgroup)
      • Unit - Order sheep3 to Human Sorceress - Polymorph (Random unit from Morphgroup)
      • Unit - Order sheep4 to Human Sorceress - Polymorph (Random unit from Morphgroup)

The dummies are created but they do not polymorph the units in the units group. I have already checked whether the spell can be cast manually and it can. I guess the problem is the unit group thing but I can't really figure out why.

Anyone got a clue? Thanks in advance :D
 

Laiev

Hey Listen!!
Reaction score
188
omg :S

no no no >_<

do like this: (freenhand)

Trigger:
  • Polymorph Master
    • Event:
      • a unit start effect of an ability
    • Conditions:
      • ability being cast equal to Polymorph Master
    • Actions:
      • Set TempPoint = Position of (triggering unit)
      • Set UnitGroup = Units with 500 (this is the range between your unit and affected units) of range of TempPoint matching conditions (matching unit) is aline, matching unit belong a enemy of triggering, matching unit is spell immune equal to false and what more you want
      • Unit Group - Pick every unit in UnitGroup and do actions
        • Unit - create 1 dummy unit at TempPoint for triggering unit facing anything
        • Unit - Add polymorph dummy to last created unit
        • Unit - Set level of polymorph dummy to last created unit to level of polymorph master of triggering unit
        • unit - order last created unit to sorceress - polymorph picked unit
      • Custom Script: call RemoveLocation (udg_TempPoint)
      • Custom Script: call DestroyGroup (udg_UnitGroup)
 

kaboo

New Member
Reaction score
45
1. what for is the wait there?
2. try this:
Code:
events - unit starts the effect of an ability
conditions - check the ability
actions
- set Morphgroup = (Units in (Playable map area) matching ((((Matching unit) has buff Multi Polymorph ) Equal to True) and (((Matching unit) has buff Polymorph) Equal to False)))
- for each integer 1 to 4 do
  - create 1 dummy of owner of casting unit at position of casting unit
  - add polymorph (dummy) to last created unit
  - set level of polymorph (dummy) for last created unit to level of polymorph (real) for casting unit
  - pick 1 random unit from Morphgroup
     - order last created unit to polymorph picked unit
     - remove picked unit from Morphgroup
 

Dameon

"All the power in the world resides in the eyes"
Reaction score
127
Does the dummy have enought mna to cast the ability?
 

CBBPhoenix

New Member
Reaction score
1
To Dameon: the spell does not require mana
To Kaboo: wouldn't that cause some delay between each cast? The unit can't cast polymorph so quickly. It should cast at once like Earthquake (affacts all units at once in the AoE)

To Laiev: Why the distance thing? And wouldn't that trigger only morph one unit?
 

kaboo

New Member
Reaction score
45
To Dameon: the spell does not require mana
To Kaboo: wouldn't that cause some delay between each cast? The unit can't cast polymorph so quickly. It should cast at once like Earthquake (affacts all units at once in the AoE)

To Laiev: Why the distance thing? And wouldn't that trigger only morph one unit?

no there wont be any delay
 

Laiev

Hey Listen!!
Reaction score
188
the distance is like range between you and affected, like a aura, also, to do it like earthquake you'll need use a periodic trigger -.- or lots of waits

periodic trigger =
Trigger:
  • Trigger
    • events
      • time - every 0,03 (or what you want) seconds of time
    • conditions
    • events
      • set unitgroup = unit with 500 range of &lt;variable caster&gt;
      • create unit bla bla bla
      • add ability bla bla bla
      • set level of ability to level bla bla
      • add 1/2 seconds to generic time to last created bla
      • order last created unit to sorceress - polymorph random unit in unitgroup


something like this... freehand'ed
 

jomik

New Member
Reaction score
17
Why would you want a periodic trigger to do a spell like that? :O It's a 1 time cast anyways? >.<
Laeiv's should work. It wont polymorph only one, since it creates a dummy per unit in the units picked, and then orders it to cast on picked unit, for every unit on group.
 

Laiev

Hey Listen!!
Reaction score
188
Why would you want a periodic trigger to do a spell like that? :O It's a 1 time cast anyways? >.<
Laeiv's should work. It wont polymorph only one, since it creates a dummy per unit in the units picked, and then orders it to cast on picked unit, for every unit on group.

Ya, but he want periodic cast -.- like earthquake, cast one per one... so he'll need periodic trigger :D
 

Murre

New Member
Reaction score
14
I finished my trigger now, but if it's too hard to understand, I included an attachment of a map with a demo of the spell. Just copy the variables named *MP_*, the dummy unit and the spells.
Multi Polymorph
Trigger:
  • Multi Polymorph
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Multi Polymorph
    • Actions
      • Set MP_Caster = (Triggering unit)
      • Set MP_CasterPoint = (Position of MP_Caster)
      • Set MP_TargetGroup = (Units within 250.00 of (Target point of ability being cast) matching ((((Matching unit) belongs to an ally of (Owner of MP_Caster)) Equal to False) and (((Matching unit) is dead) Equal to False)))
      • Unit Group - Pick every unit in MP_TargetGroup and do (Actions)
        • Loop - Actions
          • Set MP_TargetPoint = (Position of (Picked unit))
          • Unit - Create 1 MultiMorph Dummy for (Owner of MP_Caster) at MP_TargetPoint facing Default building facing degrees
          • Set MP_DummyUnit = (Last created unit)
          • Unit - Add DummyHexSpell to MP_DummyUnit
          • Unit - Hide MP_DummyUnit
          • Unit - Set level of DummyHexSpell for MP_DummyUnit to (Level of Multi Polymorph for MP_Caster)
          • Unit - Order MP_DummyUnit to Orc Shadow Hunter - Hex (Picked unit)
          • Unit - Remove MP_DummyUnit from the game
      • Custom script: call RemoveLocation (udg_MP_CasterPoint)
      • Custom script: call DestroyGroup (udg_MP_TargetGroup)


NOTE: The map is originally made by Glenphir, so huge thanks to him. The map is made by him, read the comments in the map for more info.
 

Attachments

  • Multi Polymorph.w3x
    21.1 KB · Views: 124

CBBPhoenix

New Member
Reaction score
1
Okay thanks you guys. I am going to check the triggers and the test map. I am sorry I've caused some confusion when speaking about Earthquake; it should not be like some channeling spell :p. More like Light Strike Array from DotA. So no periodic events needed.
 

CBBPhoenix

New Member
Reaction score
1
Okay thanks you guys. I am going to check the triggers and the test map. I am sorry I've caused some confusion when speaking about Earthquake; it should not be like some channeling spell :p. More like Light Strike Array from DotA. So no periodic events needed.

EDIT: The maps works, just one thing: The area of the AoE circle (the cursor) is larger than the polymorph area? how might that be? Just different AoEs or some bonus area of the selection?
To Laiev: Ah now I get what you wrote (thanks Murre). You wrote "with" and not "within"(freehand) :p thought the morph area had to be exactly for instance 500. It's just 500 or less :p got it now. Going to check your trigger now :p

Omg double post; too noob to know how to delete T_T

EDIT: Tried your trigger Laiev, can't make it work; absolutely nothing happens when the hero casts the spell. Also how do i ensure that it only affects units within the AoE? and not all units within 500 range like an aura? Murre's map does this (only affects targeted units)
 
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