Search Unity

  1. Unity 2018.3 is now released.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Want more efficiency in your development work? Sign up to receive weekly tech and creative know-how from Unity experts.
    Dismiss Notice
  4. Build games and experiences that can load instantly and without install. Explore the Project Tiny Preview today!
    Dismiss Notice
  5. Nominations have been announced for this years Unity Awards. Celebrate the wonderful projects made by your peers this year and get voting! Vote here!
    Dismiss Notice
  6. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  7. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

[50% OFF!] Emerald AI 2.0 - AAA Quality AI with Built-in UI, Ranged Combat, Waypoints, and more!

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

  1. llJIMBOBll

    llJIMBOBll

    Joined:
    Aug 23, 2014
    Posts:
    498
    Hi NP :D I'm not 100% sure but I think Emerald uses it to detect Targets. I've been using this setup for a while and haven't seen any strange behaviours as of yet. Just a suggestion of what worked for me :D You could probably even set it as your Ai's hips/root bone of the ragdoll, not testing this but don't see why not.
     
    jeromeWork likes this.
  2. jeromeWork

    jeromeWork

    Joined:
    Sep 1, 2015
    Posts:
    215
    @BHS Spoke too soon, spike suddenly reappeared, even with the custom UI.
    I've not turned on any of the text options so not sure why Font.CacheFontForText is being a problem


    I've removed all other canvases in the scene, the only thing that makes it go away is disabling the EmeraldAI health bar.

    Any ideas?

    edit: happens only on the AI's death (I assume as the UI bar is being faded out)
     
  3. cheesee09

    cheesee09

    Joined:
    Mar 30, 2018
    Posts:
    35
    @BHS how can emerald ai damage my Invector player when it is blocking? Emerald ai does not pass damage or even reduce my stamina
     
  4. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    782
    I understand I just thought I would check if you had a solution. I will contact the the modeller. Thanks.

    If you have a preveiw of 2.2 i'd love to take a look my game is releasing this week, if not no problems i will just have to patch in when ready.
     
  5. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    782
    Hi @BHS

    Im trying to setup the non AI for my other creatures and have successfully got them damaging emerald AI but cant seem to get the reverse. Should be quite simple, using a variation on the method I use to attack my player that has iceplayer component. My other animals have ICE on them but emerald is not attacking them. Does emarald not attempt to attack non AI tagged objects?

    public void DamageICE()
    {
    //Should find ICE component and inflict damage.

    if (CurrentTarget != null && CurrentTarget.GetComponent<ICECreatureControl>() != null)
    {
    CurrentTarget.GetComponent<ICECreatureControl>().ApplyDamage((float)CurrentDamageAmount);
    }
    }


    this is called from :- EmeraldAI()

    else if (TargetTypeRef == TargetType.NonAITarget)
    {
    Debug.Log("Ice could damage");
    //Custom code can be added here.
    if (TargetInView)
    {
    Debug.Log("ICE DAMAGE");
    DamageICE();
    }
    }
     
    Last edited: Nov 6, 2018
  6. SickaGamer

    SickaGamer

    Joined:
    Jan 15, 2018
    Posts:
    276
    Scroll back a few pages.
     
  7. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    782
    What for?
     
  8. SickaGamer

    SickaGamer

    Joined:
    Jan 15, 2018
    Posts:
    276
    Preview of 2.2
     
    AndyNeoman likes this.
  9. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    3,335
    Cool, thanks for sharing!


    The Box Collider is intended to be fit to your AI. I have it automatically detect the bounds of your AI's model, but sometimes it doesn't work correctly so you may need to adjust it. I used a box collider because I feel like it offers the most flexibility when fitting it to an AI's model shape. A collider is needed in order for AI to detect each other as well as collisions for damage.


    Hey there,

    I received your email, I'm respond here.

    This spike is a known issue with Unity. Google Font.CacheFontForText, there are many Unity users who have had this issue. It isn't just related to Emerald AI. I am very aware of how Emerald AI performs and I always use the profiler testing each portion of the system to ensure there are no spikes like this.

    Perhaps it's only related to the version of Unity you are using. I just tested the current version of Emerald AI with health bars, combat text, AI name, and AI level enabled with no performance spike like that when the AI dies. This was done with Unity 2017.1.

    Is there any other information you can provide that might allow me to properly recreate the issue you're having? When I get the chance, I will test this on the exact version of Unity you are using to see if it's a version of Unity related issue.
     
  10. SickaGamer

    SickaGamer

    Joined:
    Jan 15, 2018
    Posts:
    276
    @BHS What are the odds that you create us some custom health bars for NPCs :)
     
  11. evan_mundy

    evan_mundy

    Joined:
    Nov 4, 2017
    Posts:
    2
    Is there a tutorial on damaging ai characters if i am using my own controller?

    Forget it.

    Figured it out using ufps integration.
     
    Last edited: Nov 9, 2018
  12. unicat

    unicat

    Joined:
    Apr 8, 2012
    Posts:
    318
    Spider (ranged) from the demo scenes doesn`t work in my indoor scene. I see the spider shooting, but the bullet never reaches the enemy. If i create a terrain in the same scene (a little outside from the indoor scene) and put the spider, his enemy and the player on this terrain it works fine. What could be wrong ? Thanks.
     
  13. SickaGamer

    SickaGamer

    Joined:
    Jan 15, 2018
    Posts:
    276
    Any chance 2.2 comes out this month?
     
  14. RealAspireGames

    RealAspireGames

    Joined:
    Dec 24, 2013
    Posts:
    262
    Can we expect a raycast ranged weapon type anytime soon in a future update? I think this would be an awesome idea for A.I with guns as weapons.
     
  15. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    3,335
    I'm not much of an artist so not likely :)


    That sounds like the obstruction detection feature. This is used so an AI only fires a projectile if their target isn't obstructed. Lowering your attack distance should help.


    That's the plan.


    Yes, I'm planning on adding this with the 2.3 update.
     
    SickaGamer likes this.
  16. cheesee09

    cheesee09

    Joined:
    Mar 30, 2018
    Posts:
    35
    invector tpc doesn't receive damage when blocking emerald ai attacks
     
  17. cheesee09

    cheesee09

    Joined:
    Mar 30, 2018
    Posts:
    35
    My invector tpc doesn't receive damage when I blocking emerald ai attacks even if i use a higher amount of damage.
     
  18. cheesee09

    cheesee09

    Joined:
    Mar 30, 2018
    Posts:
    35
    My invector tpc player doesn't receive damage when blocking emerald ai attacks even when I set the ai's damage higher
     
  19. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    3,335
    The Invector integration doesn't cover blocking. I will be adding this to the tutorial after the release of version 2.2.
     
  20. cheesee09

    cheesee09

    Joined:
    Mar 30, 2018
    Posts:
    35
    When will you release version 2.2?
     
  21. RonnyDance

    RonnyDance

    Joined:
    Aug 17, 2015
    Posts:
    502
    3 post above he said that he is trying to release it this month...
     
  22. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    782
    Hi @BHS , Any advice for making the AI speed up actions and choices. My animals seem to stand facing each other for long periods even though i have max attack speed set to .01. It also appear that the gethit animations never play on my AI even though they are setup and i can see dameage is happening. Is this a known bug?
     
  23. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    3,335
    You can make your AI attack quicker by setting your Minimum and Maximum Chase Time to 0. The way attacks and attack speed are handled is different with version 2.2. With version 2.2, AI will immediately play their attack when approaching their target. They will also be able to attack a lot quicker. As for the get hit animation, I'm not sure why it wouldn't be playing. Is your AI properly receiving damage from hits?
     
    AndyNeoman likes this.
  24. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    782
    Yes, they are losing hitpoints and play the die animation correctly when they should. I look forward to the new version. it's really nice, easy to use asset overall.
     
  25. tgamorris76

    tgamorris76

    Joined:
    Apr 24, 2013
    Posts:
    231
    Hi, I'm new. Working on a VR project(own code) and using Emerald AI for enemy NPC's. Just curious as to how to get the emerald AI NPC's to hit and damage my Player. Was hoping there was a health scriopt and and apply damage script i could use for my player and projectiles respectively and the integration tutorials seem to cover raycast shooting which im not using. Please help.
     
  26. Mojo-Game-Studio

    Mojo-Game-Studio

    Joined:
    Sep 18, 2015
    Posts:
    26
    This is the same for me BTW. kinda waiting on 2.2 update so didn't think it worth mentioning
     
    AndyNeoman likes this.
  27. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    966
    @BHS , how goes it? How goes the v2.2 update?

    Are you waiting on a release from Unity as well?
     
  28. lawsochi

    lawsochi

    Joined:
    Oct 24, 2016
    Posts:
    105
    Hi, I have one question from non-professional to professional :)
    I know that now the Unity team has achieved great success with their new technologies ECS / Jobs / Burst, ets. We all see what huge advantages it gives in terms of performance on the example of Vegetation Studios Pro. On individual tests, the advantage is up to 20x. Question.
    Do you think it will be useful to use these technologies for the AI, and are you considering the possibility of using them, and if so how much time it may take and how much work will be required.
    Thank.
     
    manarito, Mark_01 and Duffer123 like this.
  29. cheesee09

    cheesee09

    Joined:
    Mar 30, 2018
    Posts:
    35
    Hello @BHS can you explain how your fleeing, fighting and detection algorithm works? I just need it for my thesis paper chapter 3 in fundamental algorithms
     
  30. PlainStudios

    PlainStudios

    Joined:
    Sep 9, 2013
    Posts:
    18
    I'm having a problem with the ranged AI attacks . They don't seem to do any damage ... Not sure if I need to set something up before adding the projectile ?
     
  31. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    3,335
    An external script for player damage is coming with the 2.2 update. All users will have to do is add a custom function and Emerald AI will call it. For now, you need a reference to your AI object and use the following:

    Code (CSharp):
    1. if (YourVRHitObject.GetComponent<Emerald_AI>() != null)
    2. {
    3.    YourVRHitObject.GetComponent<Emerald_AI>().Damage(Emerald_AI.TargetType.Player, (int)DamageAmount);
    4. }

    The 2.2 update is going well. It ended up being a lot of work and a lot of stuff needed to be written to accommodate Root Motion support as well as the code clean up and code reorganizing. I'm still shooting for the end of the month, but given the holidays and unforeseen factors, it may be delayed just a little bit. The 2.2 update is probably equivalent to the initial 2.0 release as far as improvements and additions go. I am not waiting for Unity. I'm just trying to get everything finished.


    Yes, I certainly will look into utilizing the Unity's new ECS. Once the 2.3 update is released, I will can look into what will be needed and changed to do so. :)


    Yes, I'll send you a PM explaining everything.


    When creating a projectile object within the Emerald AI editor, you need to make sure you press the Update Projectile button. This will initially add all needed components and apply/update the projectile's settings.
     
  32. attaway

    attaway

    Joined:
    Nov 12, 2014
    Posts:
    14
    Does Emerald AI work with Final IK (from ROOTMOTION)?
     
    FullMe7alJacke7 likes this.
  33. GamePyro

    GamePyro

    Joined:
    Jul 28, 2018
    Posts:
    154

    I have same problem any fix ?
     
  34. jean-chretien

    jean-chretien

    Joined:
    Nov 7, 2017
    Posts:
    2
    Hello,

    I am just starting with Emerald AI and I got this error message.
    "CalculatePolygonPath" can only be called on an active agent that has been placed on a NavMesh.

    The walk animation will be displayed but the prefab will not move. Terrain has been created with Gaia and prefab supposed to be wandering around.

    Thanks
     
  35. cheesee09

    cheesee09

    Joined:
    Mar 30, 2018
    Posts:
    35
    You must bake the navmesh first. To do that mark your terrain or plane as static then go to window-navigation -area then click bake
     
  36. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    531
    @BHS Does Emerald AI include the ability to call external methods? I'd like your asset to work with the Asset "Game Creator" I see you already have a tut to make Emerald work with Game kit controller so I'm wondering if there is any major changes that would have to be done to make it work.. thanks.
     
    Duffer123 likes this.
  37. jean-chretien

    jean-chretien

    Joined:
    Nov 7, 2017
    Posts:
    2
    Thanks ! It worked perfectly !
     
  38. SickaGamer

    SickaGamer

    Joined:
    Jan 15, 2018
    Posts:
    276
    @BHS will 2.3 take as long as 2.2?
     
  39. attaway

    attaway

    Joined:
    Nov 12, 2014
    Posts:
    14
    I'm having the same problem on Mojave 10.14.1.
    The UI isn't scaling correctly in the inspector window.
    Here are screenshots.

    Screen Shot 2018-11-22 at 8.31.24 AM.png Screen Shot 2018-11-22 at 8.32.38 AM.png
     
  40. PlainStudios

    PlainStudios

    Joined:
    Sep 9, 2013
    Posts:
    18
    I'm looking for a way to add a spawn animation but I haven't been able to find a way to bypass the idle animation at start . Is there any way I can do this ?
     
  41. FullMe7alJacke7

    FullMe7alJacke7

    Joined:
    Dec 17, 2013
    Posts:
    26
    I'm also curious on the spawn animation question and the final IK question

    I'm making a VR RPG & RTS game and I would love to use both final IK and emerald AI for my army controller & animation system
     
  42. tgamorris76

    tgamorris76

    Joined:
    Apr 24, 2013
    Posts:
    231
    Hi @BHS thanks for the script, will give it a shot later and let you know how it worked out.
     
  43. llJIMBOBll

    llJIMBOBll

    Joined:
    Aug 23, 2014
    Posts:
    498
    You have to assign the event in awake, so on emeralds start there will be a event to add.

    Code (CSharp):
    1. protected Emerald_AI m_EmeraldAI = null;
    2.     public Emerald_AI EmeraldAI {
    3.         get {
    4.             if (m_EmeraldAI == null)
    5.                 m_EmeraldAI = gameObject.GetComponent<Emerald_AI> ();
    6.             return m_EmeraldAI;
    7.         }
    8.     }
    9. [Header ("Spawning")]
    10.     public bool UseSpawnEffect = false;
    11.     [Space (5f)]
    12.     public int SpawnEmoteID = -1;
    13.     public AudioClip SpawnSoundFX;
    14.     public GameObject SpawnEffectObject;
    15.  
    16.  
    17. public void Awake ()
    18.     {
    19.         SpawnFX ();
    20.     }
    21.  
    22. /// <summary>
    23.     /// Spawns the FX.
    24.     /// </summary>
    25.     public void SpawnFX ()
    26.     {
    27.         if (!UseSpawnEffect)
    28.             return;
    29.  
    30.         // PLAY ANIMATION
    31.         if (SpawnEmoteID != -1)
    32.             EmeraldAI.OnStartEvent.AddListener (EmoteSpawnFX);
    33.         // PLAY SOUNDS FX
    34.         if (SpawnSoundFX != null)
    35.             EmeraldAI.OnStartEvent.AddListener (SFXSpawnFX);
    36.         // CREATE SPAWN FX
    37.         if (SpawnEffectObject != null)
    38.             EmeraldAI.OnStartEvent.AddListener (EffectSpawnFX);      
    39.     }
    40.     public void EmoteSpawnFX ()
    41.     {
    42.         EmeraldAI.PlayEmoteAnimation (SpawnEmoteID);
    43.     }
    44.     public void SFXSpawnFX ()
    45.     {
    46.         EmeraldAI.PlaySound (SpawnSoundFX);
    47.     }
    48.     public void EffectSpawnFX ()
    49.     {
    50.         EmeraldAI.CreateEffect (SpawnEffectObject);
    51.     }
    52.  
     
    Mark_01 likes this.
  44. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    934
    Hello! Okay so I havent used this asset in a while because it was so incomplete at the time and felt so year 2004.. But it looks much better now, But Im gonna use it in VR. And the AI there gonna be like humans and neighborhood like. walk and go inside houses where they live and act if the player is an asshole, depends on how big of an asshole the player is, so different actions.. Is this asset now capable of handle life like actions? The biggest question is, can they navigate inside of houses and do random stuff with help of the event handler?
     
  45. ewanchurchill

    ewanchurchill

    Joined:
    Oct 10, 2018
    Posts:
    6
    Can someone show me how to set up player (VR) weapon damage to an AI. I currently have this set up but the AI does not take damage. upload_2018-11-24_13-25-21.png upload_2018-11-24_13-26-10.png
     
  46. attaway

    attaway

    Joined:
    Nov 12, 2014
    Posts:
    14
    Can Emerald AI be used for Passive NPCs such as village or traveling vendors, or normal villagers doing their normal daily tasks; sleeping, going to work, eating, then coming back home, and similar things? Then if they are attacked they would respond using Emerald AI's combat system?
    Such as in Skyrim or Red Dead Redemption 2?
     
    erichey and mattis89 like this.
  47. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    934
    remember the tag and layer
     
  48. mattis89

    mattis89

    Joined:
    Jan 10, 2017
    Posts:
    934
    final IK is just to add. Very ease
     
  49. ewanchurchill

    ewanchurchill

    Joined:
    Oct 10, 2018
    Posts:
    6
    I'm a bit of a rookie. Can you explain a bit more. I've tagged and layered everything i think i need to only when adding the 'Player' layer to my VR player it falls through the floor.
     
  50. lazyfly75

    lazyfly75

    Joined:
    Oct 5, 2018
    Posts:
    4
    Hi there,
    since a while I'm getting this error: Assets/Emerald AI 2.0/Scripts/Demo Player/MouseLook.cs(6,14): error CS0101: The namespace `global::' already contains a definition for `MouseLook'

    Is this common? Is there a fix?

    Regards