Search Unity

[RELEASED] Emerald AI 2.3 - The Ultimate Universal AAA Quality AI Solution

Discussion in 'Assets and Asset Store' started by BHS, Jun 26, 2015.

  1. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    656
    Yes, it is working. However, when I block there is no damage, whatsoever, which is not realistic. (such as, I can block stag horns with a bare forearm.)


    Since I enabled Align Ai, there has been no tipping. This is Malbers' stag, and his animations deliver a mean attack with the horns, among others.
     
  2. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,075
    You are setting the Stopping Distance within the Emerald AI editor and not the NavMesh Component itself, correct? Everything is working on my end when I use a value of 0.3, which is the lowest allowed value, but this should allow the AI to stop right on its destination. Can you check if the values are being reset during runtime? That's the only thing I can think of at the moment.
     
  3. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,075
    Was the companion following you before this? The companion AI should resume following the player after all targets within their attack radius have been killed.
     
  4. unity_7UFP4-iCkwsgjg

    unity_7UFP4-iCkwsgjg

    Joined:
    Dec 13, 2017
    Posts:
    295
    my ai companion animations but after it attacks another ai and they outrun it my companion ai just stands there rather then go back to its destination anyone know how i can make it go back to its destination? also wont resume following the player if target escapes
     
  5. unity_7UFP4-iCkwsgjg

    unity_7UFP4-iCkwsgjg

    Joined:
    Dec 13, 2017
    Posts:
    295
    its following now bhs :)
     
  6. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,075
    There's an included system called EmeraldAINeedsSystem. It's a separate script you attach to your AI that overrides some of their behavior. There's also an example scene called "AI Gather (Food, Water, Resources, Etc) System Example". Make sure you are using the newest version of Emerald AI.
     
    jesseganey and treshold like this.
  7. A2GStudios

    A2GStudios

    Joined:
    Nov 21, 2016
    Posts:
    51
    I have been using the 2.0 version in my game for a while now, I want to update to the newest version. I just need to know what all I will have to fix or repair. The biggest concern is that I have it tied with the old version of Opsive 3rd person controller, and if I remember we had to add some code so the player could take and give damage to the emerald AI. So will it be hard to update to the newest version of Emerald, and what will I need to do? Thanks
     
  8. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,075
    Are your layers also set correctly? Also, ensure that the AI's AI Attacks Player is set to Always. This is located under the Tag Options.
     
  9. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,075
    My guess is that its line of sight is being obstructed. Make sure you have the correct Head Transform set as this is where the AI's line of sight is positioned from. To see what object may be obstructing the target's line of sight, enable all of the Debug Settings by going to the end of the Docs tab and setting Enable Debugging to Yes. This is will print the obstruction to the Unity Console.
     
  10. Neviah

    Neviah

    Joined:
    Dec 1, 2016
    Posts:
    224
    Looks like it sees it?



    This is when I lower the turret:

     
    Last edited: Nov 26, 2019
  11. SickaGamer

    SickaGamer

    Joined:
    Jan 15, 2018
    Posts:
    865
  12. unity_7UFP4-iCkwsgjg

    unity_7UFP4-iCkwsgjg

    Joined:
    Dec 13, 2017
    Posts:
    295
    anyway to make the ai walk after displaying the idle animation as my ai slide along when running from enemies?
     
  13. Neviah

    Neviah

    Joined:
    Dec 1, 2016
    Posts:
    224
    Looks like I'm working through it BHS. I changed the head transform to the projectile spawn points to make sure it wasn't getting blocked, and it started shooting. Now I'm changing the animations so that they the turret is facing in a downward angle and the animations won't interfere with the angle of shooting.
     
  14. rpg_gamer

    rpg_gamer

    Joined:
    Nov 28, 2012
    Posts:
    214
    is emerald compatible with a* pathfinding?
     
  15. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,720
    Nope. Although @BHS once said he would look into adding that at some point.
     
  16. unity_7UFP4-iCkwsgjg

    unity_7UFP4-iCkwsgjg

    Joined:
    Dec 13, 2017
    Posts:
    295
    Is their away to lower the fleeing distance?
     
  17. Low_on_Mana

    Low_on_Mana

    Joined:
    Jun 18, 2018
    Posts:
    28
    Thanks a ton! Runtime was messing us up.

    On an unrelated note, any idea why my AI sometimes get stuck trying to turn? I've noticed that they'll occasionally get stuck in a loop where they're constantly doing their turning animation. Sometimes they'll break out because there's an obstruction that got in the way, but they're not always so lucky.
     
  18. rpg_gamer

    rpg_gamer

    Joined:
    Nov 28, 2012
    Posts:
    214
    ah shame. I am trying to find a solution for AI for use with voxeland............ which is gonna need a* pathfinding for use on an "infinite" voxel terrain. navmesh just isn't a solution sadly.
     
  19. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,720
    @BHS I've found what could be considered a flaw in your Animator controller. Although it works as-is, it causes issues if someone wants to get a little creative with the AI. In the Idle States, all the Idle animations exit to the orange Base Layer state, which causes it to go back to the Base layer Entry, which then transitions right into Movement. This is fine for most scenarios, but in my case I've changed the default Base Layer state so that my AI will play an initial animation before transitioning to the Movement state. Unfortunately, this causes Idle States to exit and go back to that initial animation I've set up instead of back to the Movement state where it should be going. I've changed mine to transition idle states to Exit instead and that fixes the issue. If you make that the default controller behavior it shouldn't break anyone else, but would allow for this creative use of the controller.
     
  20. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,075
    Yes, it looks like it sees the target, but humanoid is the only supported rig type for the look at feature. I haven’t tested Emerald AI with turret-like AI, which is why you may be having undesired results. Are you using animations for the turning?
     
  21. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,075
    I had to add a couple of bug fixes to the 2.3.1 update so it should be submitted no later than the end of next week.
     
    SickaGamer likes this.
  22. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,075
    Flee distance as in how far an AI will flee? An AI will flee for as long as their attacker is within their detection range.
     
  23. Neviah

    Neviah

    Joined:
    Dec 1, 2016
    Posts:
    224

    You're fine bro, I figured it out. And yes, I am using animations.
     
  24. unity_7UFP4-iCkwsgjg

    unity_7UFP4-iCkwsgjg

    Joined:
    Dec 13, 2017
    Posts:
    295
    bhs i mean is their a way to lower it so my ai dosen't flee to far e.g it will flee to another companion ?
     
  25. keepthachange

    keepthachange

    Joined:
    Oct 15, 2014
    Posts:
    80
    After testing it seems to be top down engine
    messing with it. I started a clean project and it worked perfectly. I just have to figure out why top down engine is making this happen?
     
  26. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,075
    A fleeing AI will not flee to other AI. If you want to lower the fleeing distance, lower the AI's Detection Radius. It will flee for as long as a target is within its Detection Radius.
     
  27. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,075
    If you are using a different player controller, make sure you are setting your tags and layers correctly. The tag and layer of your player must be applied to the Emerald AI agents.
     
  28. unity_7UFP4-iCkwsgjg

    unity_7UFP4-iCkwsgjg

    Joined:
    Dec 13, 2017
    Posts:
    295
    bhs ah right so i can't have it so the detection radius is high but its flee range is low then?
     
  29. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,720
    @BHS I see a flaw in the UI system for health combat text. If you damage an AI more than once in quick succession, it simply resets the health combat text instead of having multiple health combat texts. Typically, in games where the health text is shown, you can have as many instances of the combat text UI as the AI is taking hits.
     
  30. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,075
    That is correct. I can look into adding an option to have an AI flee for a certain amount of distance with a future update though.
     
  31. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,075
    Yes, I’ve fixed this with the new combat text system coming with version 2.3.1. It will create as many combat texts as needed and not despawn the previous text.
     
    Tethys and magique like this.
  32. Tethys

    Tethys

    Joined:
    Jul 2, 2012
    Posts:
    665
    I finally jumped on board with both Unistorm and Emerald AI. Looking froward to using both in a project we're getting started on right now there are some really nice features in both. Will there be an updated video tutorial on the UCC/UFPS damage integration soon for Emerald AI? I wont be diving in for another week or so but I noticed the video tutorial seemed to be for the old depreciated ufps and not the newer set of Opsive controllers. Happy Holidays and thanks for putting your assets on sale.
     
  33. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,720
    You can find integration instructions in the Opsive Forums. But here is the document for your convenience.
     

    Attached Files:

    Tethys, julianr and SickaGamer like this.
  34. Alex3333

    Alex3333

    Joined:
    Dec 29, 2014
    Posts:
    342
    Do you have a decision so that the creatures do not damage the player’s corpse ?.
     
  35. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    3,720
    The instructions contain some script modifications to prevent the AI from attacking a dead player, yes.
     
    Alex3333 likes this.
  36. unity_7UFP4-iCkwsgjg

    unity_7UFP4-iCkwsgjg

    Joined:
    Dec 13, 2017
    Posts:
    295
    bhs that would be great :)
     
  37. Tethys

    Tethys

    Joined:
    Jul 2, 2012
    Posts:
    665
    Hey there, thanks for the share this will save me some time!
     
  38. SickaGamer

    SickaGamer

    Joined:
    Jan 15, 2018
    Posts:
    865
    @BHS The update coming this weekend?
     
  39. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,075
    The recent sales have been keeping me really busy with customer support so was a little off on my timing with submitting it this weekend. It will be submitted no later than Tuesday as it's just about done.
     
  40. unity_7UFP4-iCkwsgjg

    unity_7UFP4-iCkwsgjg

    Joined:
    Dec 13, 2017
    Posts:
    295
    how can i stop the ai attacking my players body once it is dead ?
     
  41. Darrkbeast

    Darrkbeast

    Joined:
    Mar 26, 2013
    Posts:
    107
    I think it depends on your controller, but I call "emeraldAISystem.ClearTarget();" when i die to stop them from
    attacking
     
  42. studentvz

    studentvz

    Joined:
    Dec 14, 2014
    Posts:
    53
    How hard is it to set up a weapon (pistol or rifle) with Emerald AI and custom character? I don't have enough experience with animations, my character needs to have arms holding a weapon and aiming when shooting.
     
  43. unity_7UFP4-iCkwsgjg

    unity_7UFP4-iCkwsgjg

    Joined:
    Dec 13, 2017
    Posts:
    295
    will that reset and allow ai to kill new re-spawned player? darrkbeast
     
  44. Darrkbeast

    Darrkbeast

    Joined:
    Mar 26, 2013
    Posts:
    107
    Yeah, I use invetor controller, when I die and reset the Ai, and respawn it goes after me. Now you need to make sure of a few things, like if you die and your body stays there and you respawn that would cause issues unless you change corpse tag or remove some components. Its all in how you want to handle it really. In my cause my corpse stays there for a few seconds so I remove colidiers.
     
  45. Darrkbeast

    Darrkbeast

    Joined:
    Mar 26, 2013
    Posts:
    107
    Its easy but you will need some animations, at least a aiming one. Then you just parent the weapon to the ai's hand, might need to adjust while its in game, then add animation event to hurt player. Theres a tutorial video the developer made goes through it all. Grab some free animations on asset store. Also you can make the ai holster the weapon too if you want. The documents talk about that.
     
  46. studentvz

    studentvz

    Joined:
    Dec 14, 2014
    Posts:
    53
    Great, thank you.
     
  47. unity_7UFP4-iCkwsgjg

    unity_7UFP4-iCkwsgjg

    Joined:
    Dec 13, 2017
    Posts:
    295
    ah right okay tried cleartarget but to no success, want the ai to kill then carry on wandering, have made my players tag and layer change once it has died but need the collider for eating/triggering to eat
     
  48. Neviah

    Neviah

    Joined:
    Dec 1, 2016
    Posts:
    224
    I'm running into an odd bug that only just appeared recently, but was working fine before. The AI will walk/slide super slowly to his target to attack. If he attacks me, or the turret, he just casually gliiiiiiiiiiiiiides across the floor. Check out the video.



    Any help in the right direction would be appreciated.

    Things I've tried that do not help:
    • Debug info
    • Increase walk/run speed to max
    • Change navigation between nav mesh and root motion


    Edit****

    This is what it looks like when it decides to work:
     
    Last edited: Dec 9, 2019
  49. Darrkbeast

    Darrkbeast

    Joined:
    Mar 26, 2013
    Posts:
    107
    Hi, did the ai stop attacking, but not move back. If so I think you can then tell it wander. I am not 100% sure as I want my AI to stop attacking and thats it, at least currently. When I get home I will see about making my ai go back to wandering so see if I can help you.
     
  50. Darrkbeast

    Darrkbeast

    Joined:
    Mar 26, 2013
    Posts:
    107
    Hi, your game looks pretty cool as for your issue, have you messed around with the colliders any? I had similar issues and that helped. Wish I could be more help, hope you get it solved.
     
    Neviah likes this.