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

Tactical Shooter AI - Asset Store Pack

Discussion in 'Works In Progress - Archive' started by squared55, Mar 2, 2015.

  1. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    Submitted a new version to the store with the sound and melee system bug fixes.
     
    radiantboy likes this.
  2. Tinjaw

    Tinjaw

    Joined:
    Jan 9, 2014
    Posts:
    518
    Negative. I am trying to use the animations from the soldier.
     
  3. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    Well, that's the problem! You'll need to make a new animation controller with the new animations. The soldier's animations will only work with the soldier as it is a generic rig.
     
  4. Cihan-Dogan

    Cihan-Dogan

    Joined:
    Nov 8, 2015
    Posts:
    2
    When do you think the new update will be available on the store? I've checked and it still shows me the v1.0.
     
  5. Tinjaw

    Tinjaw

    Joined:
    Jan 9, 2014
    Posts:
    518
    I guess this is where my understanding of animations breaks down. I thought once a bidped model and biped animations were imported into Unity, that you could mix and match. So, do I need to learn how to make my own animations?

    Related: Since this is going to be a Zombie, as compared to a rifle-armed Zombie, can I get away with leaving most of the animations blank? Since it will basically be walk and attack.
     
  6. Tinjaw

    Tinjaw

    Joined:
    Jan 9, 2014
    Posts:
    518
    There is no way of telling. It can take a day or two weeks. It isn't up to the developer, but up to the staff of the asset store.
     
  7. Cihan-Dogan

    Cihan-Dogan

    Joined:
    Nov 8, 2015
    Posts:
    2
    Ok. Thanks.
     
  8. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    Unity supports animation retargeting, but the rig has to be humanoid - and by that, I don't just mean bipedal, but it needs to fit some criteria and be marked in the import settings as a humanoid rig.

    Yep. If the wizard says you need an animation, just put in a similar animation as a placeholder. And wait for the update to come out, or else your zombies will only be able to attack once.
     
  9. Beloudest

    Beloudest

    Joined:
    Mar 13, 2015
    Posts:
    247
    On the demo scenes are the soldiers meant to all huddle up in a group. It seems like they are really terrible shots and cant kill each other correctly, your online demo does not do this? Eventually they die but it's just silly.
     
  10. Beloudest

    Beloudest

    Joined:
    Mar 13, 2015
    Posts:
    247
    Actually they don't die, bugged out spraying guns and no kills. I've done nothing but import it all. On OSX.
     
  11. AGaming

    AGaming

    Joined:
    Dec 26, 2013
    Posts:
    103
    The same thing is happening in the Android&iOS. The solution to this problem?
     
  12. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    I'm pretty sure its an issue with the layermasks. The layermask on the scene's ControllerScript needs to include the layer that your level parts are on. Without that they don't find cover and as such default into charging the enemy at which point everything descends into a massive mess. You also need to have the layermasks on the bullet prefabs include the layers that your level parts and your characters are on. That's why they can't seem to hurt each other- because the bullets are going right through their targets.

    Did you import it into an empty project, or one with stuff already in it?

    I'll double check when I get to my computer.
     
    Last edited: Nov 10, 2015
  13. Beloudest

    Beloudest

    Joined:
    Mar 13, 2015
    Posts:
    247
    No loads of stuff in the game already, ok your suggestions are fair. I will RTFM and check the layers but I would assume all would work on your Test Scene out of the box. Thanks, will let you know. It works on your demo so I'm sure it's fixable.
     
  14. Beloudest

    Beloudest

    Joined:
    Mar 13, 2015
    Posts:
    247
    I see this error, I have no idea what it means yet. Its just a warning.
    GI output for inputsystem: 7fbad81d4fe389ece7a8311097e668d7 (53b799c1bfaa10f8e2c10154dacef0a7) is missing.
     
  15. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    You may need to change the layers of the level part objects themselves as well. For all we know, they could now be considered to be on the same layer as the bullets or something.

    The problem is that I don't want Paragon AI to go overriding people's project settings just to accommodate the demo scenes.

    I have no idea what that means, I've never seen it before in my life, lol. I'm gonna take a wild guess and say it's regarding the lightmapping, and re-baking should make it go away.
     
    hopeful likes this.
  16. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    OK, just checked on a completely blank project, and I'm convinced it's an issue with the layers. It did work out of the box, but if I set all the layermasks on the Controller and the bullets to nothing, then I get the same problem.

    (BTW, the Controller script is on the C#_CoverNodes object in DemoScene2)
     
  17. PicturesInDark

    PicturesInDark

    Joined:
    Jun 13, 2013
    Posts:
    89
    Y es, that was the problem with dinamic cover, a very big terrain. In shorter terrain there is no problem.
    Another cuestion, how I made to agents don't come to my player backwards?, I have notice sometimes happens, when are ver y closed then turn to my player.

    Regards
     
  18. Tinjaw

    Tinjaw

    Joined:
    Jan 9, 2014
    Posts:
    518
    I'm pretty sure this isn't a Paragon AI issue, but just a lack of my knowledge about animations. I have attempted to make my own Zombie AI character. I have created an agent, but when the agent moves, the animation also moves the agent. This makes the model move out in front of the agent's transform. Then when it loops, it snaps back to the transform. Here is a video.

    https://db.tt/O2vhvE1Y

    I don't know what I need to do to correct the problem. Any suggestions?

    Additionally, since my zombie is melee only, it has no weapon. I get an error from the agent.

    UnassignedReferenceException: The variable bulletSpawn of GunScript has not been assigned.
    You probably need to assign the bulletSpawn variable of the GunScript script in the inspector.
    ParagonAI.GunScript.Awake () (at Assets/Paragon Shooter AI/Paragon AI/Csharp/AI Behaviour Scripts/GunScript.cs:111)

    The problem is that I don't have weapon, thus no bulletSpawn. And I don't want/need one.
     
  19. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    New update is out!

    Try updating to the latest version, and if the problem persists, can you post a screenshot?

    Disable root motion.

    Remove the agent's GunScript.
     
  20. Tinjaw

    Tinjaw

    Joined:
    Jan 9, 2014
    Posts:
    518
    @squared55

    Thanks. Removing the gun script worked.

    Apply Root Motion is already disabled.
     
  21. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    Sounds like an issue with the animation itself. You may have to manually edit it.
     
  22. dizzymediainc

    dizzymediainc

    Joined:
    Apr 6, 2014
    Posts:
    426
    Your asset looks awesome :) I am looking into purchasing this and was wondering, does the package come with an example scene with UFPS setup already?
     
  23. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    There is a bit of set-up required for UFPS, but it's all outlined in the manual. However, I can't put a pre set-up UFPS controller in the demo scene in because I don't think the UFPS developer would look too kindly on me selling his asset.
     
  24. dizzymediainc

    dizzymediainc

    Joined:
    Apr 6, 2014
    Posts:
    426
    Well you could actually have a scene setup but not include UFPS in the package, an import of UFPS before or after importing your asset would fix anything missing :)
     
    99thmonkey likes this.
  25. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    It more-or-less already is, but you do need to change some things (layers, UFPS settings, etc). Making it so that the only step is importing UFPS is impossible as I need things to work for people who don't use UFPS. Again, everything's in the manual. :)
     
  26. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,633
    Just upgraded, seems a little better although my guys still run right up to me and start shooting my feet, been through so many options but cant seem to find a way to stop that yet.
     
  27. PicturesInDark

    PicturesInDark

    Joined:
    Jun 13, 2013
    Posts:
    89
    Hi newly,
    The agents hit (doing melee) my player through walls. The bullets goes through walls. I have put everything as layers for bullets and I have also put bullet force to 0 but still bullets hit muy player through walls.
    How to avoid it?
    Regards
     
  28. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    If they are supposed to take cover, make sure that you have set the Controller Script's layermask to include your level parts, and the agent is set to "Tactical." You will also need to enable dynamic cover for your agent or make a cover map.

    If not, keep messing around with the settings and the positions of your target nodes. :)

    I haven't actually implemented melee being stopped by walls yet. However, decreasing the melee range should help.

    It sounds like the bullet spawner of your agent's gun is clipping through the wall. Either pull it back, or increase the "agent radius" setting when baking the navmesh (this should also help with the melee problem).
     
  29. PicturesInDark

    PicturesInDark

    Joined:
    Jun 13, 2013
    Posts:
    89
    In the case of bullets, agent is far away from wall. So it mustn't be clipping. I see bullets traspassing a little the wall. Damage only happens if player is very close to wall.
    I will check static of wall. Thanks for your support
     
  30. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    Hmm. Maybe it's the player doing the clipping, then?
     
  31. PicturesInDark

    PicturesInDark

    Joined:
    Jun 13, 2013
    Posts:
    89
    Yes, that was the problem. How to avoid hands and weapon in ufps goles through walls?
     
    squared55 likes this.
  32. PicturesInDark

    PicturesInDark

    Joined:
    Jun 13, 2013
    Posts:
    89
    Solved, it was a capsule colider I added as a proof to UFPS player. I forget to remove.
    Thank you
     
    squared55 likes this.
  33. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,633
    OK my guy doesnt shoot my feet now :) I made his target transform his neck and assigned that also to "my los target". And my walls were on the wrong layers so he no longer sees me through them :D

    Now im trying to get a guy to patrol, he kind of follows the path but he sort of takes shortcuts between nodes missing some out entirely, I have been trying to get him to go up a ramp and around a corner but once he gets to the top of the ramp he seemingly ignores the nodes and tries to turn the corner and gets stuck causing him to walk and stop walk and stop until he sort of gets close to another node and then goes to it. So it sort of works but it seems like it has some problems, or maybe there is a trick to it. I have show path patrol clicked and it all looks right.

     
  34. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,633
    I have also found before he spots me and is wandering he moves forward and stops, forward and stops, in tiny increments, looks very unnatural, how do I get him to simply walk, he animates fine once he sees me. Also do the AI react to sound? Doesnt seem too, would be cool if they came running when they heard a gun shot or window break etc or grenade.
     
  35. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,633
    Is there a way to turn off the agents and back on again without them stopping working? I have a script that disables my agents until there are required but then when they are turned back on they dont move around properly anymore, perhaps I have to call some sort of initialisation routine again?
     
  36. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    Decrease the closeEnoughToPatrolNode value.

    Try increasing the wanderDistance value and the distToChooseNextWanderPoint value. And there is a sample script that makes sounds that are dectctable by the AI, or you can call a method in the Controller.

    I'll look into it. In the meantime, is there any reason why you can't just instantiate the agents as needed?
     
  37. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,633
    not really no, im mixing adventure creator (in order to do cut scenes) so I want to turn them on and off, but if theres a programmatic way it may work fine. Thanks for other tips!..

    In my cut scenes I will show the AI doing cool anims, but they will all be adventure creator people really, then when cut scene ends ill swap them all in for real AI who will hunt my player. But it seems that in order to turn something on you must have grabbed its game object already, turned it off, and use the reference to turn it back on, which is where my guys stop working.
     
  38. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    I'll look into it, but in the meantime, 2 things:

    1). It honestly sounds to me like you could replace turning the agent on/off with instantiating it. It should be easy to write a short script that would transfer any unique data (health, patrol nodes, etc).

    2). You disabled both the ragdoll AND the base, right? They unparent from each other at runtime, so you would need to disable both no matter what. If I had to guess, you shut the ragdoll off, but the base kept on going.
     
    Last edited: Nov 15, 2015
  39. ToujoursFrais

    ToujoursFrais

    Joined:
    Mar 29, 2015
    Posts:
    6
    "Note that upon importing Paragon AI to a UFPS project Unity may randomly swap out animations in the default controller. You will have to manually replace them, if you want to use the default animation controller."

    How does one go about this exactly?
     
  40. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    It's just like any other animation controller. Open it up, and then look through each of the states. When you find one with an animation that is not from Paragon AI, just replace it with an appropriate one that is.
     
    ToujoursFrais likes this.
  41. PicturesInDark

    PicturesInDark

    Joined:
    Jun 13, 2013
    Posts:
    89
    Hi newlyI have been trying this night to solve this. The Paragon AI agents shoot to my UFPS conroller but to the foot. If there is a wall of une meter tall, the shoots never hit my player, because allways are hitting lower part of the wall.
    Anyway to solve? I have tried mor angle to shooting in accurancy and no luck
    Regards
     
  42. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    Try attaching your player's TargetScript to the camera and not the UFPS player.
     
  43. PicturesInDark

    PicturesInDark

    Joined:
    Jun 13, 2013
    Posts:
    89
    If I do that, to FPSCamera, the agents doesn't see my player
     
  44. PicturesInDark

    PicturesInDark

    Joined:
    Jun 13, 2013
    Posts:
    89
    I have also tried WeaponCamera and no luck
     
  45. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    Did you make sure that your Controller's layerMask does NOT include the layer that your player is on?
    If it still doesn't work, put it on a completely separate empty gameObject that is a child of the UFPS player and move it around until they start shooting at the place you want.
     
  46. PicturesInDark

    PicturesInDark

    Joined:
    Jun 13, 2013
    Posts:
    89
    Yes, controller layermask not contains localPayer where my player is. I will try empty gameobject newly and targetscript to this, newly, because I remember i tried somethin like this with no luck. I will say you. Thank you very much for your support.

    Other possibility can be in targetscript of the agents a highther position as radiantboy?
     
  47. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    What I would do is put it on the Camera, and then disable every layer. Then only add the layer that your level parts are on. And double check to make sure there isn't some collider that is blocking their view.
     
  48. PicturesInDark

    PicturesInDark

    Joined:
    Jun 13, 2013
    Posts:
    89
    ok, it sounds promising
     
  49. PicturesInDark

    PicturesInDark

    Joined:
    Jun 13, 2013
    Posts:
    89
    Negative. Putting FPSCamera in TargetScript and excluding FPSCamera from Controller makes melee agents not attack and shoots are correct but doesn't hit player. I think is because UFPS creates at runtime a collider called "Trigger" around upper part of player.
    I have tried a emptyobject and same problem
     
  50. ToujoursFrais

    ToujoursFrais

    Joined:
    Mar 29, 2015
    Posts:
    6
    I over complicated this big time. It wasn't until you said "not from Paragon AI" it clicked and it was such a simple fix.

    ** If anyone else wonders the simple way is to open to unity editors one with UFPS & Paragon AI then the other Paragon AI only and go through each animation on the animator window and fix it in no time.
     
    Last edited: Nov 15, 2015
    squared55 likes this.