Deleted post.
It is pretty hard to make since Event only recongnized specific units that have been placed in the map not by triggers.
You can put each of the units created by trigger in a variable unit Unitcount that has enought count to fill them all.
For example:
Trigger X
Events : Map initialization
Actions :
For each integer A 1 to 20
Create a unit sorceress
add Last created unit to Unitcount[Integer A]
Trigger Y
Event : Every 1 second of the game
Condition :
Action :
Foreach integer A 1 to 20
If unit issue order Unitcount(Integer A) equals to stop then issue order matching unit to attack move into (0,-20000) else to do nothing
hi tested the thing i posted here and noticed unit issue order comparator doesnt work. i build work-around for this but my work crashed and second time it wouldnt allow me to save (weird).
there is also a much more simple solution (not so delicate) for your issue
and its simply make event : every 1 second of game
action: pick every unit owned by cpu and make issue order into random point.
there are slight negative downsides on this like it interrupts targeted spells and it interrupts their animation but aside from that its best for beginner to slightly advanced user.
if you want to make things in a professional way. you need to modify trigger y from previous post following way:
First create new variable point named UnitPos[20] with amount of room for all units that are being detected in the same time:
Event : Every 1 second of the game
Condition :
Action :
Foreach integer A 1 to 20
set Point UnitPos[Integer A] to current position of Unitcount[Integer A]
wait 0.5 seconds
For each integer A 1 to 20
if Current position of UnitCount[Integer A] equal to UnitPos[Integer A] then
do nothing else to do issue order UnitCount[Integer A] to attack move into (0,-20000)
In my testes this worked fine except when units start attacking other units and stop their movement speed and detector think they idle. To work around this you need also another detector that detects if the unit is attacking other unit. However for some reason reforged did not allow me to use 3 times âfor each Integer A x to zâ loop in a same trigger. so we might wanna abondom the idea of making it too complicate. (its bugged or whatever).
edit. little spell mistake corrected
I think this is pretty simple
Event: Unit finishes casting a spell
Condition: Unit type of casting unit equal to sorceress
Unit issue order triggering/casting unit to attack move into *point(0,0)
*(put original position here where you meant to attack move him)
if this doesnt work put a little wait time before making an action hence there could be some animation delay. (i just wrote it here without testing)
something like wait 0.2 seconds
OR if the sorceress are not part of enemy wave units.
Then
Event: Unit finishes casting a spell
Condition:Ability being cast equal to polymorph
Action: Unit issue order âtargeted unitâ attack-move into point(x,x)
yet again polymorph buff can take some amount of milliseconds to allow targeted unit to take a move order so you might wanna set up a little waiting time before issuing a command.
Optional use acuising range instead of attack-move order but I dont know why would you wanna do that.
I have used editor 20 years and for some reason: begin channeling spell, start channeling spell ect doesnt actually work and you can only use âfinishes casting a spellâ.
Ofcourse I help you for free for the love of the world editing <3
edit. little fix on text
oh wait nothing works. maybe its devil thing that prevents me helping you.
âŚ(2 days later)
ok figured it out
must use event: âa unit starts the effect of an abilityâ instead of âfinishes casting an abilityâ
Event: a unit starts the effect of an ability
Condition:Ability being cast equal to polymorph
Action:
set variable âunitâ = targeted unit of ability being cast
wait 61 seconds
Unit issue order âunitâ attack-move into region x
where variable unit is a variable typed unit
it´s still not perfect thought because if you have many time hex casted during this 61 sec that this one trigger is running the the most recent one unit is going to overlapse the pervious and the previous unit gets stuck.
to combat this issue. you need to add counter that increses by 1 each time this trigger is being called.
Event: a unit starts the effect of an ability
Condition:Ability being cast equal to polymorph
Action:
set counter = counter + 1
set variable âunitâ [counter] = targeted unit of ability being cast
if counter equals to 20 then set counter = 0,
(where 20 is number of spells you want to enable simultaneously within 61 second timeframe)
then create second trigger that only gives order to those units that have been added into variables
For every 1-2 seconds of the game
For each integer A 1 to 20
Unit issue order âunitâ [integer a] attack-move into region x,
(where 20 is number of spells you want to enable simultaneously within 61 second timeframe)
by the way if you find this helpful credit would be nice but not needed