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

[AI] AI Help Please!

Status
Not open for further replies.
Level 6
Joined
Sep 26, 2007
Messages
114
Ok i have added ai to my map defend the realm and i can get them to build
but only humans are buiding units the orcs do nothing :(

Here are the triggers i am useing to make the ai turn on ect

  • ComputerPlayer
    • Events
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 5, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Player((Integer A))) controller) Equal to Computer
            • Then - Actions
              • AI - Start melee AI script for (Player((Integer A))): war3mapImported\Defend the realm Orc AI.ai
            • Else - Actions
              • Do nothing
      • For each (Integer B) from 6 to 10, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • ((Player((Integer B))) controller) Equal to Computer
            • Then - Actions
              • AI - Start melee AI script for (Player((Integer B))): war3mapImported\Defend the realm Human AI.ai
            • Else - Actions
              • Do nothing
  • AI Train
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 5, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • ((Player((Integer A))) controller) Equal to Computer
                  • ((Player((Integer A))) slot status) Equal to Has left the game
                  • ((Player((Integer A))) slot status) Equal to Is unused
            • Then - Actions
              • AI - Start melee AI script for (Player((Integer A))): war3mapImported\Defend the realm Orc unit AI.ai
            • Else - Actions
              • Do nothing
      • For each (Integer B) from 6 to 10, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • ((Player((Integer B))) controller) Equal to Computer
                  • ((Player((Integer B))) slot status) Equal to Has left the game
                  • ((Player((Integer B))) slot status) Equal to Is unused
            • Then - Actions
              • AI - Start melee AI script for (Player((Integer B))): war3mapImported\Defend the realm Human unit AI.ai
            • Else - Actions
              • Do nothing
  • Human AI
    • Events
      • Unit - A unit enters Region 017 <gen>
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • ((Triggering unit) belongs to an ally of Player 11 (Dark Green)) Equal to True
          • ((Triggering unit) is A peon-type unit) Not equal to True
          • ((Triggering unit) is A structure) Not equal to True
    • Actions
      • Unit - Change color of (Triggering unit) to Black
      • Set Temp_Point[0] = (Center of Teleport 15 <gen>)
      • Unit - Move (Triggering unit) instantly to Temp_Point[0]
      • Custom script: call RemoveLocation(udg_Temp_Point[0])
  • Orc AI
    • Events
      • Unit - A unit enters Region 019 <gen>
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • ((Triggering unit) belongs to an ally of Player 12 (Brown)) Equal to True
          • ((Triggering unit) is A peon-type unit) Not equal to True
          • ((Triggering unit) is A structure) Not equal to True
    • Actions
      • Unit - Change color of (Triggering unit) to Black
      • Set Temp_Point[0] = (Center of Teleport 16 <gen>)
      • Unit - Move (Triggering unit) instantly to Temp_Point[0]
      • Custom script: call RemoveLocation(udg_Temp_Point[0])
  • PlayerLeft
    • Events
      • Player - Player 1 (Red) leaves the game
      • Player - Player 2 (Blue) leaves the game
      • Player - Player 3 (Teal) leaves the game
      • Player - Player 4 (Purple) leaves the game
      • Player - Player 5 (Yellow) leaves the game
      • Player - Player 6 (Orange) leaves the game
      • Player - Player 7 (Green) leaves the game
      • Player - Player 8 (Pink) leaves the game
      • Player - Player 9 (Gray) leaves the game
      • Player - Player 10 (Light Blue) leaves the game
    • Conditions
    • Actions
      • Game - Display to (All players) the text: (Name of (Triggering player))
      • Game - Display to (All players) the text: Has left the game
      • Leaderboard - Change the color of the label for (Triggering player) in (Last created leaderboard) to (100.00%, 0.00%, 0.00%) with 0.00% transparency
      • Leaderboard - Change the label for (Triggering player) in (Last created leaderboard) to Has Left
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Race of (Triggering player)) Equal to Human
        • Then - Actions
          • AI - Start melee AI script for (Triggering player): war3mapImported\Defend the realm Human AI.ai
        • Else - Actions
          • AI - Start melee AI script for (Triggering player): war3mapImported\Defend the realm Orc AI.ai
  • No player
    • Events
      • Time - Elapsed game time is 2.00 seconds
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • ((Player((Integer A))) slot status) Equal to Is unused
            • Then - Actions
              • Set Unit_group[0] = (Units in (Playable map area) owned by (Player((Integer A))))
              • Unit Group - Pick every unit in Unit_group[0] and do (Unit - Remove (Picked unit) from the game)
              • Custom script: call DestroyGroup(udg_Unit_group[0])
            • Else - Actions
              • AI - Start melee AI script for (Triggering player): war3mapImported\Defend the realm Human AI.ai
              • AI - Start melee AI script for (Triggering player): war3mapImported\Defend the realm Orc AI.ai
      • Trigger - Turn off (This trigger)

and heres the map so you can look at the ai and triggers better

so can you please tell me whats wrong with it? cheers
 

Attachments

  • Defend the Realm 1.7.2.w3x
    664.5 KB · Views: 42
Status
Not open for further replies.
Top