• 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] How do you make a bot with triggers?

Status
Not open for further replies.
Level 4
Joined
Mar 19, 2008
Messages
89
I just can't figure out how to make a bot with triggers! I need bots like the one in castle fight because I'm making a map like that, but I don't know how. So if anyone could help me do this I would be thankful.
 
Level 4
Joined
Mar 19, 2008
Messages
89
cool. the example i need is lets say there is just one race. it has one unit that builds, and there are two buildings. how do i make a bot build one of the buildings randomly?
 
Level 3
Joined
Jun 14, 2007
Messages
56
The heroes? Yeah i was asking the above person if he meant its done in the ai editor so was trying to find out too. I always assumed it would never be done in AI editor and only be done with vJass triggers.



Im programming an AI atm - a game that has houses to hide from "predators" i'm making the predators spread out and search each different house, and narrow their search if their suspicious of the area, and sometimes "assault" the house by blocking escape measures "such as a spell snare for blink" when a few players are in a house.

Different systems (vJass libraries) for different modes activated, such as "General Search" which finds out what order needs to be given (such as move to locations) and keeps reissuing the order.







Sometimes a good idea is an order que the can be found here: http://www.hiveworkshop.com/forums/f413/orderqueue-shift-triggers-84857/





As for dota hero AI my thought would be alot of different eventualities change the behaviour of the ai. A complex system that calculates decisions based on basic things like current unit health of hero, if a tower is nearby, what hero their facing. different eventuallities means a different decision e.g. to chase the hero or not
 
Level 12
Joined
Jun 28, 2008
Messages
688
As for dota hero AI my thought would be alot of different eventualities change the behaviour of the ai. A complex system that calculates decisions based on basic things like current unit health of hero, if a tower is nearby, what hero their facing. different eventuallities means a different decision e.g. to chase the hero or not

That's pretty much exactly correct. AI Editor is only used when you want to make a custom race for a melee map, though it can be used in non-melee. You basically just input the units, buildings, researches and things like that, and when the AI runs, it will be as though it were a normal melee game, but the Computer Player makes its decisions based on the things you put into its AI.

So basically what you would want to do is make many seperate triggers which tell the "AI" what to do in certain situations. Say they have a main structure to defend, and you want them to fend off attackers. You would just have the trigger run when the main structure is attacked, and order the AI to attack the intruder with whatever unit resources it controls. That's just an example, but you get the main idea.
 
Level 9
Joined
May 30, 2008
Messages
430
This will make when player 1 have enough gold for a building when player 2 (enemy in the case) have the building producing gryphons player 1 to build one of the buildings that are set in the trigger. AI making is hard and i never deal with it but if u try few times u will learnk how to deal with it
  • Build 1
    • Events
      • Player - Player 1 (Red)'s Current gold becomes Greater than 1000.00
    • Conditions
      • (Number of units in (Units owned by Player 2 (Blue) of type Gryphon Aviary)) Greater than or equal to 1
    • Actions
      • Set random = (Random integer number between 1 and 3)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • random Equal to 1
        • Then - Actions
          • Unit - Order Peasant 0000 <gen> to build a Workshop at (Center of (Playable map area))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • random Equal to 2
        • Then - Actions
          • Unit - Order Peasant 0000 <gen> to build a Barracks at (Center of (Playable map area))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • random Equal to 3
        • Then - Actions
          • Unit - Order Peasant 0000 <gen> to build a Gryphon Aviary at (Center of (Playable map area))
        • Else - Actions
 
Status
Not open for further replies.
Top