• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece!🔗 Click here to enter!

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