| 03-05-2007, 01:13 AM | #1 |
I'm working on an arena style map and am having trouble with how the waves attack. I tried to copy Orc GLadiators commands for it but it's protected. First I spawn the waves in the gates. Then I make the waves in the gates attack the center of the map in case the heroes crowd the gate. Once the wave monsters move a little into the arena I tell them to attack-move-to position of a random hero (the PC's). Problem is that they will target hero A, and then hero B will be between the wave monster and hero A, but the wave monster will not attack hero B at all, sometimes not even when hero B attacks the wave monster. My question is how do I make the wave monsters randomly choose a target to attack, but intercept any other ones in their path (like when I use the attack-move-to command in WCIII). My second question pertains to the AI while attacking. Using triggers, I want to make a small percent of each wave mob (10-20%) randomly switch targets every 10 seconds. I want the wave monsters chosen to be a random few of the entire group, and attack any of the random heroes. My second question: Using triggers, how do I choose a few random units in a unitgroup (variable) to go attack a random hero. I know how to pick a random hero, I just dont know how to say, "I want 3 out of 10 wave monsters to each choose a random target and attack it." Each monster would be assigned random hero individually (I don't want a bum rush of one hero). Thanks ahead of time. |
| 03-05-2007, 01:37 AM | #2 |
For question 1: Use a trigger that checks for units around the attacking monster and does different things accordingly. Example: At the start of your wave: ![]() Set TempGroup equal to (Units in (Playable Map Area) matching ((Matching unit) is a Hero = true))
![]() Set Unit_To_Attack equal to (Random unit from (TempGroup))Periodic Check: ![]() Conditions
|
