Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[RELEASED] Emerald AI 3.2 (New Sound Detection) - The Ultimate Universal AAA Quality AI Solution

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

  1. unity_7UFP4-iCkwsgjg

    unity_7UFP4-iCkwsgjg

    Joined:
    Dec 13, 2017
    Posts:
    323
    its following now bhs :)
     
  2. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    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.
  3. A2GStudios

    A2GStudios

    Joined:
    Nov 21, 2016
    Posts:
    52
    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
     
  4. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    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.
     
  5. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    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.
     
  6. Neviah

    Neviah

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



    This is when I lower the turret:

     
    Last edited: Nov 26, 2019
  7. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,268
  8. unity_7UFP4-iCkwsgjg

    unity_7UFP4-iCkwsgjg

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

    Neviah

    Joined:
    Dec 1, 2016
    Posts:
    235
    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.
     
  10. rpg_gamer

    rpg_gamer

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

    magique

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

    unity_7UFP4-iCkwsgjg

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

    Low_on_Mana

    Joined:
    Jun 18, 2018
    Posts:
    37
    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.
     
  14. 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.
     
  15. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    @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.
     
  16. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    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?
     
  17. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    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.
     
    SickaGames1 likes this.
  18. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    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.
     
  19. Neviah

    Neviah

    Joined:
    Dec 1, 2016
    Posts:
    235

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

    unity_7UFP4-iCkwsgjg

    Joined:
    Dec 13, 2017
    Posts:
    323
    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 ?
     
  21. keepthachange

    keepthachange

    Joined:
    Oct 15, 2014
    Posts:
    87
    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?
     
  22. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    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.
     
  23. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    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.
     
  24. unity_7UFP4-iCkwsgjg

    unity_7UFP4-iCkwsgjg

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

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    @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.
     
  26. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    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.
     
  27. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    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.
  28. Tethys

    Tethys

    Joined:
    Jul 2, 2012
    Posts:
    672
    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.
     
  29. magique

    magique

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

    Attached Files:

    Tethys, julianr and SickaGames1 like this.
  30. Alex3333

    Alex3333

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

    magique

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

    unity_7UFP4-iCkwsgjg

    Joined:
    Dec 13, 2017
    Posts:
    323
    bhs that would be great :)
     
  33. Tethys

    Tethys

    Joined:
    Jul 2, 2012
    Posts:
    672
    Hey there, thanks for the share this will save me some time!
     
  34. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,268
    @BHS The update coming this weekend?
     
  35. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    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.
     
  36. unity_7UFP4-iCkwsgjg

    unity_7UFP4-iCkwsgjg

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

    Darrkbeast

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

    studentvz

    Joined:
    Dec 14, 2014
    Posts:
    149
    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.
     
  39. unity_7UFP4-iCkwsgjg

    unity_7UFP4-iCkwsgjg

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

    Darrkbeast

    Joined:
    Mar 26, 2013
    Posts:
    125
    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.
     
  41. Darrkbeast

    Darrkbeast

    Joined:
    Mar 26, 2013
    Posts:
    125
    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.
     
  42. studentvz

    studentvz

    Joined:
    Dec 14, 2014
    Posts:
    149
    Great, thank you.
     
  43. unity_7UFP4-iCkwsgjg

    unity_7UFP4-iCkwsgjg

    Joined:
    Dec 13, 2017
    Posts:
    323
    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
     
  44. Neviah

    Neviah

    Joined:
    Dec 1, 2016
    Posts:
    235
    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
  45. Darrkbeast

    Darrkbeast

    Joined:
    Mar 26, 2013
    Posts:
    125
    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.
     
  46. Darrkbeast

    Darrkbeast

    Joined:
    Mar 26, 2013
    Posts:
    125
    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.
  47. unity_7UFP4-iCkwsgjg

    unity_7UFP4-iCkwsgjg

    Joined:
    Dec 13, 2017
    Posts:
    323
    darrkbeast fixed that issue but i noticed if my ai is set to never attack player it wont do its death animation it just stands and twiches but its health bar is set to zero, if i set it to always attack player then it does everything correctly
     
  48. Darrkbeast

    Darrkbeast

    Joined:
    Mar 26, 2013
    Posts:
    125
    Thats weird, so are you making a passive AI? Its possible its a bug, I have not encountered that one. That may be a question for the creator.
     
  49. MagiSoftworks

    MagiSoftworks

    Joined:
    Feb 12, 2019
    Posts:
    124
    Hi Team - Does anyone have an issue with EAI causing damage to Invector Character? :) It's hit or miss for me. 2.2 works like a charm. Layer Correct, Script edits. Maybe I'm missing something. Wood333 think you are using Invector? thoughts?
     
  50. unity_7UFP4-iCkwsgjg

    unity_7UFP4-iCkwsgjg

    Joined:
    Dec 13, 2017
    Posts:
    323
    darrkbeast nope have it set on aggressive for so it attacks over ai and leaves the player alone