• 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 Ignores Trigger Set Rally Point

Status
Not open for further replies.
Level 6
Joined
Sep 11, 2006
Messages
172
This is the script I've been using to make player 11, a computer player, automatically attack the human players on the map.

  • Spawn
    • Events
      • Time - Every 180.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to (Number of players in (All players controlled by a User player)), do (Actions)
        • Loop - Actions
          • Set DSpawnPoint[1] = (Random point in DarkSpawn[(Random integer number between 1 and 29)])
          • Set GroupDump[7] = (Units within 800.00 of DSpawnPoint[1] matching ((((Matching unit) is A structure) Equal to True) and (((Owner of (Matching unit)) is in Users) Equal to True)))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Number of units in GroupDump[7]) Equal to 0
            • Then - Actions
              • Custom script: call DestroyGroup (udg_GroupDump[7])
              • Unit - Create 1 |cff434e54Rupture|r for Player 11 (Dark Green) at DSpawnPoint[1] facing Default building facing degrees
              • Custom script: call RemoveLocation(udg_DSpawnPoint[1])
              • Set AttackPoint[1] = (Position of (Random unit from (Units in (Playable map area) matching (((Unit-type of (Matching unit)) Equal to |cffb9d1eaScientist|r) or ((((Matching unit) is A town-hall-type unit) Equal to True) and ((Owner of (Matching unit)) Not equal to Player 11 (Dark
              • Unit - Set Rally-Point for (Last created unit) to AttackPoint[1]
              • Custom script: call RemoveLocation(udg_AttackPoint[1])
              • Unit - Order (Last created unit) to train/upgrade to a |cff27004fWraith Fiend|r
              • Unit - Order (Last created unit) to train/upgrade to a |cff27004fWraith Fiend|r
              • Unit - Order (Last created unit) to train/upgrade to a |cff27004fWraith Fiend|r
              • Unit - Order (Last created unit) to train/upgrade to a |cff27004fWraith Fiend|r
              • Unit - Order (Last created unit) to train/upgrade to a |cff27004fWraith Fiend|r
              • Unit - Order (Last created unit) to train/upgrade to a |cff27004fDespoiler|r (End Line)
            • Else - Actions
              • Custom script: call DestroyGroup (udg_GroupDump[7])
              • Custom script: call RemoveLocation(udg_DSpawnPoint[1])
              • Custom script: call RemoveLocation(udg_AttackPoint[1])
              • Trigger - Run (This trigger) (ignoring conditions)
This was working until recently. I have not made anymore triggers that command players 11's units to do anything. I have not made any triggers that would affect their orders at all.

I have tested this with debug messages and point pinging on the map.

So why are player 11's units torn between going to the rally point and crowding around player 11's hero, which I did not order them to do.

I have watched these units spawn and either go back and forth between traveling to an attack point or that of the hero, or simply running straight for player 11's hero, bypassing the trigger rally point set up for them.

What is written into the basic code that commands them to move to a friendly hero's position?

And why is this happening so late in the development process when this was working perfectly fine earlier?

I have also disabled melee AI scripts so they shouldn't be acting on their own at all.
 
Status
Not open for further replies.
Top