autocast polymorph

malfy

New Member
Reaction score
4
I'm trying to make this spell... so far I have created a dummy unit at the center of my map with the ability polymorph. I have modified polymorph so that its range is 9999 cooldown 0 mana cost 0 upgrades 0. Then I used a modified version of the spell 'slow' for the autocast effect. This spell places a custom buff on the target called 'polymorphizm.' In order to cast polymorph on these buffed units I use the following trigger:
Trigger:
  • autopoly
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Polymorphizm ) Equal to True
            • Then - Actions
              • Unit - Order morph_dummy to Human Sorceress - Polymorph (Picked unit)
            • Else - Actions
              • Do nothing


It does not work and I have tried many other variations of basically these same actions with no success. The enemy units are receiving the 'polymorphizm' buff but they aren't getting polymorphed by the dummy unit (which is owned by the same player as the unit autocasting the buff). any idea why this is not working?
 

Laiev

Hey Listen!!
Reaction score
188
Trigger:
  • autopoly
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
      • ---- (Units in (Playable map area)) = leak ----
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Polymorphizm ) Equal to True
              • ---- Who give this buff? How the enemy get it? ----
            • Then - Actions
              • Unit - Order morph_dummy to Human Sorceress - Polymorph (Picked unit)
              • ---- What is 'morph_dummy', where's the set? ----
            • Else - Actions
              • Do nothing
              • ---- Remove this, you don't need this ----



Show us the learn trigger or cast trigger....
 

cryowraith

New Member
Reaction score
7
I think you are making things complicated. Instead of using 1 sec event, try something like this.

Event
A unit finishes casting slow (or whatever dummy autocast ability).
Action
Create a dummy unit. Give it polymorph. Order unit to polymorph Targeted Unit?
 

crazyfanatic

New Member
Reaction score
20
Finishes casting is not the best event, its more useful if the skill is channeling. Use starts the effect of an ability.
 

Laiev

Hey Listen!!
Reaction score
188
He need 'finish ability', because it check if has buff, so may (and will) bug if 'start effect of an ability'
 

rafaxik

New Member
Reaction score
2
He need 'finish ability', because it check if has buff, so may (and will) bug if 'start effect of an ability'

That's correct! I think you should create a trigger to check buff and if so, you order the dummy (don't forget to add ability to it in the object editor) to polymorph. And I think you won't get the autocast polymorph with a spell based on slow cause it has another order/string activate.

Here's what you shall try:

Trigger:
  • Events
    • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
    • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
    • Loop - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • ((Picked unit) has buff Polymorphizm ) Equal to True
    • Then - Actions
    • ---YOU MUST CREATE A DUMMY UNIT BEFORE---
    • Unit - Create 1 morph_dummy to Neutral Hostile at ((Position of (Picked Unit)) facing Default facing degrees
    • Unit - Order Last created unit to Human Sorceress - Polymorph (Picked unit)
    • Else - Actions
    • Do nothing
    • --- you really don't need this ^^ ---
 

millz-

New Member
Reaction score
25
Why don't you just use: Unit starts effect of an ability, if Ability being cast equal to your_custom_slow, create a dummy with the polymorph ability, order it to cast on the target unit of ability cast?
 

malfy

New Member
Reaction score
4
Trigger:
  • autopoly
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
      • ---- (Units in (Playable map area)) = leak ----
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Polymorphizm ) Equal to True
              • ---- Who give this buff? How the enemy get it? ----
            • Then - Actions
              • Unit - Order morph_dummy to Human Sorceress - Polymorph (Picked unit)
              • ---- What is 'morph_dummy', where's the set? ----
            • Else - Actions
              • Do nothing
              • ---- Remove this, you don't need this ----



Show us the learn trigger or cast trigger....

what learn / cast triggers? listen people maybe I didn't make this clear in the first post but I have been trying to accomplish this using VARIOUS combinations of essentially the same code. For example my ORIGINAL trigger looked like this:

Trigger:
  • autopolyorg
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Polymorph
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area) matching (((Picked unit) has buff Polymorphizm ) Equal to True)) and do (Actions)
        • Loop - Actions
          • Unit - Create 1 dummymorph for Player 1 (Red) at (Position of (Picked unit)) facing Default building facing degrees
          • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
          • Unit - Add Polymorph to (Last created unit)
          • Unit - Set level of Polymorph for (Last created unit) to 1
          • Unit - Order (Last created unit) to Human Sorceress - Polymorph (Picked unit)
          • Game - Display to (All players) the text: (picked unit: + (Name of (Picked unit)))


