Search Unity

Shooter AI – The Ultimate Artificial Intelligence Solution

Discussion in 'Assets and Asset Store' started by nikita68, Oct 8, 2013.

  1. Optical-Illusions

    Optical-Illusions

    Joined:
    Dec 23, 2013
    Posts:
    32
    @Nikita
    I tried those suggestions however it didn't make a difference other than holding the guns wrong in a different position. Could u try fixing it in text update also I have. A question. Have u been developing this asset on unity pro or free?
     
  2. SpaceRay

    SpaceRay

    Joined:
    Feb 26, 2014
    Posts:
    455
    PLEASE, HOW TO USE SHOOTER AI FOR NON HUMAN OBJECTS AND NON MECANIM CHARACTERS?

    Hello, sorry that I am beginning with Unity and have little experience, I have bought this very well done Shooter AI and I like it how it works in the demo, BUT after reading the manual and seeing some video tutorials it seems that all is aimed at always using a HUMAN or MECANIM character and for my purpose I DO NOT WANT to use any mecanim character, I want to use some non animated 3D objects I have in prefabs and that they would carry a weapon so they can shoot to the player when they see it and that they patrol searching for it, and also feel emotions.

    When configuring the new character AI I get the following error messages

    Please add an animator to your model object

    When adding the animator to the model I get this other message

    Please add an animator with an avatar to your model object

    And looking at Inspector in the ANIMATOR part it needs to configure

    Controller --- None (Runtime Animator Controller) so I wonder which one should be for a NON MECANIM Character?

    Avatar --- None (Avatar) when clicking to add one on the right button it appears a list of different available avatars but do not know which one to choose or how to create one for a non mecanim character

    I have this below in the Unity manual but regretably I do not understand how to make it for non-humanoid animations

    http://docs.unity3d.com/Manual/class-Avatar.html

    Although I do not want to have any animation

    HOW TO USE READY MADE WEAPONS FROM THE UNITY ASSET STORE ?

    I have bought the following weapons projects
    Weapon System 3.1 https://www.assetstore.unity3d.com/en/#!/content/7676
    Easy Weapons https://www.assetstore.unity3d.com/en/#!/content/19365
    ProWeapons Kit : FPS https://www.assetstore.unity3d.com/en/#!/content/21871


    I want to use this weapons with the Shooter AI adding some of this weapons for the enemy, but I am sorry to say that I am lost and does not know how to configure the Gateway Games Weapon in Inspector to be able to use this weapons I have put here above.

    Sorry for being a noob and not be able to have the needed skills and experience to use this great Shooter AI in a different way than it is shown.

    Thanks very much for any help you can give and so I can use this

    Kind regards
     
  3. nikita68

    nikita68

    Joined:
    Feb 8, 2013
    Posts:
    289
    @JBR games -
    This is how the animation/locomotion systems interact

    Signals sent it where to go -> Movement Manager sends it to NavMeshAgent -> Movement Manager calculates data for animations -> Sends animation data to Model Manager -> Applies data to Animator.

    To be honest, i don't quite get how you would like the animations to be applied. Could you maybe explain it a bit more?

    @99thmonkey - Wow :D Thanks for pointing that out! I swear they worked perfectly like a week ago...

    @CreatureSurviive - Thank you for your help! :)

    @Optical Illusions -
    1) I would love to provide a fix, but i can't recreate this bug on my side. :( The next update should be out on the asset store in the next few days. Could you maybe provide some screenshots of what the GatewayGamesWeaponManager and Brain are showing when this bug occurs? We're really sorry for this inconvience.

    2) Yep, the whole team uses Pro for development, but there isn't a single feature in SAI that uses pro functions.

    @SpaceRay -

    1) This whole system was made based on Mecanim, so you may have quite large problems trying to use non-humanoid characters with it.
    For the avatar issue, you will actually get an avatar, even if you don't make a humanoid one (so either legacy or generic). Select that as the avatar in the animator, and leave the controller slot empty.

    2) To implement weapons, use the weapons creator wizard. You can see it in this tutorial:


    Also we have an in depth explanation of how to use the weapon script in the manual.

    Don't worry about being a beginner. We were all once starting out and needed help. :)
     
  4. Reiner

    Reiner

    Joined:
    Dec 2, 2012
    Posts:
    214
    Hi i buy the multiplayer shooter ai and follow the multiplayer tuturial on youtube but in the project only one demo scene but the multiplayer scene in the tuturual is not in the project? What do i wrong?
     
  5. CreatureSurvive

    CreatureSurvive

    Joined:
    May 3, 2014
    Posts:
    17
    Okay, after two days of trying to implement this I think it's time to ask for help. I've been trying to implement a knock back system in place of the knock down system, this system would ideally use IK and apply force or activate a new bend point in the IK so if an enemy is shot or hit he will react and basically flinch when hit. Since I have no use for the knockdown system I was trying to just replace that with my knock back system.

    I've been trying to implement this by setting up an IK bend goal behind the ai and have it activate when shot thus pulling the player back for a second and then deactivate again.

    Seams simple enough but I haven't even been successfull in deactivating the knockdown system as of yet. A point in the right direction would be great.
     
  6. nikita68

    nikita68

    Joined:
    Feb 8, 2013
    Posts:
    289
    @Reiner - Are you sure you're following tutorials for SAIM?
    https://www.youtube.com/playlist?list=PLrzO1o8MansLlE6olSZhIJ8hXmlO7jXx2

    Please also note that SAIM was developed for programmers and you will have to adjust some scripting, though we'll gladly help out.

    @CreatureSurviive -
    Hmm, thats actually quite a good way to implement it. To deactivate knocking down, open your AI's hierarchy -> Open the Health Manager's hierarchy -> Open HealthBody -> Open GatewayGamesDamageRegion -> Deactivate Knock down.

    Please tell me if it works.
     
  7. SpaceRay

    SpaceRay

    Joined:
    Feb 26, 2014
    Posts:
    455
    Quote from nikita68

    1) This whole system was made based on Mecanim, so you may have quite large problems trying to use non-humanoid characters with it.


    Thanks for your answer, so I will not be able to use this for the non-humanoid characters, but I can maybe use it for a future possible game that I have a plan

    I have seen already another AI that works well with non-humanoid character and you can use any shape without any animation

    For the avatar issue, you will actually get an avatar, even if you don't make a humanoid one (so either legacy or generic). Select that as the avatar in the animator, and leave the controller slot empty.

    2) To implement weapons, use the weapons creator wizard. You can see it in this tutorial:

    Thanks for this also, it will be useful when I may come back to use it in the future

    Very good that you have these useful video tutorials
     
  8. nikita68

    nikita68

    Joined:
    Feb 8, 2013
    Posts:
    289
    hopeful likes this.
  9. 99thmonkey

    99thmonkey

    Joined:
    Aug 10, 2012
    Posts:
    525
    When? I haven't seen 2.1 through the asset store yet. I'm about to get started on my AI but might need to wait for your updates. I plan to do the multiple weapon aspect too.
     
  10. 99thmonkey

    99thmonkey

    Joined:
    Aug 10, 2012
    Posts:
    525
    Multiple Weapons - Will the Ai switch to Melee weapon vs Ranged weapon if I set the Melee weapon as the extra weapon per your Multiple weapons video? For instance a pistol is the main, and my melee is a stick.
     
  11. nikita68

    nikita68

    Joined:
    Feb 8, 2013
    Posts:
    289
    @99thmonkey -

    1) 2.1 just came out yesterday. The asset store team took a long time.
    2) Exactly! Thats the whole system. You can set the range now in the inspector.
     
  12. 99thmonkey

    99thmonkey

    Joined:
    Aug 10, 2012
    Posts:
    525
    Need some DeathSpawn objects and hit sounds for melee. That way I can send messages to my score manager.
     
  13. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    @nikita68 Could you please upload a new "Shooter AI with UFPS" webdemo that demonstrates that the "rifles penetrating the enemy bodies" problem has been fixed?

    Because the same issue is still there if you've already uploaded a 2.1 webdemo. And the enemy feet still penetrate the floor when crouching. Thank you

     
  14. nikita68

    nikita68

    Joined:
    Feb 8, 2013
    Posts:
    289
    @99thmonkey - Expect that option in 2.2.

    @eridani - Will do. The current demo uses SAI 2.0.
     
    eridani likes this.
  15. 99thmonkey

    99thmonkey

    Joined:
    Aug 10, 2012
    Posts:
    525
  16. MRxBIGxSTUFF

    MRxBIGxSTUFF

    Joined:
    Feb 28, 2014
    Posts:
    4
    Has anybody come across this error before? Getting it all the time, AI not causing damage to my player.

    Error:
    Failed to call function Damage of class vp_FPPlayerDamageHandler
    Calling function Damage with no parameters but the function requires 1.
    UnityEngine.Component:SendMessageUpwards(String, SendMessageOptions)
    GatewayGames.ShooterAI.GatewayGamesWeapon:Fire() (at Assets/Shooter AI/Scripts/Weapons/Weapon Specific/GatewayGamesWeapon.cs:269)
    GatewayGames.ShooterAI.GatewayGamesWeaponManager:Fire(FireType) (at Assets/Shooter AI/Scripts/Weapons/GatewayGamesWeaponManager.cs:393)
    GatewayGames.ShooterAI.GatewayGamesWeaponManager:Fire() (at Assets/Shooter AI/Scripts/Weapons/GatewayGamesWeaponManager.cs:374)
    GatewayGames.ShooterAI.GatewayGamesBrain:TryFire() (at Assets/Shooter AI/Scripts/Brain/GatewayGamesBrain.cs:1062)
    GatewayGames.ShooterAI.GatewayGamesBrain:StateEngageExecutiveLogic() (at Assets/Shooter AI/Scripts/Brain/GatewayGamesBrain.cs:703)
    GatewayGames.ShooterAI.GatewayGamesBrain:StateEngage() (at Assets/Shooter AI/Scripts/Brain/GatewayGamesBrain.cs:539)
    GatewayGames.ShooterAI.GatewayGamesBrain:Tick() (at Assets/Shooter AI/Scripts/Brain/GatewayGamesBrain.cs:249)
    GatewayGames.ShooterAI.GatewayGamesBrain:Update() (at Assets/Shooter AI/Scripts/Brain/GatewayGamesBrain.cs:211)
     
  17. nikita68

    nikita68

    Joined:
    Feb 8, 2013
    Posts:
    289
    @99thmonkey -
    Try rebuilding the character. Seems like some IK stuff gets reset incorrectly.

    @MRxBIGxSTUFF -
    Oh, thats just that in the weapons settings, you have to say that its usign a "Global" damage model. We show it in our tutorial video here:
     
  18. JBR-games

    JBR-games

    Joined:
    Sep 26, 2012
    Posts:
    708
    @nikita68
    Something to think about adding in an upcoming build . A slider for preset personality of the AI. Use your typical ai settings- melee,cover engage,engage, retreat. So the ai will for instance stay in cover engage mode 80% of the time. This would give several different soldier types presets. This would also give the player the abilty to command your squad .send message "cover engage" for a tactical advantage in area with cover locations.
     
  19. MRxBIGxSTUFF

    MRxBIGxSTUFF

    Joined:
    Feb 28, 2014
    Posts:
    4
    Thanks nikita that worked great thanks, Watched this video the other day i missed this some how :)
     
  20. nikita68

    nikita68

    Joined:
    Feb 8, 2013
    Posts:
    289
    @JBR games - We may be adding that in the 2.x cycle, but will definitely be a huge part of the release after that. ;)
     
  21. GenOli

    GenOli

    Joined:
    Apr 21, 2013
    Posts:
    139
    The zombie AI seem to be useless, they just run around the soldier and do not attack them all, what is going on?

    (Using 2.1)
     
    Last edited: Dec 12, 2014
  22. 99thmonkey

    99thmonkey

    Joined:
    Aug 10, 2012
    Posts:
    525
    How do I set up Secondary Weapon? I want to set up a grenade as a secondary weapon or a throwing knife.
     
  23. HellPatrol

    HellPatrol

    Joined:
    Jun 29, 2014
    Posts:
    38
    UFPS got an update. Its 1.4.9 now

    To apply damage to the SAI enemy make this change in the vp_hitscanbullet:

    this:
    Code (CSharp):
    1. // do damage on the target
    2. if(m_Sender != null)
    3. //hit.collider.SendMessageUpwards(DamageMethodName, new vp_DamageInfo(Damage, m_Sender), SendMessageOptions.DontRequireReceiver);
    4. hit.collider.gameObject.SendMessageUpwards(DamageMethodName, Damage, SendMessageOptions.DontRequireReceiver);
    5. else
    6. hit.collider.gameObject.SendMessageUpwards(DamageMethodName, Damage, SendMessageOptions.DontRequireReceiver);

    to this:

    Code (CSharp):
    1. // do damage on the target
    2.             if(m_Source != null)
    3.                 //hit.collider.SendMessageUpwards(DamageMethodName, new vp_DamageInfo(Damage, m_Sender), SendMessageOptions.DontRequireReceiver);
    4.                 hit.collider.gameObject.SendMessageUpwards(DamageMethodName, Damage, SendMessageOptions.DontRequireReceiver);
    5.             else
    6.                 hit.collider.gameObject.SendMessageUpwards(DamageMethodName, Damage, SendMessageOptions.DontRequireReceiver);


     
  24. 99thmonkey

    99thmonkey

    Joined:
    Aug 10, 2012
    Posts:
    525
    Actually, you don't need to do the script changes if you are using the newest version of Shooter AI (2.1)
     
  25. HellPatrol

    HellPatrol

    Joined:
    Jun 29, 2014
    Posts:
    38
    Mh, thats weired.
    It does not work for me after i updated SAI ?!
     
  26. nikita68

    nikita68

    Joined:
    Feb 8, 2013
    Posts:
    289
    @GenOli - Are talking about zombie vs solider AI?

    @HellPatrol - Thank you very much for your support! :)

    Are you sure everything is setup correctly?
     
  27. GenOli

    GenOli

    Joined:
    Apr 21, 2013
    Posts:
    139
    Yes, I copied and edited the Demo scene, swapping Team1 soldiers for the zombie prefab and setting their enemy to Team 2.
     
  28. RyanEarpGW

    RyanEarpGW

    Joined:
    Jun 12, 2014
    Posts:
    65
    @99thmonkey -
    You can equip a secondary weapon in the AI's weapon manager/Secondary Weapon Data.

    @GenOli -
    Works fine for me using 2.2, the update should be available within the next couple of days, let me know if it works after the update. Have you changed any of the settings for the Zombie prefab?
    Could you send me a screenshot of your Demo setup?
     
  29. JBR-games

    JBR-games

    Joined:
    Sep 26, 2012
    Posts:
    708
    Hey gateway team
    First off let me say that , im really impressed with the fact that alot of updates have been released lately. Shooter ai is always improving.
    That being said, i really hope with this next update the demo scene is fixed. That should be a show case of what shooter ai can do.
    It should show properly working melee, and properly function ai solders that dont run to the corner of the map for no reason.and if you have a zombie prefab they should be in there too,doing their zombie thing.
    I feel like if the developer cant make a properly functioning demo with all their experience, then how am i going to make their product work, and look good.
    Thanks and keep up all the hard work.
     
  30. RyanEarpGW

    RyanEarpGW

    Joined:
    Jun 12, 2014
    Posts:
    65
    @JBR games -
    Thanks, we are doing our best to get the remaining problems out of the way. Also we are currently working on a new demo scene that will do a better job of displaying all of Shooter AI's great features. In addition to that we will continue working on improving Shooter AI's core functions to create a truly epic AI solution.
     
    hopeful likes this.
  31. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    This.

    If an asset's showcase demo doesn't work properly, it's simply a shoddy product. I don't know how else to put it gently.

    Looking forward to seeing a new (and hopefully problem-free) demo :)
     
  32. GenOli

    GenOli

    Joined:
    Apr 21, 2013
    Posts:
    139
    Just tried 2.2, same issue.

    Copied the demo scene, swapped Team1 for the ZombiePrefab, set zombie tag and the enemy data tag to Team2.

    Zombie doesn't attack enemy, just moves around enemy.

     
  33. 99thmonkey

    99thmonkey

    Joined:
    Aug 10, 2012
    Posts:
    525
    How do i get the AI to register OnTriggerEnter? I have them patroling in and out of a trigger but nothing registers. My player and bullets register just fine.
     
  34. BuckeyeStudios

    BuckeyeStudios

    Joined:
    Oct 24, 2013
    Posts:
    104
    I would like to see a tutorial on how to use the free zombie using Mecanim. How to set it up from the begging as im having trouble. Thanks
     
  35. RyanEarpGW

    RyanEarpGW

    Joined:
    Jun 12, 2014
    Posts:
    65
    @GenOli -
    It seems to be a problem with our zombie prefab, we will fix it asap.

    @99thmonkey -
    Make sure that your colliders have a rigidbody attached to them.

    @dustinwloring1988 -
    Sure we can do that. It will take a while though as Nikita is gone for a couple of weeks.
     
  36. 99thmonkey

    99thmonkey

    Joined:
    Aug 10, 2012
    Posts:
    525
    @RyanEarpGW
    Actually, the problem is that Shooter AI characters don't have a rigidbody. As soon as I assigned one to the Root object (to the Zombie for instance), it triggered my object and my door opened when the Zombie got close.
     
  37. Pauloxande

    Pauloxande

    Joined:
    Feb 8, 2014
    Posts:
    110
    I am using the "AI" 2.2 but appears the same error

    Failed to call function Damage of class vp_FPPlayerDamageHandler
    Calling function Damage with no parameters but the function requires 1.
    UnityEngine.Component:SendMessageUpwards(String, SendMessageOptions)
    GatewayGames.ShooterAI.GatewayGamesWeapon:Fire() (at Assets/Shooter AI/Scripts/Weapons/Weapon Specific/GatewayGamesWeapon.cs:271)
    GatewayGames.ShooterAI.GatewayGamesWeaponManager:Fire(FireType) (at Assets/Shooter AI/Scripts/Weapons/GatewayGamesWeaponManager.cs:393)
    GatewayGames.ShooterAI.GatewayGamesWeaponManager:Fire() (at Assets/Shooter AI/Scripts/Weapons/GatewayGamesWeaponManager.cs:374)
    GatewayGames.ShooterAI.GatewayGamesBrain:TryFire() (at Assets/Shooter AI/Scripts/Brain/GatewayGamesBrain.cs:1062)
    GatewayGames.ShooterAI.GatewayGamesBrain:StateEngageExecutiveLogic() (at Assets/Shooter AI/Scripts/Brain/GatewayGamesBrain.cs:703)
    GatewayGames.ShooterAI.GatewayGamesBrain:StateEngage() (at Assets/Shooter AI/Scripts/Brain/GatewayGamesBrain.cs:539)
    GatewayGames.ShooterAI.GatewayGamesBrain:Tick() (at Assets/Shooter AI/Scripts/Brain/GatewayGamesBrain.cs:249)
    GatewayGames.ShooterAI.GatewayGamesBrain:Update() (at Assets/Shooter AI/Scripts/Brain/GatewayGamesBrain.cs:211)

    how do to it to do the animation hit when the shot pick it triggers the animation
     
    Last edited: Dec 21, 2014
  38. RyanEarpGW

    RyanEarpGW

    Joined:
    Jun 12, 2014
    Posts:
    65
    @99thmonkey -
    Does the zombie prefab actually work for you? As there have been multiple incidents of it not working.

    @Pauloxande -
    When does this error occur?
    Have you tried reimporting the package? Perhaps something went wrong during the import.
    Let me know if this fixes it for you, otherwise I'll look into it some more.
     
  39. 99thmonkey

    99thmonkey

    Joined:
    Aug 10, 2012
    Posts:
    525
    Yes, take a look at 8:09 on one of my videos (using 2.1, not 2.2 yet). The zombies, after my changes, work.

     
  40. RyanEarpGW

    RyanEarpGW

    Joined:
    Jun 12, 2014
    Posts:
    65
    @99thmonkey -
    First of all great job! But have you tried having the zombies fight against the AI's and not the player? There were some complaints about the Zombies not attacking the AI characters.
     
  41. 99thmonkey

    99thmonkey

    Joined:
    Aug 10, 2012
    Posts:
    525
    Yes, they fight each other. They don't attack that quickly, but they do attack each other.
     
  42. JBR-games

    JBR-games

    Joined:
    Sep 26, 2012
    Posts:
    708
    @99thmonkey
    Is this using mecanim? Walk Animations seem way off.

    @RyanEarpGW
    In version 2.2 im still having an issues with the demo where 1-3 members of the team on top run to the bottum left corner at the start of the match. But the battle between the AI that actually want a gun fight look alot better.

    Has your team thought about adding a layer mask to the gun script, I had my old chatacters setup with several colliders for different damage and points for body parts shot, plus a controller collider. So raycasts are hitting the controller and not each body part.
     
  43. 99thmonkey

    99thmonkey

    Joined:
    Aug 10, 2012
    Posts:
    525
    I use mecanim. I did not edit the walk anims. If you watch my videos you will see what i changed
     
  44. RyanEarpGW

    RyanEarpGW

    Joined:
    Jun 12, 2014
    Posts:
    65
    @JBR games -
    We are well aware of this issue and we are working on removing it with our new demo scene.
    Actually we have not thought of that yet but it sounds like a very interesting alternative.
     
    nikita68 likes this.
  45. MRxBIGxSTUFF

    MRxBIGxSTUFF

    Joined:
    Feb 28, 2014
    Posts:
    4
    Having trouble respawning my AI Characters. I am using the Clean up after death script with a respawn time of 5 secs but after the body is removed the respawn timer just goes on counting for ever so my AI never respawns. Any ideas why this is occurring and how to actually respawn characters? Thanks
     
  46. 99thmonkey

    99thmonkey

    Joined:
    Aug 10, 2012
    Posts:
    525
    Did you create a spawner? I normally create an Empty game object, rename it spawner, add the Shooter AI Generic Spawn Manager, add my prefab, add my tag, add the spawner to the team spawns.
     
  47. MRxBIGxSTUFF

    MRxBIGxSTUFF

    Joined:
    Feb 28, 2014
    Posts:
    4
    Thanks that worked great, Didn't even notice the Generic Spawn Manager my bad :)
     
    RyanEarpGW likes this.
  48. 99thmonkey

    99thmonkey

    Joined:
    Aug 10, 2012
    Posts:
    525
    yeah, i noticed that when i was making some how to videos.
     
  49. RyanEarpGW

    RyanEarpGW

    Joined:
    Jun 12, 2014
    Posts:
    65
    @Everyone -
    Happy new year from all of us here at Gateway Games!!
     
    Mayureshete, nikita68 and JBR-games like this.
  50. Karamasha

    Karamasha

    Joined:
    Jan 5, 2015
    Posts:
    7
    I really like how fast you reply to questions here and on mail:) nicely done guys keep up the good work!
     
    Last edited: Jan 6, 2015
    nikita68 and RyanEarpGW like this.