• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Dummy refuses to use polyphorm againts every unit in unit group

Status
Not open for further replies.
Level 11
Joined
Jul 17, 2013
Messages
544
Hey im making some stuff, i have dummy i gave him ability polyphorm and i would like him to use his ability againts every hero in the unit group, however dummy in game uses ability only againts first unit in the unit group, how can i fix it? i tested it and heroes are targetable by the spell, mana cost and countdown is 0, the unit group loop is executed 4-5 times (depenning how many units are in group) but yet still dummy uses his ability only once, dummy isnt owned by AI.


Here is trigger, dumy unit and ability. i temporary gave my dummy model and removed locust so i can test it easily
1664494215765.png
1664494320638.png
1664494366094.png
1664494399372.png
1664494461013.png
1664494497685.png
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,525
You forgot to get rid of the Polymorph Requirements:
Requirements: Sorceress Adept Training
Requirements - Levels: Level 2

Also, I recommend basing your Dummy units on the Locust and adjusting them from there. The most important stats:
Abilities: Locust, Art - Cast Point: 0.00, Art - Cast Backswing: 0.00, Attacks enabled = None, Death type: Can't raise, does not decay, Speed base = 0, Movement type = None, Food used = 0

Also, your Random unit owner / Random player are not necessarily going to be the same player.

Try using unique variables in the trigger and see what happens. Also use 999,999 cast range, 99,999 may not cover the entire map. (Edit: 99,999 is fine)
 
Last edited:
Level 11
Joined
Jul 17, 2013
Messages
544
i actually found out how to fix it myself. i added wait action 0.01 second after i order dummy to use spell and now it works fine he uses it on all heroes in group. but people say waits shouldnt be used in loop, however i think game doesnt manage to instantly use polyphorm (target unit spell on 5 units)
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,525
Have you tried any of the solutions I suggested? I'm pretty sure you simply need to setup your Dummy unit properly and try it with unique variables.

(Edit)
This trigger works fine:
  • Demo
    • Events
      • Player - Player 1 (Red) skips a cinematic sequence
    • Conditions
    • Actions
      • Unit - Create 1 Dummy for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
      • Set VariableSet Dummy = (Last created unit)
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • Unit - Order Dummy to Human Sorceress - Polymorph (Picked unit)
pm.png
 

Attachments

  • Polymorph Dummy.w3m
    17.8 KB · Views: 5
Last edited:
Level 19
Joined
Feb 27, 2019
Messages
587
i actually found out how to fix it myself. i added wait action 0.01 second after i order dummy to use spell and now it works fine he uses it on all heroes in group. but people say waits shouldnt be used in loop, however i think game doesnt manage to instantly use polyphorm (target unit spell on 5 units)
The trigger could malfunction if TempUnit1 was set to another unit while the loop was running. If you have two triggers that could run at the same time then using TempUnit1 with waits and setting TempUnit1 to No unit could also become an issue. So its not a law to but a good rule to avoid it.

In your original trigger I see that you display a game message of the names of the units in the group. Which unit is the first in the group, the one displayed on the first line, the top, or the one displayed furthest down, last, at the bottom?

If the first unit is affected by polymorph it would mean there is a hindrance to casting the spell again. If the last unit is affected its probably not instant.
 
Level 11
Joined
Jul 17, 2013
Messages
544
its the first unit

idk if anyone of you realised but before ordering to cast spell i change ability lvl depenning on whats the picked unit. it can have 1-9 lvl i do it because i found out it was impossible to change via triggers to what unit polyphormed unit will get transformed
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,525
its the first unit

idk if anyone of you realised but before ordering to cast spell i change ability lvl depenning on whats the picked unit. it can have 1-9 lvl i do it because i found out it was impossible to change via triggers to what unit polyphormed unit will get transformed
I don't know if you missed my post(s) or not but...

It works fine as the demo map I provided shows. I just tested it and Ability level doesn't change a thing:
  • Demo
    • Events
      • Player - Player 1 (Red) skips a cinematic sequence
    • Conditions
    • Actions
      • Unit - Create 1 Dummy for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
      • Set VariableSet Dummy = (Last created unit)
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • Unit - Set level of Polymorph for Dummy to (Random integer number between 1 and 2)
          • Unit - Order Dummy to Human Sorceress - Polymorph (Picked unit)
I'll say it for the third time. Your Dummy unit is probably setup wrong, your ability is probably setup wrong, and your variables should be unique (although that may not be necessary).
 
Last edited:
Status
Not open for further replies.
Top