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
    @MagiSoftworks when i click your image i get this
    "You do not have permission to view this page or perform this action."
     
  2. MagiSoftworks

    MagiSoftworks

    Joined:
    Feb 12, 2019
    Posts:
    124
    Strange- Wanted to see what everyone is using for the process of exporting perfect EAI Generated Controllers from one project to another. I'm thinking how much time it would save to start a collection of perfect controllers for game scenarios per AI- Animals, etc. I exported a good one out, Imported in to new project but it doesn't populate the Animator Controller [Attached] with new imported controller. Thanks again
     

    Attached Files:

  3. MagiSoftworks

    MagiSoftworks

    Joined:
    Feb 12, 2019
    Posts:
    124
    Hi Wood333- Did you by any chance change your AI "Rig" from Generic to "Humanoid" ?
     
  4. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    They should stop right when the player gets within the follower stopping distance. What character controller are you using? Are you using the right movement type for your animations?
     
  5. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    The tags and layers are needed in order for your player to be properly detected. Ensure that your player's layer and tag are included within the AI's Tag Settings.
     
  6. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Thanks for the suggestion. I can certainly look into adding this.
     
  7. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Thanks for the suggestions. I'll see if I can add these improvements in with the 2.3.1 update.
     
  8. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Are you following the integration tutorial below? This should work with the newest version of Emerald AI.


    The damage function parameters are:
    Code (CSharp):
    1. Damage (int DamageAmount, TargetType AttackersTargetType, Transform YourTargetsTransform, int RagdollForce)
     
  9. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Strange, I have never seen that before.

    Do you have Align AI enabled? Are you using the most recent version of Emerald AI? Are you missing any animations? Are you receiving any errors in the Unity Console?
     
  10. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Great suggestion, I'll add it in.
     
    magique likes this.
  11. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,268
  12. MagiSoftworks

    MagiSoftworks

    Joined:
    Feb 12, 2019
    Posts:
    124
    Hi BHS - Question on Exporting/Importing EAI controllers. I exported an EAI created controller, Copied to another Project then imported into that project which was successful but it does't drop in the active working Animator controller ? (Pic Below). I know I'm missing something. Your Wisdom is always appreciated. :) Thanks!
     

    Attached Files:

  13. xoodZ

    xoodZ

    Joined:
    Jan 8, 2018
    Posts:
    17
    Hello!
    I am considering your asset to buy.
    I have already developed a player spell system in my project.
    Please tell me how you can implement the following ideas in emerald (preferably using api):
    1. Slow down the speed of all enemy animations (for example, cooling). In the documentation I found only a traffic stop. I need to slow down all animations by a certain percentage. The speed in the animation controller will allow me to lower the speed of attack and rest, but I do not use root movement.
    2. (not actually, already found an answer on the forum) I need to receive incoming damage from the enemy and enemy abilities in my player script.
    3. Switching to the ragdoll during physical impact (for example, throwing the enemy), but the enemy remains alive. For example we replace AI with a rigidbody with a ragdoll, it flies like a physical object, after landing (or after time, or after stop moving) we change it again to an emerald, play animation of rising from the ground and again control NPC by animations and move through the emerald.

    If you say that it is possible to implement these ideas through the addition of your code, this is normal. I am confident in С#, but I need to know that such code improvements are allowed.
     
    Last edited: Nov 16, 2019
  14. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    As I said, that tutorial worked with the prior version of Emerald, but not with the latest. The EmeraldAiPlayerDamage scrip has changed. To get it working, I had to ignore part of the tutorial.
     
  15. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    I am out of town, and will check this next week. This may result from the stag walking over something.
     
  16. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    Thanks Mag, I am out of town, but will check this next week.
     
  17. Neviah

    Neviah

    Joined:
    Dec 1, 2016
    Posts:
    235
    I'm having a small error: The error says I don't have a Death Animation 1. I have put in 3 in the correct spot (I think), but the first one is never used. I have tried putting in different animations in that first slot many times, but I still get this error. Is there something I'm missing? Is there a melee death animation spot I'm not seeing?




    Also, attached another error I'm getting. This happens whenever an EAI agent attacks with a ranged weapon. I'm also using Game Kit Controller
     

    Attached Files:

    Last edited: Nov 18, 2019
  18. Deckard_89

    Deckard_89

    Joined:
    Feb 4, 2016
    Posts:
    315
    You could use PuppetMaster for the "living ragdoll" thing. I have it on my player character but not sure how to go about getting it to work on my Emerald AI. I think @BHS mentioned he was planning on a tutorial, so I'd probably expect it for the future update that includes the damage via individual ragdoll colliders, rather than the box collider it uses right now.
     
    xoodZ and SickaGames1 like this.
  19. Low_on_Mana

    Low_on_Mana

    Joined:
    Jun 18, 2018
    Posts:
    37
    Hello, I have an issue concerning combat with non-AI entities. Using the AI events, I have set the target of my AI to a non-AI object. They will approach it, as if they are going to attack it, but they never actually attack. Is there any way to get them to attack a non-AI object that they are targeting?
     
  20. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    Rig is Generic
     
  21. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    It should be submitted by the end of the week.
     
  22. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    There are two options when importing an Animation Profile; option 1 to import the animations with the exported Animator Controller and option 2 to import the animations using the existing Animator Controller on the AI. If either Animator Controller is missing, which it looks like the AI's is missing in the screenshot as the Controller slot within the Animator is empty, then this would be what's causing your issue.

    Clear and then recreate the Animator Controller on your AI and then importing the animations from the Animation Profile should work, given that the animation references weren't lost. You can check this by selecting the Animation Profile within the Project tab.
     
  23. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Hey there!

    1) The movement animation speeds can be adjusted using the global Speed parameter within the Animator Controller, but it is also controlled through Emerald AI. So, you would need to add in your own float variable to the speed control to slow the speed. However, I've haven't tested this so I'm not sure how it would affect mechanics like Root Motion. The other animations, such as the attack animations, will need to have speed parameters added to the Animator Controller. I have plans to look into slowing mechanics using the Ability Objects with a future update.
    3) I would recommend using the PuppetMaster asset as it allows you to do this.
     
    xoodZ likes this.
  24. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Which part did you have to ignore?
     
  25. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    It looks like you are missing death animations from the melee weapon type and not the ranged death animations. Is your AI set to both ranged and melee or just ranged?
     
  26. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Non-AI targets are intended to not be Emerald AI objects. The non-AI's tag and layer needs to also be added to the AI so it can be properly detected, if you haven't already done so. Which AI event are you using to do this?
     
  27. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    endEmeraldDamage
    The large code section from your video tutorial,void DamageInvectorPlayer (int DamageAmount, Transform target), (which I cut and pasted in for the last Emerald version). I ignored that. Instead, I found new code in the EmeraldAiPlayerDamage script, eight (8) lines of void DamageInvector Player (int DamageAmount, Transform target) method, which I un-commented. Again, I needed to add the single line "DamageInvectorPlayer (DamageAmount, Target)" within the SendPlayerDamage method at the top of the script.

    I may be using the wrong DamageInvectorPlayer method, but my Player began taking damage.
     
  28. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    I have enabled Align Ai, and will test that. I have most recent Emerald version, no missing animations, and no errors. I believe the stag gets flipped walking over a plank shaped cube in the scene, that is on the ground. I have never witnessed the flip.
     
  29. Low_on_Mana

    Low_on_Mana

    Joined:
    Jun 18, 2018
    Posts:
    37
    I had already set the non-ai tag and got them to target it, they just wouldn't attack it. This turned out to be a behavior issue on my end (as I am using your events to give my objects a natural interaction behavior and one of those interactions was stepping in when I was trying to attack).

    Thank you again for the quick response! Your asset has been integral to our development process and I can't wait to show you what we've been doing with it.
     
  30. unity_7UFP4-iCkwsgjg

    unity_7UFP4-iCkwsgjg

    Joined:
    Dec 13, 2017
    Posts:
    323
    is there a way to add more then one destination so that the ai goes to the closest destination?
     
  31. AaronVictoria

    AaronVictoria

    Joined:
    Aug 21, 2010
    Posts:
    176
    Thanks buddy. Also, if possible see if you can squeeze the turn to face method in. We talked about it a while ago, but you may have forgot to document it. It would essentially allow the AI to stop movement and turn to face whoever or whatever has interacted with them. I hacked in a quick iteration for my project, and even added an event once the degree of rotation and head look angle are fulfilled. I use the event to trigger dialogue once the NPC is actually looking the player.

    Looking forward to your next release.
     
  32. Neviah

    Neviah

    Joined:
    Dec 1, 2016
    Posts:
    235
    Just Ranged only, see attachment.


    ***Edit
    I've fixed the problem by setting it to Both (ranged and melee), inputting an animation in the melee deaths, then setting it back to ranged only. This got rid of that error, but the other errors still remain, regarding the 'missing components' part.
     

    Attached Files:

    Last edited: Nov 22, 2019
  33. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    Is there a way to restrict AI to just water. eg. shark hovering on water... and not go on land with a terrain underneath for Navmesh?
     
    Last edited: Nov 23, 2019
  34. Low_on_Mana

    Low_on_Mana

    Joined:
    Jun 18, 2018
    Posts:
    37
    Hi! I'm sorry but I've tried applying your change to stopping distance to allow an AI to move entirely onto a set destination, but it still doesn't seem to do so. It's stopping about 5m out and we've set it to 0.25f as advised. Any ideas as to why it might be behaving this way? It's putting a frustrating wrench into some of the stuff we're doing. Thanks!
     
  35. unity_7UFP4-iCkwsgjg

    unity_7UFP4-iCkwsgjg

    Joined:
    Dec 13, 2017
    Posts:
    323
    my ai when set to companion wont resume following after it has just attacked another ai any ideas ?
     
  36. treshold

    treshold

    Joined:
    Nov 9, 2013
    Posts:
    225
    I can't find any documentation or demo's about this feature. Tried to explore Emerald AI component but couldnt find where do I define these?
     
  37. Neviah

    Neviah

    Joined:
    Dec 1, 2016
    Posts:
    235
    Can EmeralAI make turret weapons? I don't have animations for my turrets, just want them to rotate left/right, and shoot. Any info?
     
  38. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    If I remember correctly, the full code is needed to properly send damage to the player, but it sounds like you have it working now, correct?

    The align system has angle caps to prevent an AI from over aligning. I'm not why it would align to an angle higher than the caps, but you can use the align layer mask to prevent the AI from aligning to certain objects, such as the plank shaped cube.
     
  39. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    No, currently there is only one destination the AI will travel to when using the Destination Wander Type. However, you can create a script to modify an AI's destination. You could use the Waypoints Wander Type and check the for the next nearest waypoint from the AI's current waypoint.
     
  40. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    I do remember and it's a great feature, but I unfortunately ran short on time to add this feature in with the 2.3.1 update. I will make sure it's at the top of the list for the next update though.
     
    AaronVictoria likes this.
  41. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Thanks for the workaround. I'll get this fixed added to the 2.3.1 update.
     
    SickaGames1 likes this.
  42. unity_7UFP4-iCkwsgjg

    unity_7UFP4-iCkwsgjg

    Joined:
    Dec 13, 2017
    Posts:
    323
    ah okies does emerald allow a guard object option?
     
  43. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Not currently, but I do plan on adding an option to randomize the Base Offset for water based AI. For restricting movement to water, you may be able to use the NavMesh Areas and Costs, but it can be tricky with terrains: https://docs.unity3d.com/Manual/nav-AreasAndCosts.html You can also use waypoints.
     
    julianr likes this.
  44. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,268
    When are you going to add the ability for AI to sit ?
     
  45. keepthachange

    keepthachange

    Joined:
    Oct 15, 2014
    Posts:
    87
    Hey sorry to bug you but. My ai will not detect player inless i walk right up to it?
    I used the ones out of thoe box same thing?
    I have tags correct, distance is set to 20.
    Both trigger and fov do the same thing. Everything else works just detecting player beyond arms reach for ai is not?
    Could someone possibly point me in the right direction.
     
  46. Neviah

    Neviah

    Joined:
    Dec 1, 2016
    Posts:
    235
    I made a ceiling turret that won't fire at other emerald ai agents unless i lower it down to about eye level. how can i fix this?
     
  47. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    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.
     
  48. BHS

    BHS

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

    BHS

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

    unity_7UFP4-iCkwsgjg

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