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

[AI] Persistent and consistent creep waves?

Status
Not open for further replies.
Level 3
Joined
May 16, 2017
Messages
26
Im planning to spawn creeps that attack a specific outpost of my humans until these humans are all wiped out includinf the buildings, the creeps will no longer move to that but move to attack another outpost.

I tried some triggers and I saw the creeps are gathered in the wiped out outpost region and they do nothing.

Does it have anything to do with regions?
help me :*** tnxxxx :3
 
Could you post the trigger or the code? It could help us a lot.

By my guess, I think that you're using Neutral Hostile as your creep wave. It could be possible that you're ordering a group to do something instead of just letting the For Group do the ordering for you.

Reading the problem further, you could check out the number of units in the outpost and compare if the number of units alive in there is equal to 0. When it is zero, you could add a flag to tell the AI not to attack that outpost.

  • Events
    • Event
      • A unit dies
    • Conditions
      • (Triggering unit) belongs to (Owner of outpost) Equal to true
      • (Triggering unit) is in (Outpost Region) Equal to true
    • Actions
      • If - If (All Statements are true, then do (Then Actions), else do (Else Actions)
        • If
          • (Number of units in (Outpost Region) Equal to 0.
        • Then
          • set <flag_var> = false
        • Else
Psuedo-code:
  • Periodic Event
    • Events
      • Every 30 seconds
    • Conditions
    • Actions
      • Pick every unit in <wave_Group> and do (Actions)
        • Actions
          • If <flag_var> then
            • Order unit to go to (Outpost Region)
          • Else
            • Order unit to do something else
 
Last edited:
Status
Not open for further replies.
Top