• 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.

attacking system help

Status
Not open for further replies.
Level 6
Joined
Jul 26, 2010
Messages
167
needing help with attacking system

well I have a map filled with creeps that only go to attack a specific door. But Ihow I make the units that get close to those creeps get attacked by them?, instead of keep attacking that door...

heres my spawn trigger

  • Wave1
    • Acontecimientos
      • Tiempo - Every 1.00 seconds of game time
    • Condiciones
    • Acciones
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • Si: Condiciones
          • (Number of units in (Units in (Playable map area))) Menor que o igual a 100
        • Entonces: Acciones
          • Unidad - Create 1 Necrófago for Jugador 2 (azul) at (Random point in CreepsEste <gen>) facing Vista edificio predeterminada degrees
          • Unidad - Order (Last created unit) to Patrullar a (Center of atacarNorte <gen>)
          • Unidad - Create 1 Necrófago for Jugador 2 (azul) at (Random point in CreepsSur <gen>) facing Vista edificio predeterminada degrees
          • Unidad - Order (Last created unit) to Patrullar a (Center of atacarNorte <gen>)
          • Unidad - Create 1 Necrófago for Jugador 2 (azul) at (Random point in CreepsOeste <gen>) facing Vista edificio predeterminada degrees
          • Unidad - Order (Last created unit) to Patrullar a (Center of atacarSur <gen>)
          • Unidad - Create 1 Necrófago for Jugador 2 (azul) at (Random point in RegionNorte <gen>) facing Vista edificio predeterminada degrees
          • Unidad - Order (Last created unit) to Patrullar a (Center of atacarSur <gen>)
        • Otros: Acciones
wc3 in spanish sorry :/
 
Last edited:
Level 6
Joined
Jul 26, 2010
Messages
167
I made the creeps to attack the closet unit with this trigger

  • creep attack
    • Acontecimientos
      • Time - Every 1.00 seconds of game time
    • Condition
    • Acctions
      • For each (Integer A) from 0 to 200, do (Actions)
        • Loop: Acciones
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If: Condiciones
              • (Distance between (Position of Creeps[(Integer A)]) and (Position of Heroes[0])) Menor que o igual (<=) a 500.00
            • Then: Acciones
              • Unit - Order Creeps[(Integer A)] to Atacar Heroes[0]
            • Else: Acciones
all the units that spwn goes to an array (creeps), and the units that get close goes to Heroes. the creep that has a close unit will be sent to attack it, it works but after the map is full with creeps, the start to move slow like moving into intervals of seconds each time more longer :(...
 
This would be more efficient for the first trigger as you do it again and again.
  • Temp 1
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set TempPointArray[0] = [SpawnPoint]
      • Set TempPointArray[1] = [SpawnPoint2]
      • Set TempPointArray[2] = [SpawnPoint3]
      • Set TempPointArray[3] = [SpawnPoint4]
      • Set TempPoint2[0] = [atacar Norte]
      • Set TempPoint2[1] = [atacar Norte]
      • Set TempPoint2[2] = [atacar Sur]
      • Set TempPoint2[3] = [atacar Sur]
  • Temp
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in (Units in (Playable map area))) Less than or equal to 100
        • Then - Actions
          • For each (Integer A) from 1 to 4, do (Actions)
            • Loop - Actions
              • Unit - Create 1 Rifleman for Player 2 (Blue) at TempPointArray[(Integer A)] facing Default building facing degrees
              • Unit - Order (Last created unit) to Move To TempPoint2[(Integer A)]
        • Else - Actions
 
Level 6
Joined
Jul 26, 2010
Messages
167
I've improved the trigger of the spawnning with the entropy one, but still the creeps makes more and more stops in their movements as the map is getting filled with creeps :/... any idea of how to fix it?. I don't think this is an uncomon bug....
 
Status
Not open for further replies.
Top