Ai

Crofna

New Member
Reaction score
0
How to make AI for this map
I hope it isnt hard...
 

Attachments

  • Invasion of Burning Legion v1.2.w3x
    105.7 KB · Views: 140

Joccaren

You can change this now in User CP.
Reaction score
54
I have two answers.
1. If it is a melee type map (Build an empire, kill an enemy empire), use the AI editor.
2. Use tons of triggers, If/then/elses ect.
If you want help with how to do some of these things, tell us which part you can't figure out and we'll help.
 

Crofna

New Member
Reaction score
0
I need AI to:
Team 2 AI
Train troops from existing building, destroy enemy empire, use existing troops.

Team 1 AI
Train troops from existing building, deffend empire, use existing troops, do not attack.
I'm to dumb to use bilions of triggers for AI:banghead:, only if someone write them here i just make a copy in WE.
 

ZugZugZealot

New Member
Reaction score
33
Doing loads of triggers to make functional AI isn't too hard intellectually. It's accomplishing the same task with very few triggers is the intellectually challenging part. Grind Work vs Problem Solving Work...

A starting point is always nice...

Custom AI's are pretty much just checking "what's up" and acting upon it. But before going there... You must first make a choice of what tells it to look at "what's up?", which would be called "events" in triggers...

Choice of event to tell it to check what's going on, depends on what you're aiming for...

First, there's just plain scanning over and over, which would be a periodic event.
Trigger:
  • Events
    • Time - Every 1.00 seconds of game time


The shorter the intervals, the more responsive the computer will be. However, depending on the map, running AI checks too fast can be heavy on a computer... This is typically acceptable for macro aspect play.


A more combat oriented choice, and much more responsive without having to push people's system resources as much, would be unit events. Such as...
Trigger:
  • Events
    • Unit - A unit owned by Neutral Hostile Is attacked

You could be like... Okay so the computer's unit, let's say a footman is attacked by an arachnathid, in checking "what's up?" it'd find that this is the case that is where you tell it to look for such a scenario, from there you could tell the footman "use defend"...

There are other unit events you can use as well, like death...
Trigger:
  • Events
    • Unit - A unit owned by Neutral Hostile Dies
When this happens you could have it look to see if you have a certain count of units in the area of the death and enemy unit count, and if too overpowered by the enemy, the computer could retreat them...



Anyways...

I'll continue on the "what's up?" aka conditions (if then else) as well as "what to do" aka actions for AI later... Unless of course someone else picks it up. <_<
 

SwedishChef

New Member
Reaction score
32
There was AI competition for some weeks ago, try to search for it. If im not totally wrong you could see the triggers there (correct me if im wrong!).
 

Crofna

New Member
Reaction score
0
Will something like this work?

Trigger:
  • Night Elf AI 1
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Gate (Horizontal) 1163 &lt;gen&gt; is dead) Equal to True
        • Then - Actions
          • AI - Lock guard position of (Attacked unit)
        • Else - Actions
          • Do nothing
 

SyrisX

New Member
Reaction score
3
Will something like this work?

Trigger:
  • Night Elf AI 1
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Gate (Horizontal) 1163 &lt;gen&gt; is dead) Equal to True
        • Then - Actions
          • AI - Lock guard position of (Attacked unit)
        • Else - Actions
          • Do nothing

I don't believe this will work, since there is no "Attacked Unit" causing the actions to take place.

What is the goal of this trigger?
 

Crofna

New Member
Reaction score
0
I'm trying to make AI for map and doing loads of $#!T$ to create it.
Goal of that trigger is:
If enemy destroy gate of Elven base, they will not move+run in circle, their position will be locked.
I did one more thing:

Trigger:
  • High Elf Attacked
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
      • (Region 006 &lt;gen&gt; contains Archimonde 0397 &lt;gen&gt;) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Region 006 &lt;gen&gt; contains (Triggering unit)) Equal to True
        • Then - Actions
          • Set Unit[12] = Swordsman 0346 &lt;gen&gt;
          • Set Unit[13] = Swordsman 0326 &lt;gen&gt;
          • Set Unit[14] = Swordsman 0325 &lt;gen&gt;
          • Set Unit[15] = Swordsman 0327 &lt;gen&gt;
          • Set Unit[16] = Swordsman 0347 &lt;gen&gt;
          • Set Unit[17] = Emissary 0341 &lt;gen&gt;
          • Set Unit[18] = Archer 0348 &lt;gen&gt;
          • Set Unit[19] = Archer 0328 &lt;gen&gt;
          • Set Unit[20] = Archer 0350 &lt;gen&gt;
          • Set Unit[21] = Archer 0329 &lt;gen&gt;
          • Set Unit[22] = Hydromancer 0342 &lt;gen&gt;
          • Set Unit[23] = Hydromancer 0343 &lt;gen&gt;
          • Set Unit[24] = Blood Elf Lieutenant 0012 &lt;gen&gt;
          • Set Unit[25] = Captain 0360 &lt;gen&gt;
          • Set Unit[26] = Sylvanas Windrunner 0324 &lt;gen&gt;
        • Else - Actions
          • Do nothing


Now my question is how to make rally point for Units 12-26?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top