| 03-18-2004, 07:02 AM | #1 |
I'm having difficulties getting this trigger to not create a special effect or dummy unit all at once from units in the unit group. What I want it to do is pick a random unit from a unit group. Create a special effect(blink) on that picked unit. Create 1 visible dummyunit that has the same model as the hero near the position of the picked random unit, play its attack animation and cast shadow strike on the picked unit and wait until if finishes(not the damage over time effect duration) 'the cast time' shadow strike. Repeat until there are 0 units in the unit group. The problem is sometimes it creates all the effects too fast or doen't show up at all. Here are the screens: Midnight Strike ![]() Midnight Strike2 ![]() I forgot to put <= 1 in the if statement Midnight Strike Cleanup ![]() |
| 03-18-2004, 06:25 PM | #2 |
Waits are sometimes ignored if a "run trigger"-action has been run in the same trigger. Try putting the Midnight Strike 2 actions into the foor loop. |
| 03-19-2004, 12:33 AM | #3 | |
Quote:
Thank you Youma for helping. It definitely seems to work but the timing on it isn't right and the actual spell the dummy unit cast on the target with 500 hit points kills it in 1 shot. All I did was copy shadow strike and make it a non hero spell set the range to 99999, 0 mana/duration/cast time and gave it to the dummy unit. The other stats are left alone. but it kill the units in one hit and I don't know why. Maybe its not meant to be a unit spell? |
| 03-19-2004, 04:44 AM | #4 |
There is already a unit version of the spell. |
| 03-19-2004, 10:07 AM | #5 |
I found 2 problems, even if they dont seem to be the main problems: 1) set enemy_unit to RANDOM unit from group X lets say you got 10 units in the group and if you get unlucky, wc3 selects the same unit 2 times? why? because the midnight strike 2 trigger has a WAIT command in while the first loop is still running 2) i think you should also try removing that 2 second wait in the loop .. if there are 15 units, the trigger will run 30+ seconds |