which of course did not work either so I began changing things up. (by the way if there is any dispute wether 'begins casting an ability' is the right action to choose or not; the text message DOES display the 'picked units' name they just arent polymorphed.)

Now after the original trigger did not work I began changing things to the trigger I posted first in order to, in my opinion, simplify everything. The dummy unit has already been given the unit skill polymorph in the wc3 editor. (polymorph is modified 0 mana, 99999 cast, etc.) The dummy unit is already placed in the center of my map, from the wc3 editor. The unit variable 'morph_dummy' is assigned that dummy unit upon map initialization.

As far as how does the enemy get the polymorphizm buff? I modified the autocast slow skill so that it will cast my custom buff called 'polymorphizm' without any of the slow effects. The modified autocast slow is called 'Polymorph' but it is a hero ability, so its easy not to confuse it with the unit polymorph used by my dummy. Anyway I think I already mentioned this in the first post and this part is working properly. (distributing my custom buff)

I feel like my 'game message' from the original trigger shows that for the most part everything seems to be working other than the actual 'picked unit' having polymorph cast on them.
 

Ayanami

칼리
Reaction score
288
Check if your dummy polymorph costs mana. By the way, this line leaks.

Trigger:
  • Actions
    • Unit - Create 1 dummymorph for Player 1 (Red) at (Position of (Picked unit)) facing Default building facing degrees


Not sure if you did that on purpose.
 

malfy

New Member
Reaction score
4
well as I have mentioned in BOTH of my previous posts, polymorph costs 0 mana, has maximum cast range, and requires no upgrades.

as far as leaks go, thats really of no concern right now because that is not the reason the trigger does not function properly, I can remove any/all leaks later

as my dummy unit "dummymorph" is owned by player1 red I turned its mdl file back on and made it selectable so that I could manually test the polymorph cast.

I went into the game manually selected the dummyunit clicked on polymorph then clicked on a creep. the polymorph was successful. Next, I allowed my hero to go in and autocast the buff 'polymorphizm' on several creeps. With the buff in place I manually polymorphed the creeps successfully again.
 

Ayanami

칼리
Reaction score
288
Ah now I see the problem. Auto-cast does not trigger the event "Begins casting an ability" nor "Starts the effect of an ability". So I suggest periodically checking for the dummy buff and then polymorphing the unit. I see that you have done this on your first both. However, in the first post, you said you use a preplaced unit. Are you sure you're ordering the pre-placed unit? Normally all pre-placed units should have a <gen> behind their name.
 

malfy

New Member
Reaction score
4
In the first trigger my order is as such:
Trigger:
  • Unit - Order morph_dummy to Human Sorceress - Polymorph (Picked unit)


morph_dummy is a unit variable assigned to my preplaced dummy unit at map initialization
 

malfy

New Member
Reaction score
4
here is a blank map with the trigger, buff, dummy, etc. setup the same as I've been discussing, it does not work on this map either but it might help
 

Attachments

  • autopoly.w3x
    17.7 KB · Views: 186

Ayanami

칼리
Reaction score
288
Worked after changing this line:

Trigger:
  • Unit Group - Pick every unit in (Units in (Playable map area) matching (((Picked unit) has buff Polymorphizm ) Equal to True)) and do (Unit - Order visible_dummy 0012 &lt;gen&gt; to Human Sorceress - Polymorph (Picked unit))


to this:

Trigger:
  • Unit Group - Pick every unit in (Units in (Playable map area) matching (((Matching unit) has buff Polymorphizm ) Equal to True)) and do (Unit - Order visible_dummy 0012 &lt;gen&gt; to Human Sorceress - Polymorph (Picked unit))
 

kingkwong92

Well-Known Member
Reaction score
25
To make it leakless.

Set poly_group=Units in playable map matching(matching unit has poly buff equal to true)

Pick every unit in poly_group and do

Custon script:call DestroyGroup(udg_poly_group)

Also
Custom script:call RemoveLocation(udg_<your_point_variables>)
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • 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 The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1

      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