Help me please with this polymorph trigger

CBBPhoenix

New Member
Reaction score
1
Hi everyone. I have had this trigger suggested in another thread, and I was given a map which proved that the trigger works. However it does sometimes not work in the example map I had. in my own map it never works :(. Can anyone tell me what is wrong with it?

It should cause units affacted by the spell to turn into sheep, in an AoE.

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
      • Set MP_Caster = (Casting unit)
      • Set MP_casterpoint = (Position of MP_Caster)
      • Set MP_TargetGroup = (Units within 680.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 for (Owner of MP_Caster) at MP_TargetPoint facing Default building facing degrees
          • Set MP_DummyUnit = (Last created unit)
          • Unit - Add Polymorph (dummy) (Neutral Hostile) to MP_DummyUnit
          • Unit - Hide MP_DummyUnit
          • Unit - Order MP_DummyUnit to Human Sorceress - Polymorph (Picked unit)
          • Unit - Remove MP_DummyUnit from the game

I have posted the map so you can see the triggers he suggested. It reads "Reverse Polarity" in WC3 but that's because he has edited it from the test map of that ability.

Thanks in advance.
 

Attachments

  • Multi Polymorph.w3x
    21.1 KB · Views: 196

avalya

New Member
Reaction score
37
Remove your variables after they are used, at the end of the trigger add the following;

Set MP_Caster = No unit
Custom Script: call RemoveLocation (udg_MP_casterpoint)
Custom Script: call DestroyGroup (udg_MP_TargetGroup)

also, some changes;

Set MP_Caster = Triggering Unit
Set MP_casterpoint (is that supposed to be the location of the caster or the spell target point) if Caster = Position of MP_Caster, if Target Point = Target Point of Ability Being Cast
Remove the Level of Ability Being Cast...
In the Set MB_TargetGroup action = Units within 680.00 of MP_casterpoint

at the end of the Unit Group Loop, add;

Set MP_DummyUnit = No unit
Custom Script: call RemoveLocation (udg_MP_TargetPoint)
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Trigger:
  • Unit - Create 1 for (Owner of MP_Caster) at MP_TargetPoint facing Default building facing degrees


Hmm... There seems to be something wrong about this line...
Oh, yeah... THERE IS NO UNIT-TYPE THERE ! XD

Should be something like:
Trigger:
  • Unit - Create 1 PolyDummy for (Owner of MP_Caster) at MP_TargetPoint facing Default building facing degrees
 

Changest

New Member
Reaction score
0
New way of doing it.

Ok if you want to try mine, it is easier and the polymorph levels as you level the ability. Copy the night elf dummy unit, then copy the dummy polymorph ability (new), double check the dummy's ability is the unit polymorh (new) ability and has locust. Then copy the trigger i put in. might have to fix the ability on the trigger to match the copied abilities, as well as the dummy unit it summons.

If you have questions let me know.
 

Attachments

  • Multi Polymorph.w3x
    21.3 KB · Views: 198

CBBPhoenix

New Member
Reaction score
1
omfg -.-'

LOOOOOOOOOOOOOL. I found out that the reason why it did not work is because my AoE of the ability is very small (50 AoE). So even though the unit appears green (going to be affacted) it does in fact not become morphed. Don't know what relation there is between actual AoE an the selection one, but now I know it works. Thanks for pointing out the variable thing avalya. I added another variable "sheeppoint" instead of "targed point of ability bein cast" just to make sure :p and ty Komaqtion for telling about the missing unit. I hate these kinds of errors hehe. xD. I just copied the trigger from the map and defined the variables in my map but well the custom dummy unit had another name in my map ZZZ.

Ty all for you help.

Erm I can't give any of you guys rep because I need to spread some rep lala before giving to you again T_T I owe :D
 

avalya

New Member
Reaction score
37
Something tells me you're not giving spreading too much rep, you gave me +rep 1 month ago. :p

Anyway, I'm glad you solved it.
 

CBBPhoenix

New Member
Reaction score
1
that's because most people don't solve my problems to be honest hehe, or I don't post so much :-/. Anyways I got one problem I just found: The trigger only morphs one unit in total! how can that be with the loop action?
 

avalya

New Member
Reaction score
37
Are you sure all the actions are under the Unit Group Loop? Why do you hide your dummy?
 

LearningCode

New Member
Reaction score
24
Avalya be going through that mid-forum-life crisis. xD
Wishing he had more rep, that he could help more people, that he should spread more rep, that he should get himself a Ferrari, that he should be a trap, etc.
 

CBBPhoenix

New Member
Reaction score
1
Nevermind I solved it myself. Just added more actions after a 0,1 wait. And don't tell me that you may not put waits into loop actions XD it works.
 

avalya

New Member
Reaction score
37
Well, if your wait is 'in' the loop, then it will cause every loop to be 0.27 seconds after another (not actually 0.1 seconds, because the shortest wait time is 0.27). Why did you need the wait actually? I might be able to solve it for you without it.
 

CBBPhoenix

New Member
Reaction score
1
gonna check that out. :p I guess waits and periodic events cause lag.
EDIT: well I found that a wait is required :-/
 

Nenad

~Choco Coronet~ Omnomnom
Reaction score
137
Can you post your new trigger, maybe we can use a timer instead of a wait ^^
 

Ayanami

칼리
Reaction score
288
Off Topic: Hey, isn't this my Reverse Polarity demo map? 0.0

Okay, I changed around your Multi Polymorph triggers a bit. Firstly, no need to hide the dummy. It has no model, so it is already "invisible". Secondly, removed all leaks, I think. Attached a demo map too.

Trigger:
  • Multi Polymorph
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Multi Polymorph
    • Actions
      • Set MP_CasterPoint = (Position of (Triggering unit))
      • Set MP_TargetPoint = (Target point of ability being cast)
      • Set MP_TargetGroup = (Units within 250.00 of MP_TargetPoint matching ((((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True) and (((Matching unit) is alive) Equal to True)))
      • Unit Group - Pick every unit in MP_TargetGroup and do (Actions)
        • Loop - Actions
          • Unit - Create 1 MultiMorph Dummy for (Owner of (Triggering unit)) at MP_CasterPoint facing Default building facing degrees
          • Unit - Add DummyHexSpell to (Last created unit)
          • Unit - Set level of DummyHexSpell for MP_DummyUnit to (Level of Multi Polymorph for (Triggering unit))
          • Unit - Order (Last created unit) to Orc Shadow Hunter - Hex (Picked unit)
          • Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
      • Custom script: call DestroyGroup(udg_MP_TargetGroup)
      • Custom script: call RemoveLocation(udg_MP_TargetPoint)
      • Custom script: call RemoveLocation(udg_MP_CasterPoint)


Glenphir
 

CBBPhoenix

New Member
Reaction score
1
Yep that one works the same way as "my" trigger, so it works :p. (where I changed some parts from the one added by avalya). A was requested to post it so here it is:
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 (Triggering unit)) Equal to 1
    • Actions
      • Set MP_Caster = (Triggering unit)
      • Set MP_casterpoint = (Position of MP_Caster)
      • Set sheeppoint = (Target point of ability being cast)
      • Set MP_TargetGroup = (Units within 100.00 of sheeppoint 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 Dummy unit (multisheep) for (Owner of MP_Caster) at (MP_TargetPoint offset by (0.00, 0.00)) facing Default building facing degrees
          • Set MP_DummyUnit = (Last created unit)
          • Unit - Add Polymorph (dummy) (Neutral Hostile) to MP_DummyUnit
          • Unit - Hide MP_DummyUnit
          • Unit - Order MP_DummyUnit to Human Sorceress - Polymorph (Picked unit)
          • Unit - Remove MP_DummyUnit from the game
          • Wait 0.10 seconds
          • Set MP_TargetPoint = (Position of (Picked unit))
          • Unit - Create 1 Dummy unit (multisheep) for (Owner of MP_Caster) at (MP_TargetPoint offset by (0.00, 0.00)) facing Default building facing degrees
          • Set MP_DummyUnit = (Last created unit)
          • Unit - Add Polymorph (dummy) (Neutral Hostile) to MP_DummyUnit
          • Unit - Hide MP_DummyUnit
          • Unit - Order MP_DummyUnit to Human Sorceress - Polymorph (Picked unit)
          • Unit - Remove MP_DummyUnit from the game
          • Wait 0.10 seconds
          • Set MP_TargetPoint = (Position of (Picked unit))
          • Unit - Create 1 Dummy unit (multisheep) for (Owner of MP_Caster) at (MP_TargetPoint offset by (0.00, 0.00)) facing Default building facing degrees
          • Set MP_DummyUnit = (Last created unit)
          • Unit - Add Polymorph (dummy) (Neutral Hostile) to MP_DummyUnit
          • Unit - Hide MP_DummyUnit
          • Unit - Order MP_DummyUnit to Human Sorceress - Polymorph (Picked unit)
          • Unit - Remove MP_DummyUnit from the game
          • Wait 0.10 seconds
          • Set MP_TargetPoint = (Position of (Picked unit))
          • Unit - Create 1 Dummy unit (multisheep) for (Owner of MP_Caster) at (MP_TargetPoint offset by (0.00, 0.00)) facing Default building facing degrees
          • Set MP_DummyUnit = (Last created unit)
          • Unit - Add Polymorph (dummy) (Neutral Hostile) to MP_DummyUnit
          • Unit - Hide MP_DummyUnit
          • Unit - Order MP_DummyUnit to Human Sorceress - Polymorph (Picked unit)
          • Unit - Remove MP_DummyUnit from the game
          • Wait 0.10 seconds
          • Set MP_TargetPoint = (Position of (Picked unit))
          • Unit - Create 1 Dummy unit (multisheep) for (Owner of MP_Caster) at (MP_TargetPoint offset by (0.00, 0.00)) facing Default building facing degrees
          • Set MP_DummyUnit = (Last created unit)
          • Unit - Add Polymorph (dummy) (Neutral Hostile) to MP_DummyUnit
          • Unit - Hide MP_DummyUnit
          • Unit - Order MP_DummyUnit to Human Sorceress - Polymorph (Picked unit)
          • Unit - Remove MP_DummyUnit from the game
          • Wait 0.10 seconds
          • Set MP_TargetPoint = (Position of (Picked unit))
          • Unit - Create 1 Dummy unit (multisheep) for (Owner of MP_Caster) at (MP_TargetPoint offset by (0.00, 0.00)) facing Default building facing degrees
          • Set MP_DummyUnit = (Last created unit)
          • Unit - Add Polymorph (dummy) (Neutral Hostile) to MP_DummyUnit
          • Unit - Hide MP_DummyUnit
          • Unit - Order MP_DummyUnit to Human Sorceress - Polymorph (Picked unit)
          • Unit - Remove MP_DummyUnit from the game
          • Wait 0.10 seconds
          • Set MP_TargetPoint = (Position of (Picked unit))
          • Unit - Create 1 Dummy unit (multisheep) for (Owner of MP_Caster) at (MP_TargetPoint offset by (0.00, 0.00)) facing Default building facing degrees
          • Set MP_DummyUnit = (Last created unit)
          • Unit - Add Polymorph (dummy) (Neutral Hostile) to MP_DummyUnit
          • Unit - Hide MP_DummyUnit
          • Unit - Order MP_DummyUnit to Human Sorceress - Polymorph (Picked unit)
          • Unit - Remove MP_DummyUnit from the game
          • Wait 0.10 seconds
          • Set MP_TargetPoint = (Position of (Picked unit))
          • Unit - Create 1 Dummy unit (multisheep) for (Owner of MP_Caster) at (MP_TargetPoint offset by (0.00, 0.00)) facing Default building facing degrees
          • Set MP_DummyUnit = (Last created unit)
          • Unit - Add Polymorph (dummy) (Neutral Hostile) to MP_DummyUnit
          • Unit - Hide MP_DummyUnit
          • Unit - Order MP_DummyUnit to Human Sorceress - Polymorph (Picked unit)
          • Unit - Remove MP_DummyUnit from the game
          • Wait 0.10 seconds
          • Custom script: call RemoveLocation (udg_MP_casterpoint)
          • Custom script: call DestroyGroup (udg_MP_TargetGroup)
          • Custom script: call DestroyGroup (udg_MP_TargetGroup)
          • Set MP_Caster = No unit
          • Set MP_DummyUnit = No unit


I know it is noobish with the same function over and over but it works every time so I'm happy :p. And I also know it is noobish to have "level of ability = X" instead of "set ability for Dummy to level of ability for Casting Hero". But I have bad experiences with this one so I made 5 abilities (one for each level of the ability of the Hero to add to the dummy). All the same my problem is solved :D
 

Ayanami

칼리
Reaction score
288
Yep that one works the same way as "my" trigger, so it works :p. (where I changed some parts from the one added by avalya). A was requested to post it so here it is:
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 (Triggering unit)) Equal to 1
    • Actions
      • Set MP_Caster = (Triggering unit)
      • Set MP_casterpoint = (Position of MP_Caster)
      • Set sheeppoint = (Target point of ability being cast)
      • Set MP_TargetGroup = (Units within 100.00 of sheeppoint 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 Dummy unit (multisheep) for (Owner of MP_Caster) at (MP_TargetPoint offset by (0.00, 0.00)) facing Default building facing degrees
          • Set MP_DummyUnit = (Last created unit)
          • Unit - Add Polymorph (dummy) (Neutral Hostile) to MP_DummyUnit
          • Unit - Hide MP_DummyUnit
          • Unit - Order MP_DummyUnit to Human Sorceress - Polymorph (Picked unit)
          • Unit - Remove MP_DummyUnit from the game
          • Wait 0.10 seconds
          • Set MP_TargetPoint = (Position of (Picked unit))
          • Unit - Create 1 Dummy unit (multisheep) for (Owner of MP_Caster) at (MP_TargetPoint offset by (0.00, 0.00)) facing Default building facing degrees
          • Set MP_DummyUnit = (Last created unit)
          • Unit - Add Polymorph (dummy) (Neutral Hostile) to MP_DummyUnit
          • Unit - Hide MP_DummyUnit
          • Unit - Order MP_DummyUnit to Human Sorceress - Polymorph (Picked unit)
          • Unit - Remove MP_DummyUnit from the game
          • Wait 0.10 seconds
          • Set MP_TargetPoint = (Position of (Picked unit))
          • Unit - Create 1 Dummy unit (multisheep) for (Owner of MP_Caster) at (MP_TargetPoint offset by (0.00, 0.00)) facing Default building facing degrees
          • Set MP_DummyUnit = (Last created unit)
          • Unit - Add Polymorph (dummy) (Neutral Hostile) to MP_DummyUnit
          • Unit - Hide MP_DummyUnit
          • Unit - Order MP_DummyUnit to Human Sorceress - Polymorph (Picked unit)
          • Unit - Remove MP_DummyUnit from the game
          • Wait 0.10 seconds
          • Set MP_TargetPoint = (Position of (Picked unit))
          • Unit - Create 1 Dummy unit (multisheep) for (Owner of MP_Caster) at (MP_TargetPoint offset by (0.00, 0.00)) facing Default building facing degrees
          • Set MP_DummyUnit = (Last created unit)
          • Unit - Add Polymorph (dummy) (Neutral Hostile) to MP_DummyUnit
          • Unit - Hide MP_DummyUnit
          • Unit - Order MP_DummyUnit to Human Sorceress - Polymorph (Picked unit)
          • Unit - Remove MP_DummyUnit from the game
          • Wait 0.10 seconds
          • Set MP_TargetPoint = (Position of (Picked unit))
          • Unit - Create 1 Dummy unit (multisheep) for (Owner of MP_Caster) at (MP_TargetPoint offset by (0.00, 0.00)) facing Default building facing degrees
          • Set MP_DummyUnit = (Last created unit)
          • Unit - Add Polymorph (dummy) (Neutral Hostile) to MP_DummyUnit
          • Unit - Hide MP_DummyUnit
          • Unit - Order MP_DummyUnit to Human Sorceress - Polymorph (Picked unit)
          • Unit - Remove MP_DummyUnit from the game
          • Wait 0.10 seconds
          • Set MP_TargetPoint = (Position of (Picked unit))
          • Unit - Create 1 Dummy unit (multisheep) for (Owner of MP_Caster) at (MP_TargetPoint offset by (0.00, 0.00)) facing Default building facing degrees
          • Set MP_DummyUnit = (Last created unit)
          • Unit - Add Polymorph (dummy) (Neutral Hostile) to MP_DummyUnit
          • Unit - Hide MP_DummyUnit
          • Unit - Order MP_DummyUnit to Human Sorceress - Polymorph (Picked unit)
          • Unit - Remove MP_DummyUnit from the game
          • Wait 0.10 seconds
          • Set MP_TargetPoint = (Position of (Picked unit))
          • Unit - Create 1 Dummy unit (multisheep) for (Owner of MP_Caster) at (MP_TargetPoint offset by (0.00, 0.00)) facing Default building facing degrees
          • Set MP_DummyUnit = (Last created unit)
          • Unit - Add Polymorph (dummy) (Neutral Hostile) to MP_DummyUnit
          • Unit - Hide MP_DummyUnit
          • Unit - Order MP_DummyUnit to Human Sorceress - Polymorph (Picked unit)
          • Unit - Remove MP_DummyUnit from the game
          • Wait 0.10 seconds
          • Set MP_TargetPoint = (Position of (Picked unit))
          • Unit - Create 1 Dummy unit (multisheep) for (Owner of MP_Caster) at (MP_TargetPoint offset by (0.00, 0.00)) facing Default building facing degrees
          • Set MP_DummyUnit = (Last created unit)
          • Unit - Add Polymorph (dummy) (Neutral Hostile) to MP_DummyUnit
          • Unit - Hide MP_DummyUnit
          • Unit - Order MP_DummyUnit to Human Sorceress - Polymorph (Picked unit)
          • Unit - Remove MP_DummyUnit from the game
          • Wait 0.10 seconds
          • Custom script: call RemoveLocation (udg_MP_casterpoint)
          • Custom script: call DestroyGroup (udg_MP_TargetGroup)
          • Custom script: call DestroyGroup (udg_MP_TargetGroup)
          • Set MP_Caster = No unit
          • Set MP_DummyUnit = No unit


I know it is noobish with the same function over and over but it works every time so I'm happy :p. And I also know it is noobish to have "level of ability = X" instead of "set ability for Dummy to level of ability for Casting Hero". But I have bad experiences with this one so I made 5 abilities (one for each level of the ability of the Hero to add to the dummy). All the same my problem is solved :D

But why do you hide the dummy?
 

avalya

New Member
Reaction score
37
0.1 second waits are actually 0.27 seconds, I don't know how yours' works, but, just sayin'.
 

CBBPhoenix

New Member
Reaction score
1
I only hide it because it was that way in the original trigger, it is not needed.
It's ok if it's 0.27 seconds :p
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • WildTurkey WildTurkey:
    is there a stephen green in the house?
    +1
  • The Helper The Helper:
    What is up WildTurkey?
  • The Helper The Helper:
    Looks like Google fixed whatever mistake that made the recipes on the site go crazy and we are no longer trending towards a recipe site lol - I don't care though because it motivated me to spend alot of time on the site improving it and at least now the content people are looking at is not stupid and embarrassing like it was when I first got back into this like 5 years ago.
  • The Helper The Helper:
    Plus - I have a pretty bad ass recipe collection now! That section of the site is 10 thousand times better than it was before
  • The Helper The Helper:
    We now have a web designer at my job. A legit talented professional! I am going to get him to redesign the site theme. It is time.
  • Varine Varine:
    I got one more day of community service and then I'm free from this nonsense! I polished a cop car today for a funeral or something I guess
  • Varine Varine:
    They also were digging threw old shit at the sheriff's office and I tried to get them to give me the old electronic stuff, but they said no. They can't give it to people because they might use it to impersonate a cop or break into their network or some shit? idk but it was a shame to see them take a whole bunch of radios and shit to get shredded and landfilled
  • The Helper The Helper:
    whatever at least you are free
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?

      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