Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

[Released] Advanced AI Pro - AAA AI Solution -

Discussion in 'Assets and Asset Store' started by Zozo2099, Feb 3, 2013.

  1. Zozo2099

    Zozo2099

    Joined:
    Jul 15, 2012
    Posts:
    478
    Hi unicat

    I can see the reason from the image, you did not set a "Projectile Prefab"! AI ranged attack system uses projectiles instead of raycasting, you can use the projectile prefab provided in the Showcase prefabs folder, and toggle off its "Renderer" component so it will become invisible. Assign it then and it should work.

    Cheers
     
  2. unicat

    unicat

    Joined:
    Apr 8, 2012
    Posts:
    425
    Should i add the projectile Skript from the menu to the _ProjectileOrigin too and set the ApplyDamage Method to the damage method Name?
     
  3. Zozo2099

    Zozo2099

    Joined:
    Jul 15, 2012
    Posts:
    478
    No, you don't need to add anything, everything is handled automatically, just drag-drop your projectile prefab in its slot, disable the Renderer if you want it to be invisible, that is all :)
     
  4. unicat

    unicat

    Joined:
    Apr 8, 2012
    Posts:
    425
    Okay, added the projectile prefab. I can see the bullets flying from ai to Player, but no damage to the Player is happening.

    $projectile1.JPG
     
  5. Zozo2099

    Zozo2099

    Joined:
    Jul 15, 2012
    Posts:
    478
    It is working for me, Player takes damage fine! I don't know why you have this, maybe you have something wrong in your setup!

    - Be sure "_ProjectileOrigin" is not touching the AI?
    - You need to add a collider component to your projectile prefab, Does it have a sphere collider?

    Try to use the example "Ranged Attack" scene in the Showcase folder of Advanced AI Pro, add the FPS player prefab to it, change the layer of the world geometry to "World Collision", assign the right layers in the "Layers" section of the AI....ect then try with that! That scene is working for me!
     
    Last edited: Apr 26, 2014
  6. unicat

    unicat

    Joined:
    Apr 8, 2012
    Posts:
    425
    Hurray, it works. I set the projectile tag to Bullet and now it works perfectly. Thank You for your help on this. I`ll go and give you 5 stars on the asset store. :D
     
  7. TheDevGuy

    TheDevGuy

    Joined:
    Mar 3, 2014
    Posts:
    78
    Hello.

    I am trouble with this unfortunately. i had this working previously but now when i run the scene the enemy jsut stands in one place.
    I have remade it like 5 times and does the same thing. The collider is off the ground and i even have it set to wander and tired waypoints but still no movement.
    Wander radius is big, floor layer set to floor, walls layer set to wall, navigation mesh was baked, player was set as target with layer player.

    any help is appreciated, thank you.
     
  8. Zozo2099

    Zozo2099

    Joined:
    Jul 15, 2012
    Posts:
    478
    Hi

    Can your AI see the player and chase it/attack when you are close to it?
    Do you get any errors in the console?

    Otherwise please post some screenshots of your AI settings!
     
  9. InteractivaStudios

    InteractivaStudios

    Joined:
    Apr 28, 2013
    Posts:
    19
    One more question about this, is it possible to use with mecanim and retarget bipedal animation? That would make my life much easier
     
  10. TheDevGuy

    TheDevGuy

    Joined:
    Mar 3, 2014
    Posts:
    78
    It is fixed now, i just used your example enemy and replaced the model and anims with mine.

    Thanks anyways :)
     
  11. TheDevGuy

    TheDevGuy

    Joined:
    Mar 3, 2014
    Posts:
    78
    Ok i did run into another issue in this screenshot. Basically its brining my enemy to the ground level instead of staying in the air where i need it, even through i have the capsule collider set long to emulate hovering and having the model to the top.

    Is there something im doing wrong here or can i not have the mesh collider that i have on my model itself?


    ****I FIXED THIS ISSUE BY MAKING THE NAVIGATION MESH HEIGHT HIGHER****
     

    Attached Files:

    Last edited: Apr 28, 2014
  12. TheDevGuy

    TheDevGuy

    Joined:
    Mar 3, 2014
    Posts:
    78
    Hello, is it possible to have an Advanced AI Enemy and an Advanced NPC Aggressive in a scene that target each other, with ones target unique being "enemy" and the other being "friendly"?

    Because i have tried this and they just stand still, and only when i remove one or the other from the scene do they start wandering. So its like they are conflicting with each other for some reason and cant coincide.

    They both wander fine solo on the nav mesh

    I dont have any error messages but i can attach the setup that i have for each.

    ENEMY
    _______
    http://i950.photobucket.com/albums/ad349/gageanator/enemy.png

    FRIENDLY
    _________
    http://i950.photobucket.com/albums/ad349/gageanator/friendly.png
     

    Attached Files:

    Last edited: Apr 29, 2014
  13. Zozo2099

    Zozo2099

    Joined:
    Jul 15, 2012
    Posts:
    478
    Hi TheDevGuy

    No it is not possible, but you can use the Defender Ally class against an enemy, as in the Defender example scene you set the target and layer for both to the player (you), and when they see each other they will start attack between them! and you watch :D

    Is that what you want?
     
  14. TheDevGuy

    TheDevGuy

    Joined:
    Mar 3, 2014
    Posts:
    78
    Ahh yea i had seen your example. I was hoping to have both parties wander around and be able to attack if in the radius, from what i see the defender cannot wander.

    Also, is there a way to attach your AI to static object being ENEMY turrets so that they dont move, but can still rotate 360* to attack the player/enemy

    Thanks :)
     
  15. Zozo2099

    Zozo2099

    Joined:
    Jul 15, 2012
    Posts:
    478
    Yes you can do the turret AI with some tweaks :)
    • Set the "Patrol Mode" to: In_Place
    • Set the "Attack Mode" to Ranged (the turret shoots you).
    • Set the "Chasing Speed" to 0
    Now you can have a turret behavior, shooting at you when you are within its "Shoot Distance" and "View Sphere" ranges, and rotates to your direction.

    I tested that in the ranged attack example scene.

    Cheers
     
  16. unicat

    unicat

    Joined:
    Apr 8, 2012
    Posts:
    425
    Is it possible to let a ragdoll disappearing too ?
     
  17. kurotatsu

    kurotatsu

    Joined:
    May 10, 2012
    Posts:
    588
    Create a C# script and add it to your ragdoll prefab called: DestroyRagdoll.cs

    And add this code.

    Code (csharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. public class DestroyRagdoll : MonoBehaviour {
    5.  
    6. public  float lifeTime = 1.5f;
    7.  
    8.    
    9.     void Awake(){
    10.        
    11.         Destroy(this.gameObject,lifeTime);
    12.        
    13.     }
    14. }
    Hope it helps.
     
    Last edited: May 1, 2014
  18. fredr92

    fredr92

    Joined:
    Jul 8, 2013
    Posts:
    292
    Hi thanks for the great update !

    I could see that if i used a small radius on the "Go idle radius " before the update the raycast would hit it, and i now can see you have fixed it with this update. But i have discovered also that projectile weapons that instantiates a gameobject, example a grenade, or rocket still can hit the "Go Idle Radius" . It can easly be fixed with setting the radius larger than the map then i will not notice it. But if you use smaller distances it happens sometimes. So if this is something that is easy too fix i would really appreciate it, Thanks !


    I also have suggestion for the future.
    Maybe make it possible to have a head collider + a body collider and if the head collider gets hit, the NPC dies mutch faster.

    I really like the legacy system, but whats great with mecanim is that you dont need hundreds off different animations you can use the same on as many characters you want. So giving the customers the oppertunity too choose mecanim or legacy would be great.

    Thats all i could think off, keep up the great work, its a very good AI.
     
  19. unicat

    unicat

    Joined:
    Apr 8, 2012
    Posts:
    425
    Thank You kurotatsu, i will try this.
     
  20. Robomagic

    Robomagic

    Joined:
    Mar 24, 2014
    Posts:
    7
    I have an important question. Does your AI can apply to a fly gameobject (Example a Dragon) ?
     
  21. Zozo2099

    Zozo2099

    Joined:
    Jul 15, 2012
    Posts:
    478
    Hi

    Yes you can, by setting the height of your NavMesh to the height on which you want your enemy to be above the ground.
     
  22. Tanshaydar

    Tanshaydar

    Joined:
    Apr 20, 2011
    Posts:
    33
    Hi;
    My enemy dummy seems to float around a lot. How can I fix this, it becomes quite distracting.
    $Untitled.png
     
  23. Zozo2099

    Zozo2099

    Joined:
    Jul 15, 2012
    Posts:
    478
    Hi

    Decrease the "Height" of your NavMesh (on which the AI moves)! You find it under "Bake" tab in the "Navigation" window.

    Cheers
     
  24. Zozo2099

    Zozo2099

    Joined:
    Jul 15, 2012
    Posts:
    478
    Hello everyone;

    Good news, I have submitted a new update, now it is possible to assign a "Second Targets Layer" to any gameobject which you want your enemy AI to attack, in addition to the main target (player). It can be a defender ally, companion, or any other gameobject, and it can be assigned to as many gameobjects as you want :)

    This could be good for some people looking for more personalized and fighting behaviors :)
     
    Last edited: May 26, 2014
  25. eliteslayer

    eliteslayer

    Joined:
    May 12, 2013
    Posts:
    64
    Hi Zozo,
    I have been wanting to get your ai package for such a long time but I only found out about it when it was 100 dollars, now it's 125, I can not afford to spend 125 dollars like that no matter how great the package is. I just wanted to know if it would go on sale for a certain amount of time so I can afford to buy it because as of now as great as it looks and as much as I do want it there is no way I can pay that amount of money. Thank you and if there is a plan for a sale coming up please let me know and I will definitely buy it. I hope you understand, Thank you and still amazing and great looking package!
     
  26. Zozo2099

    Zozo2099

    Joined:
    Jul 15, 2012
    Posts:
    478
    Hi

    I had already signed up for Asset Store sales 2 weeks ago but I did not get an answer yet from Asset Store staff, here is the message which you get automatically after sending the participation form:

    So as you read, the final decision is theirs. We need to wait apparently...

    Cheers
     
  27. fredr92

    fredr92

    Joined:
    Jul 8, 2013
    Posts:
    292
    Hi !

    I just upgraded from 4.3 too 4.5 yesterday and everything seems too work good, except 1 thing, my enemies Works fine like they did before i upgraded too 4.5, but my NPC passive have got some problems now.

    this is the Message i get


    MissingComponentException: There is no 'Animation' attached to the "TriggerSphere" game object, but a script is trying to access it.
    You probably need to add a Animation to the game object "TriggerSphere". Or your script needs to check if the component is attached before using it.
    UnityEngine.Animation.get_Item (System.String name) (at C:/BuildAgent/work/aeedb04a1292f85a/artifacts/EditorGenerated/Animations.cs:550)
    AdvancedAiNpcPassive.Start () (at Assets/Advanced AI/Scripts/AdvancedAiNpcPassive.cs:196)



    What is strange is, i havent touch the settings after i upgraded and everything worked fine before. So i tried to follow the error, attatch animation Component too the triggersphere and put animations there, but it still dont work. so my Guess is that there is some kind off compile error With unity 4.5.
    Would really appreciate if you could take a look into this ! thx :)
     
  28. Zozo2099

    Zozo2099

    Joined:
    Jul 15, 2012
    Posts:
    478
    Hi

    I ran the example scenes in Unity 4.5 no such a problem; but I know the reason of that error, delete the "TriggerSphere" gameobject from the hierarchy then try to run your scene again!!
     
  29. eliteslayer

    eliteslayer

    Joined:
    May 12, 2013
    Posts:
    64
    Ok I see and understand, Thank you so much for at least thinking about making a sale, i hope unity finally decides to choose your package. Thank you.
     
  30. fredr92

    fredr92

    Joined:
    Jul 8, 2013
    Posts:
    292
    It Works thanks
     
  31. fredr92

    fredr92

    Joined:
    Jul 8, 2013
    Posts:
    292
    How long have you been Programming? did you learn all by yourself or are you a data engineer or something? you must have put alot off work into this AI package, looking forward too following it in the future .
     
  32. Zozo2099

    Zozo2099

    Joined:
    Jul 15, 2012
    Posts:
    478
    Hello everyone;

    Update 5.6 is now available in the Asset Store.

    v5.6 Changeloge:
    • Now it is possible to assign a "Second Targets Layer" in AI Enemy. AI Enemy can attack any gameobject in this layer, it can be a defender ally, companion AI, or any other gameobject with a collider component. So it is possible to have as many second targets for AI enemy to attack as you want, in addition to the "Main Target Layer" (player for instance).
    • AI Enemy can now attack NPC Passive AI when assigned to "Second Targets Layer", and NPC Passive AI will try to flee away when hit by an enemy AI.
    • Renamed "Target Unique Layer" to "Main Target Layer".
    • Fixed bug with AI ragdoll not being destroyed when "Disappear On Death" is checked.
    • Optimization to NPC Passive AI code.
    • Updated Pdf documentation.
    So with this update you have more personalized behaviors to create more diversified scenarios.

    Cheers
     
    Last edited: May 28, 2014
  33. fredr92

    fredr92

    Joined:
    Jul 8, 2013
    Posts:
    292
    Thx for the New update, the New 2 target system is great, just tried it out.

    I found out my problem about the trigget sphere is not completly gone, cause if i restart unity it comes back, so it means i must delete the trigger sphere in editor mode everytime before i build or wanna test something New in the scene. But it only happens With the npc passive. Do you have any idea how too completly remove the error? or what in my Project that can cause it? thanks
     
  34. Zozo2099

    Zozo2099

    Joined:
    Jul 15, 2012
    Posts:
    478
    Hi

    Yes I have just fixed that issue for the next small update which I will submit today maybe, This issue comes from the new feature in Unity 4.5 to sort the elements in the hierarchy depending on their transform order instead of names.

    Cheers
     
    Last edited: May 29, 2014
  35. Zozo2099

    Zozo2099

    Joined:
    Jul 15, 2012
    Posts:
    478
    Hi to all

    New update 5.7 is out, important to update for everyone.

    Changelog 5.7
    • Fixed several issues related to pathfinding, search and alert behaviors, and other little issues related to upgrading to Unity 4.5.

    Enjoy
     
    Blackghost, fredr92 and Tanshaydar like this.
  36. fredr92

    fredr92

    Joined:
    Jul 8, 2013
    Posts:
    292
    Thx for the new update . Keep up the good work
     
  37. majestic12

    majestic12

    Joined:
    Feb 5, 2013
    Posts:
    15
    I'm also getting this issue, but I can't see a TriggerSphere game object in the hierarchy. I'm on 4.3.4 and the latest version of Advanced AI Pro.
     
  38. Zozo2099

    Zozo2099

    Joined:
    Jul 15, 2012
    Posts:
    478
    Hi

    In the hierarchy open your AI, then rename the character model gameobject by adding "_" before the name. By example if the character model is named "Hero" then name it "_Hero".

    Cheers
     
  39. majestic12

    majestic12

    Joined:
    Feb 5, 2013
    Posts:
    15
    That's fixed it - many thanks!
     
  40. Optical-Illusions

    Optical-Illusions

    Joined:
    Dec 23, 2013
    Posts:
    32
    Hi Zozo,

    I have read eliteslayers post, and i agree with him because i too cannot afford paying 125 dollars for a package in unity. Therefor i have waited for the next sale hoping to see your package, however in this guts and glory sale i see no Advanced AI Pro. I would love to purchase this package but at the same time i cant wait and do nothing for another sale. I have seen that you applied for a unity madness sale as you responded to eliteslayers post. But since your package appears to not be chosen why not make a sale of your own and update the package with a lower price yourself for a couple of days like other people have and then after a couple days or so bring back up to its original price that way you have made a sale and people who couldn't afford 125 dollars could now maybe afford the package do to the sale without having to wait for another unity madness sale. I hope you take this into consideration because i would definitely like to be able to buy the package and set up my AI's quickly because it does look great. Thank you.
     
  41. Zozo2099

    Zozo2099

    Joined:
    Jul 15, 2012
    Posts:
    478
    Hi everyone;

    I have just submitted a new update with One Week Special Offer, price dropped to 75$, I will inform you here when the update is available online, you too keep an eye on the product page :)

    Cheers
     
  42. Soumikbhat

    Soumikbhat

    Joined:
    Nov 23, 2013
    Posts:
    110
    I am using version 5.3 and I get this error:

    "
    Failed to create agent because there is no valid NavMesh
    UnityEngine.GameObject:AddComponent(String)
    AdvancedAiEnemy:Start() (at Assets/Advanced AI/Scripts/AdvancedAiEnemy.cs:319)"
     
  43. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,210
    Great product! In a future update would it be possible to add more Range attack animations for different poses in the editor, and maybe the ability to swap weapons, this I would imagine would have the weapon type shown in the editor first with the range animation sequences under it?
     
    Last edited: Jun 23, 2014
  44. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,210
    Have you baked in a Nav Mesh into your scene?
     
  45. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,210
    Between Idle and Wandering animations I get a skating effect with no animations. Would this be down to just changing a blending setting on the animations?
     
  46. Soumikbhat

    Soumikbhat

    Joined:
    Nov 23, 2013
    Posts:
    110
    Is it possible to go with mecanim and not legacy with this asset?
     
  47. Soumikbhat

    Soumikbhat

    Joined:
    Nov 23, 2013
    Posts:
    110
    The character just slides and chases me or wanders in the default T-shape, it doesn't perform any of the animations attached to it...just keeps on moving/chasing in the T-shape...Any idea why?

    All are in legacy mode btw..
     
  48. Zozo2099

    Zozo2099

    Joined:
    Jul 15, 2012
    Posts:
    478
    Hello

    You need to assign the animation clips in "Animations" section of the AI too.
     
  49. Soumikbhat

    Soumikbhat

    Joined:
    Nov 23, 2013
    Posts:
    110
    Yes that's done, but the error does not seem to go...
     
  50. TheDevGuy

    TheDevGuy

    Joined:
    Mar 3, 2014
    Posts:
    78
    Hello. Just having a problem with the Enemy AI.

    I am using UFPS and the AI stands in one place when the UFPS player is spawned in at a later time, but when i switch it and start the scene with the UFPS player everything works.

    So im guessing that the player has to be present in the scene when the scene starts or else the enemy wont wander, detect, or do anything?

    Any help is appreciated as i cant have the UFPS player in the scene on start. I even drag and dropped his prefab fro the project panel into the Target slot and that didnt solve the issue of mine.