• 🏆 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!

[Trigger] What needs to be added so grunts dont run past other units?

Status
Not open for further replies.
Level 8
Joined
Nov 21, 2008
Messages
316
Here is the spawn trigger in my map. The problem is when the grunts are ordered to attack, they just attack the random unit from the group and not any unit close to them. when i do test runs of my map. nearly 90% of pllayers are spared they can attack grunts as they move seeing as the grunts dont want them as of yet.

how do i make it so they just attack everything in there path, or thts close, and in there way?

  • Grunt Wave
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
    • Actions
      • Set TempGroup = (Units in (Playable map area) matching (((Owner of (Matching unit)) Equal to Player 11 (Dark Green)) or ((Owner of (Matching unit)) Equal to Player 12 (Brown))))
      • Set TempGroup2 = (Units in (Playable map area) matching (((Matching unit) belongs to an enemy of Player 12 (Brown)) Equal to True))
      • For each (Integer A) from 1 to 3, do (Actions)
        • Loop - Actions
          • Set Spawn_Point2[1] = (Random point in SpawnRegions2[(Random integer number between 1 and 3)])
          • Unit - Create 1 Grunt for Player 12 (Brown) at Spawn_Point2[1] facing Default building facing degrees
          • Unit - Order (Last created unit) to Attack (Random unit from TempGroup2)
          • Unit - Create 1 Grunt for Player 11 (Dark Green) at Spawn_Point2[1] facing Default building facing degrees
          • Unit - Order (Last created unit) to Attack (Random unit from TempGroup2)
          • Custom script: call RemoveLocation (udg_Spawn_Point2[1])
          • Custom script: call RemoveLocation (udg_Spawn_Point2[bj_forLoopAIndex])
          • Wait 0.00 seconds
      • Custom script: call DestroyGroup(udg_TempGroup)
      • Custom script: call DestroyGroup(udg_TempGroup2)
 
Level 4
Joined
Mar 23, 2008
Messages
87
Order the units to attack point(location of unit) instead of the unit itself
 
Level 4
Joined
Mar 23, 2008
Messages
87
@Cheezeman: That's basicly what i said, just without a solution.
@Blackrock: I would find the exact name of the action if i could. Lacking WE at work I only have memory to go from. I think it's called Issue Order Targeting a Point
 
Level 3
Joined
Dec 6, 2005
Messages
67
Bit of clarification on Bomi's... i believe he is referring to the attack-move
  • Unit - Order (Last created unit) to Attack-Move To some_point
 
Level 8
Joined
Nov 21, 2008
Messages
316
my map isnt a small little camping in one place map. suppose players arnt in a location where there set to attack what then? Is there a AI type tht just oders units to destroy every thing on map thts not allyd.


edit* i got it now* thanx guys
 
Last edited:
Status
Not open for further replies.
Top