• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[General] Unti Attack Focus Splitting

Status
Not open for further replies.
Level 2
Joined
Aug 26, 2011
Messages
8
Hey guys

i have a little problem.

Is it possible when units spawn that they split up and focus other players?

Like the problem is, if enemy units get spawned. they always focus 1 guy. is it possible that the enemy units splitt up, like 5 enemies units and 5 people are playing that 1 enemie is going for 1 player and 2nd enemie for 2nd player and stuff like that?

sry for my bad english skills.

thanks for help.
 

Kusanagi Kuro

Hosted Project: SC
Level 10
Joined
Mar 11, 2012
Messages
708
I think it's possible to order them to attack random player and not focusing on a single player. Need some trigger or just AI scripts. Sorry but I'm not really good at this part.
 
Level 17
Joined
Aug 19, 2007
Messages
1,380
Something really simple (don't know how advanced you want it to have); the following trigger picks a random unit from neutral hostile (replace this with the enemy or if neutral hostile is the enemy keep it this way) in playable map area (replace this with your region or point where you spawned the enemy units) and let it attack a random unit from a random player (enemy of the enemy :p).

  • Unit - Order (Random unit from (Units in (Playable map area) owned by Neutral Hostile)) to Attack (Random unit from (Units owned by (Random player from (All enemies of Neutral Hostile))))
- edit, the trigger below also checks if the random unit is not already attacking.

  • Actions
    • Unit - Order (Random unit from (Units in (Playable map area) matching (((Owner of (Matching unit)) Equal to Neutral Hostile) and ((Current order of (Matching unit)) Not equal to (Order(attack)))))) to Attack (Random unit from (Units owned by (Random player from (All enemies of Neutral Hostile))))
 
Level 2
Joined
Aug 26, 2011
Messages
8
Nah its like i want to rework on the kodo tag. The Main Thing is that when a kodo is spawned, it will chase the one who is close to him. but i want to splitt them, so that each players gets one. Its little bit boring that just one players get all the kodos and stuff like that..
 
Level 17
Joined
Aug 19, 2007
Messages
1,380
I could be wrong but I think there is not an unit group leak since I did not use an unit group. However do watch the region/point for leaks (playable map area is predefined so it does not leak iirc).

@TheNightWalker, in that case the trigger should work (just change the enemy owner and region).

-edit

The following trigger picks a random kodo beast and orders it to attack a random unit from a random player. You only need to change the Neutral Hostile to the right enemy owner (e.g. player 2 or neutral hostile or whatever it is in your map).

  • Unit - Order (Random unit from (Units in (Playable map area) matching (((Unit-type of (Matching unit)) Equal to Kodo Beast) and ((Current order of (Matching unit)) Not equal to (Order(attack)))))) to Attack (Random unit from (Units owned by (Random player from (All enemies of Neutral Hostile))))
 
Status
Not open for further replies.
Top