1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. Fill your cup and take your pick among the maps best suited for this year's Hive Cup. The 6th Melee Mapping Contest Poll is up!
    Dismiss Notice
  4. Shoot to thrill, play to kill. Sate your hunger with the 33rd Modeling Contest!
    Dismiss Notice
  5. Do you hear boss music? It's the 17th Mini Mapping Contest!
    Dismiss Notice
  6. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

How to make an AI for your map

Discussion in 'Trigger (GUI) Editor Tutorials' started by sentrywiz, Dec 18, 2013.

  1. Mirage1

    Mirage1

    Joined:
    Oct 31, 2015
    Messages:
    64
    Resources:
    0
    Resources:
    0
    Very good tutorial. There could be more of them on hive. I would like some help with a problem in my AI. When a hero who is in the AI group is controlled by a Computer player (Set by filling the player's slot with a Computer) some of the "default AI" commands are activated conflicting with the triggered commands.

    I tried to create a null AI in AI Editor without orders, builds, attack groups, hero skill selection or anything and run it in these players. Made it entirely blank to not send any order as flee or use items. But it did not work. The AI still used items and skills.
    Anyone know how to solve this? In Dota Allstars the AI is placed by computer slots and I doubt they interfere in the commands. What I need is a way to nullify these "default" commands of Warcraft so that they do not conflict with my triggered ones.

    I searched for hours in the Hive and found nothing related. Any help is welcome.
     
  2. I hope you like the term "better late than never" because this is a 2 year reply :p

    Sorry.

    Yes the default AI commands cannot be controlled without triggers.

    But you'd have to share your map or something in order to see whats wrong.
     
  3. Mirage1

    Mirage1

    Joined:
    Oct 31, 2015
    Messages:
    64
    Resources:
    0
    Resources:
    0
    Thx dude. But i don't even remember which map I was talking about haha
     
  4. Yeah :D you might have solved the problem so far.
     
  5. Daffa

    Daffa

    Joined:
    Jan 30, 2013
    Messages:
    8,200
    Resources:
    30
    Packs:
    1
    Maps:
    9
    Spells:
    18
    Tutorials:
    2
    Resources:
    30
    Reminds me of my Game Design and Digital Circuit courses. An approach with Finite State Machine logic for Game AI.
     
  6. Tbh, I left hive for a while, and now that I'm reading my own material after years ...
    I'm learning a new game engine now to create my own games from scratch and this tutorial
    reminded me of how easy it can be to make an AI (since everything's new for me in the engine)

    Well finite is relative. I'm guessing you can also add a dynamic state that makes its own patterns
    but the logic has to be defined somewhere... or maybe you'd like a chaotic unpredictable system.

    Great reply thanks.
     
  7. Guillekon

    Guillekon

    Joined:
    Oct 16, 2019
    Messages:
    1
    Resources:
    0
    Resources:
    0
    someone helps me to find this detonator line in the mapeditor that I can't find for boolean



     
  8. Daffa

    Daffa

    Joined:
    Jan 30, 2013
    Messages:
    8,200
    Resources:
    30
    Packs:
    1
    Maps:
    9
    Spells:
    18
    Tutorials:
    2
    Resources:
    30
  9. GA3758-in-hiveworkshop

    GA3758-in-hiveworkshop

    Joined:
    Sep 16, 2016
    Messages:
    8
    Resources:
    0
    Resources:
    0
    thanks for tutorial mate, but I have a better idea to let the AI heroes learn different skills when they gained a level.

    1. Creating & storing variables data:
    - AIhero[arrayed] (unit)
    - SkillLearningChance[arrayed] (integer)

    2. Here's the trigger
    Events - A unit <gains a level>

    Conditions - <Leveling hero> is <a hero> equal to true /OR/ <Leveling hero> equal to <AIhero[Player number of <Owner of <Leveling hero>>]>

    Actions -
    IF,THEN,ELSE multiple actions
    ->IF Hero level of <Leveling hero> not equal to 6
    ->THEN Set SkillLearningChance[Player number of <Owner of <Leveling hero>>] = Random number between 1 and 3.
    ->IF,THEN,ELSE multiple actions
    ->->IF SkillLearningChance[Player number of <Owner of <Leveling hero>>] equal to 1
    ->->THEN Learn <Skill1> for <Leveling Hero>
    ->->ELSE Do Nothing
    ->->IF SkillLearningChance[Player number of <Owner of <Leveling hero>>] equal to 2
    ->->THEN Learn <Skill2> for <Leveling Hero>
    ->->ELSE Do Nothing
    ->->IF SkillLearningChance[Player number of <Owner of <Leveling hero>>] equal to 3
    ->->THEN Learn <Skill3> for <Leveling Hero>
    ->->ELSE Do Nothing
    ->ELSE IF,THEN,ELSE multiple actions
    ->->IF Hero level of <Leveling hero> equal to 6
    ->->THEN Learn <Skill4> for <Leveling Hero>
    ->->ELSE Do Nothing

    That's pretty much it :), but where's the buying items to AI trigger? :'(
     
    Last edited: Nov 19, 2019