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

[General] My AI bug somehow

Status
Not open for further replies.
I got this map I made... I made simple AI categories for the heroes if controlled by computer:
1.after 15 seconds after map init(15 secs are cinematic) they all move-attack to a region near the enemy ship
2. If they have no order they move-attack to a region near enemy's ship
3. If the ship is attacked they ignore everything and run to the ally ship.
4. There is also a trigger that turns off and on every 5 sec when an ally ship is attacked saying this with message...
The problem is that the heroes bug somehow.. when my allies attack the enemy ship and when the enemy team attack my ship all heroes just stop doing anything... just stop in place - and I can see that their animation begins and stop in a second which means something orders them to stop.. which is very very weird :O

Do you need trigger to see if needed?
 
Last edited:
Level 25
Joined
Sep 26, 2009
Messages
2,381
first, UI means "User interface", what you're describing is AI - artificial intelligence.

It seems that there are conflicting triggers - one starts the other one, or something like that.
It would be best if you post your triggers.
 
first, UI means "User interface", what you're describing is AI - artificial intelligence.

It seems that there are conflicting triggers - one starts the other one, or something like that.
It would be best if you post your triggers.

YEp sorry about this :D AI<>UI, I forgot to think :D

I will Post Them

AI_move_if_nothing
  • paladin if
    • Events
      • Unit - Paladin 0000 <gen> Is issued an order with no target
    • Conditions
      • (Player 1 (Red) controller) Equal to Computer
    • Actions
      • Unit - Order Paladin 0000 <gen> to Attack-Move To (Center of attack horde <gen>)
And so on...
AI_defend_ships
  • paladin defend
    • Events
      • Unit - Alliance Ship 0029 <gen> Is attacked
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 1 (Red) controller) Equal to Computer
        • Then - Actions
          • Unit - Order Paladin 0000 <gen> to Attack-Move To (Center of mount king <gen>)
        • Else - Actions
and so on...
AI_goAttack
  • order 1
    • Events
      • Time - Elapsed game time is 16.00 seconds
    • Conditions
      • (Player 1 (Red) controller) Equal to Computer
    • Actions
      • Unit - Order Paladin 0000 <gen> to Attack-Move To (Center of attack horde <gen>)
And so on...
Alert!
  • alliance ship attacked
    • Events
      • Unit - Alliance Ship 0029 <gen> Is attacked
    • Conditions
    • Actions
      • Game - Display to (All allies of Player 1 (Red)) the text: |c00FF0000Your ship...
      • Trigger - Turn off (This trigger)
      • Wait 5.00 seconds
      • Trigger - Turn on (This trigger)
  • horde ship attacked
    • Events
      • Unit - Horde Ship 0030 <gen> Is attacked
    • Conditions
    • Actions
      • Game - Display to (All allies of Player 7 (Green)) the text: |c00FF0000Your ship...
      • Trigger - Turn off (This trigger)
      • Wait 5.00 seconds
      • Trigger - Turn on (This trigger)
So I said they bug after short time after they attack a ship, so the problem might be with the ships and triggers that lin kwith them. Can something in the ship objects themselves be the problem?
 
Last edited:
Level 25
Joined
Sep 26, 2009
Messages
2,381
The problem seems to be that you simply change their current order.

You don't really check if they have no order, you just make a new order whenever they are ordered to stop (which imo never happens, since the event fires when you order him to stop, hold position, etc. not when he stops by himself by having no room for movement, or when he finishes his current action).

The problem most likely lies in the fact that heroes are ordered to attack, then immediately to defend (thanks to defend trigger) then through some other trigger I presume they are force to go attack enemy again... and this process repeats infinitely in small intervals, resulting in the units not knowing what to do (so they behave like you wrote).


and tbh alliance/horde ship attacked triggers have nothing to do with the AI :)
 
Status
Not open for further replies.
Top