Search Unity

[Released] Advanced AI Pro - AAA AI Solution -

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

  1. QuadMan

    QuadMan

    Joined:
    Apr 9, 2014
    Posts:
    122
    NullReferenceException: Object reference not set to an instance of an object
    AdvancedAiEnemy.Start () (at Assets/Advanced AI/Scripts/AdvancedAiEnemy.cs:406)

    How to fix this?
    I know someone already fixed this, but need author's solution
     
  2. Deki3d-Virus

    Deki3d-Virus

    Joined:
    Dec 11, 2012
    Posts:
    25
    In explosion prefab uncheck Require Damage Handler
     
  3. Deki3d-Virus

    Deki3d-Virus

    Joined:
    Dec 11, 2012
    Posts:
    25
    U need to add animationClip to your Animation Component slot
     
  4. Deki3d-Virus

    Deki3d-Virus

    Joined:
    Dec 11, 2012
    Posts:
    25

    U can add shadow box above enemies (roof) they will ignore the player
    This is fake way but for now :)
     
    kurotatsu likes this.
  5. kurotatsu

    kurotatsu

    Joined:
    May 10, 2012
    Posts:
    588
    Thanks, I'll try that.
     
    Deki3d-Virus likes this.
  6. QuadMan

    QuadMan

    Joined:
    Apr 9, 2014
    Posts:
    122
    Thx. Now it's working
     
  7. canaljuegos32

    canaljuegos32

    Joined:
    Jun 29, 2015
    Posts:
    63
    I made Enemy AI that shots fireballs, so there isnt any way that proyectiles hit player (also the fireball) in highest position or crouched?, because is very weird.
     
  8. QuadMan

    QuadMan

    Joined:
    Apr 9, 2014
    Posts:
    122
    OK Now AI shooting guns, but not dying...
    Solution...?
     
  9. Deki3d-Virus

    Deki3d-Virus

    Joined:
    Dec 11, 2012
    Posts:
    25
    If u are using UFPS u need to change Damage Method Name to Damage, this is string u can change in inspector.
     
  10. QuadMan

    QuadMan

    Joined:
    Apr 9, 2014
    Posts:
    122
    I'm using RFPS
     
  11. kurotatsu

    kurotatsu

    Joined:
    May 10, 2012
    Posts:
    588
    The method to send the msg to the ai is "GotHit", with a value of damage.
     
  12. arnesso

    arnesso

    Joined:
    Mar 3, 2015
    Posts:
    96
    Is that possible to add flying script to Advanced AI pro? I would like to create some flying enemies, but I cannot find working flying script, so I would be really grateful ,if somebody shares his experience with me if he create flying AI with ADvanced Ai pro .
    Thanks
     
  13. unicat

    unicat

    Joined:
    Apr 8, 2012
    Posts:
    425
  14. diegoadrada

    diegoadrada

    Joined:
    Nov 27, 2014
    Posts:
    59
    Hi, i'm developing a racing-action game, this has a battle (arena) mode with guns, do you think that this asset could work as basis for the IA system?
     
  15. kurotatsu

    kurotatsu

    Joined:
    May 10, 2012
    Posts:
    588
    The ai won't seek cover but if the legacy anims are there the ranged enemies should work.

    There's an animated soldier ai example
     
  16. Zozo2099

    Zozo2099

    Joined:
    Jul 15, 2012
    Posts:
    478
    Hello

    Yes my AI system supports ranged attack so it should be ok for you, I advise you to get it ASAP from the Asset Store as it is on sale now for a limited time only (70$ instead of 125$):
    https://www.assetstore.unity3d.com/#!/content/7009

    Cheers
     
  17. Raynolds

    Raynolds

    Joined:
    Jul 4, 2015
    Posts:
    8
    Hello again,
    A few months ago I successfully solved the "problem" with vp_DamageHandler.cs script. Everything was fine until UFPS came with new Update - version 1.5.1



    Now I have almost identical problem, I'm using your Advanced AI PRO 7.2 with UFPS 1.5.1 (Unity 5.1.1) and vp_DamageHalndler is obviously changed , beacuse I can't find OnColisionEnter line again.

    Could you tell me the exact location where I should insert your method's code?

    Here 's the picture.
    damage284.jpg

    __________________________________________________________________
    ps.
    Also I have a dilemma with Hitscanbullet.cs, line 166
    Is this the correct location for modification of mentioned line ?

    Check the picture.

    22222.jpg


    Thanks.
     
    Last edited: Nov 14, 2015
  18. didierev

    didierev

    Joined:
    Oct 19, 2015
    Posts:
    1
    Okay I got an issue with RFPSP. When I set up the enemy AI according to your instructions (found here: http://forum.unity3d.com/threads/re...upports-unity-free.168870/page-8#post-1606612) the enemy patrols and attacks without animation. That's good because I haven't setup animations yet...

    BUT after adding the Animator component to the enemy and adding the different animation states my enemy just becomes static in playmode. In the console I get the following errors:

    NullReferenceException: GetRef
    AdvancedAiEnemy.Start () (at Assets/Advanced AI/Scripts/AdvancedAiEnemy.cs:416)

    NullReferenceException: Object reference not set to an instance of an object
    AdvancedAiEnemy.UnawareMode () (at Assets/Advanced AI/Scripts/AdvancedAiEnemy.cs:1538)
    AdvancedAiEnemy.TriggerStay () (at Assets/Advanced AI/Scripts/AdvancedAiEnemy.cs:1462)
    IdleSphere.OnTriggerStay (UnityEngine.Collider other) (at Assets/Advanced AI/Scripts/IdleSphere.cs:30)

    Any idea how to fix this?

    Thanks!
     
  19. kurotatsu

    kurotatsu

    Joined:
    May 10, 2012
    Posts:
    588
    This system only currently works with a legacy animation setup, not mecanim, unfortunately.
     
  20. Ghost_Interactive

    Ghost_Interactive

    Joined:
    Jul 8, 2015
    Posts:
    54
    need a new tutorial for RFPS. it should be great if a video. thanks in advance
     
  21. arnesso

    arnesso

    Joined:
    Mar 3, 2015
    Posts:
    96

    Hello !

    Are there any solution for UFPS 1.5.1 and Advanced Ai pro 7.2 working together ?
    Where should I change scripts to my UFPS player will be able to damage and recevie damage from AI
    Thank you
     
  22. Raynolds

    Raynolds

    Joined:
    Jul 4, 2015
    Posts:
    8
    Hi @arnesso

    I'm wondering the same thing , I posted a question two weeks or so ago and still nothing ... desperately need help ASAP.
     
  23. gordon284

    gordon284

    Joined:
    Dec 1, 2015
    Posts:
    1
    Hi, Zozo

    Your asset looks very interesting, so I have a dilemma whether to buy your package or Paragon shooter AI. I have UFPS asset, Paragon shooter are fully compatibile with Ufps, your package is not, because I see that many people have the same problem with your package, I'm not a programmer, so I do not understand what the problem is. I saw you had a guide for Ufps, but obviously is outdated or something else, did i meet with the same problems? I think you have very very cool and interesting stuff, other packages do not have them. I want to make WW II game. Can your AI respawn in the same position when they die, or they have trigger respawn? Also I am wondering can your asset support around 80-100 soldiers in my game? Can this cause performance issue with your asset or not?
     
  24. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    Hi Everyone.

    Mine is fully working with the latest UFPS. I will provide you with some help later today if ZoZo is busy or away.

    @gordon284 - you can easily have 3000 soldiers in your game. I use Pool Management to spawn AI, but also use a Easy Cull in the asset store to place your Pool Management under. I only use Easy Cull for AI.. you can disable the renderer or delete the AI when they are outside of the players camera sphere. Pool Management for when they are killed. Then you need some spawn management, or trigger your AI into the game based on where the player enters/exits.
     
    Last edited: Dec 2, 2015
  25. MrElazug

    MrElazug

    Joined:
    Sep 22, 2015
    Posts:
    1
    Hi ZoZo i have a issue with ufps.ı have a ai setup with advanced ai pro.AI can attack me but ı cannot taking damage i m using melee btw.can somebody help?
     
  26. Raynolds

    Raynolds

    Joined:
    Jul 4, 2015
    Posts:
    8
    Hi @julianr

    I would be really grateful if you could explain how to change damagehandler , and hitscanbullet scripts .

    This is probably the biggest problem right now .
     
    arnesso likes this.
  27. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    Hi all - sorry for the delay, had a busy day.. here's what you need to do;

    For Melee (AI damaging player) - make sure in AI Advanced Pro under your AI Enemy character, that you specify your Damage Amount, set this to say 0.5 for starters and you can adjust this. You'll need to set the size to 1 or more and set the values for each damage amount. You may have several melee attack animations. Then set the Damage method name to Damage.

    I'll come back with the hitscanbullet change, or a solution in a bit, as mine is custom.
     
    Last edited: Dec 4, 2015
    arnesso likes this.
  28. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    I think there is also some issues with the latest Advanced AI Pro. When setting the Main Target as the UFPS players layer (LocalPlayer) the AI bounced off the player and doesn't attack (on Melee), just walks away. However if you also set the second target to (LocalPlayer) it will attack the player and give you damage, providing you have set the Damage method name and Damage amount as in #977. Fixing this would be part of the problem solved.

    edit: fixed this by re-importing Advanced AI Pro ?!
     
    Last edited: Dec 4, 2015
  29. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    Ok, here's the fix for projectiles.. shooting AI with UFPS;

    In UFPS if you go into the prefabs folder for the projectiles within the Editor. Select the PistolBullet, and in the inspector remove the tickbox for Require Damage Handler (under Vp_Hitscan Bullet script). Do the same for the other projectiles if needed. Then if you run the game, you will notice that your AI will take damage (head and body shots).

    edit: this does seem to be after UFPS 1.5.1 update, but this will fix shooting AI for you :)
     
    Last edited: Dec 4, 2015
  30. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    Let me know if this fixes it for you until Zozo can look at the Main Target layer.

    Edit: My issue with the Main Target layer seems to have gone away after re-importing Advanced AI Pro. Setting the Main Target layer as LocalPlayer (UFPS) and Secondary Target as Nothing.

    However the fix still stands for projectile shooting AI using UFPS.
     
    Last edited: Dec 4, 2015
    Raynolds likes this.
  31. Raynolds

    Raynolds

    Joined:
    Jul 4, 2015
    Posts:
    8
    Hi @julianr

    Thanks very much for the detailed explanation. I really appreciate your efforts and your helpful comments.

    Everything works exactly the same way as you have said.
    But the only remaining and the biggest issue is the situation in which AI shooting at you and the player dies instantly.

    I really hope that we will soon get the necessary solution, "cause this waiting lasts way too long as we expected,

    Thanks again.
     
  32. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    @Raynolds - if you change the damage amount to 0.1 it will not hit the UFPS player so much, instead of 1, you can increase or decrease this 0.1 value to suit your needs (example: 0.15). No problem on the help.
     
  33. Raynolds

    Raynolds

    Joined:
    Jul 4, 2015
    Posts:
    8
    @julianr
    "I've already tried that .. unfortunately that method is effective only in melee
     
  34. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    @Raynolds - ah ok, have you gone to the projectile prefab and changed how much damage it can do.. it may be set to 100, which is all of your health.

    edit: are you using the Advanced AI projectile or using UFPS projectiles for the AI, as they have more functionality.
     
  35. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    @Raynolds - just tested it with the default Advanced AI projectile, and set the damage on ranged to 0.1, works fine.. its taking 1% of damage each hit. Are you sure you havnt made a change to the script to replace the amount of damage?
     
  36. Raynolds

    Raynolds

    Joined:
    Jul 4, 2015
    Posts:
    8
    I'm using the Advanced AI projectile prefab but damage amount doesn't exist in projectile prefab, you can change damage only in inspector menu, even if I change the number, for example 0.1 sometimes player recieve 300dmg sometimes 500 ... etc.
     
  37. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    Not sure what to suggest on that one, other than feel free to send me a PM with your email address and I'll send you a screenshot of my settings.
     
  38. canaljuegos32

    canaljuegos32

    Joined:
    Jun 29, 2015
    Posts:
    63
    This eat too much fps or Im doing something wrong?, if I put 2 enemies fps go down by 60 and in other scene 1 enemy almost 90. Im using RFPS and the enemy prefab included.
     
  39. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    Have you made any changes to the values, apart from the animations? Also worth checking that you have setup the Layers, so the AI can't see through buildings.
     
  40. canaljuegos32

    canaljuegos32

    Joined:
    Jun 29, 2015
    Posts:
    63
    Yes i think is all ok, i used the prefabs, all work ok. There is a guy in asset store comments that say same. I noticed more fps lost in new unity 5.3. In 5.2 was not that heavy with 1 enemy, but with 2 the same. Even a cube with no animatios have same problem or a passive ai.
     
  41. Ghost_Interactive

    Ghost_Interactive

    Joined:
    Jul 8, 2015
    Posts:
    54
    need little help with UFPS , when i use heroHD everything works fine, but when i use normal hero or advanceheromobile (ufps mobile) player dies instantly...1st shoot
    any gess were the problem is..need to use moible addon i am creating a mobile game.
    thanks in advance
     
  42. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    Try changing your damage amount in AI Pro to 0.1 see how that works out for you.
     
  43. kurotatsu

    kurotatsu

    Joined:
    May 10, 2012
    Posts:
    588
    Alright, Zozo, it's going on almost 3 years now, it's about time to get the promised mecanim version out.

    I mean this with the utmost respect, having been one of the strongest supporters of Advanced AI Pro(and still use it.), but I personally am tired of waiting.
     
  44. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    Its been over two months since Zozo last replied or supported anyone, I think he has moved on. I've stopped using it now as the latest current version doesn't seem to play well with 5.2.2 or above.
     
  45. daisySa

    daisySa

    Joined:
    Dec 29, 2011
    Posts:
    341
    Yes, this product is abandonware.
     
  46. kurotatsu

    kurotatsu

    Joined:
    May 10, 2012
    Posts:
    588
    Well, calling attention to it might prompt some action, it's hard to say, ya never know.

    I still use it in unity 5.2.4f1 with great results. I'm putting together a video to show some of it in action, but keep in mind I've added and extended mines functionality myself with other features.

    If Zozo doesn't wan't to support it anymore, I'd gladly take it on, and continue his work with his permission if I could sell it.
     
    julianr likes this.
  47. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    dont get me wrong, it was a good solution for my needs at the time and still is, but without continued updates and support it is falling behind other solutions that are a better fit for my project. If Zozo is still supporting it and coming back with a new amazing release with features, such as; mecanim and A* pathfinding support then I may switch back, but needed a solution that worked over multiple terrains as my game is getting really big now.
     
    kurotatsu likes this.
  48. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    It also needs a better ranged weapon solution for AI (Melee is great).
     
  49. kurotatsu

    kurotatsu

    Joined:
    May 10, 2012
    Posts:
    588
    I added my own weapon switching for my baddies going from ranged to melee, that's nice.
     
  50. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    yeah, I created mine too.. ranged weapons > greater than, melee weapons < less than. It does need weapon switching based on out of ammo too, or random change after (x) number of shots.