Search Unity

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
    Pool Boss right? It doesn't play well with TSAI. I tried to get it working, but never could.
     
  2. f1chris

    f1chris

    Joined:
    Sep 21, 2013
    Posts:
    335
    I'm having a little strange issue :

    My AI is working fine with pretty much every features, cover, parkour, they can't see mee through walls so my layers are fine. But once an AI spotted me they start shooting at me and even if I'm moving into another room they'll keep shooting at me through the walls (bullets stopped by the walls so bullet layer is ok). When hidden in a room next to them they'll point exactly at where I am when moving around and keep shooting. Eventually they'll enter the room to engage a direct fight as expected.

    This is happening only once they spotted me. If they're passing in the corridor in patrol like mode and I'm a room next to them, everything is ok. Only once fight is engaged.

    I have no AI set to Search. Most are Tactical/Wander. Some are Skirmish/Wander and Tactical/Patrol.

    Any idea ?
    thx
     
  3. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    If you're close enough to the wall that's blocking their LOS, they'll shoot anyways. This is to create a suppressing fire behaviour. There's a variable in the gun script that lets you control this distance, although I'm not at my computer and can't remember it's exact name.
     
  4. f1chris

    f1chris

    Joined:
    Sep 21, 2013
    Posts:
    335
    Oh then maybe playing with that variable will do the trick. I understrand the logic of the suppressing fire but they're acting like they seeing me. I would understand if they shoot in the direction of my last known location but they're pointing exactly at where I am and turning and adjusting they're aim as soon as I move.

    I'm not at my computer either to find out what that variable is but when you have a few it would be appreciated if you can tell me what is that variable.

    thx
     
  5. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    As long as they are engaged in their combat behaviour, that will happen (with a few exceptions). There's a possibility I may change this in future updates though.
     
  6. musolo

    musolo

    Joined:
    Sep 12, 2014
    Posts:
    238
    Do i have to fill all additional animations or just the ones i want? Coz i have not filled them(all diagonal walks and runs are empty along with vault, stagger and leap ) all and my agent goes wierd (falls down on his groin with his legs following him like wedding limo cans)
    What have i done wrong?
     
  7. RangePlusOne

    RangePlusOne

    Joined:
    Dec 6, 2014
    Posts:
    123
    Damnit! So manual wave creation it is I suppose for now... so be it... Jedi.... :oops:
     
  8. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    If you don't add the animation for a feature, you'll have to disable the feature. However, it could just be that the animation isn't compatible with your model for whatever reason- which is a bigger problem, and unfortunately one that must be resolved in the modelling app of your choice.

    I spent far too long trying to find a relevant Star Wars image. :)
     
    RangePlusOne likes this.
  9. musolo

    musolo

    Joined:
    Sep 12, 2014
    Posts:
    238
    So i have agents that i want to go through patrol points with calm walk animation in unalerted state and after they will be alerted by something then go to more intense animations. But when i push play button they go to run animation.
    How to make them walk slowly(play walk with rifle animation clip ) that is with theyr weapons pointed down?
    Idle Speed field in Base Script conflicts with Max Movement speed and Anomator speed fields of Animation Script:/
    What should i do to achieve correct walking appearance?
    Thanks.
     
  10. RangePlusOne

    RangePlusOne

    Joined:
    Dec 6, 2014
    Posts:
    123
    Im having an issue with grenade explosions (from the players side) I've created a rocket launcher, I want to launch the grenade 2 prefab, but when I spawn it in the scene the ball will roll on forever and never explode? I don't know what's up - the AI can hurl tons of grenades and they explode just as they are supposed to work totally fine, but I can't seem to get mine to blow up, at all. Any ideas?
     
    Last edited: Oct 26, 2016
  11. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    It seems like you did not add an idle animation to the animation controller.

    There's a method called when the agent actually lets go of the grenade, without this, it won't work. Use the basic bullet script instead; look to the included rocket prefab for set-up.
     
    RangePlusOne likes this.
  12. RangePlusOne

    RangePlusOne

    Joined:
    Dec 6, 2014
    Posts:
    123
    You da man!!
     
    squared55 likes this.
  13. googlebac

    googlebac

    Joined:
    Feb 1, 2015
    Posts:
    56
  14. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    I'm guessing that you didn't set the rigidbodies in the ragdoll to be kinematic. If you don't, well... I've seen worse.
     
    Last edited: Oct 2, 2017
  15. googlebac

    googlebac

    Joined:
    Feb 1, 2015
    Posts:
    56
    ahh I see. So the rigidbodies are all set up properly but the linked components in the base script had gone blank. pretty sure I did that by accident earlier today when pasting component values. All working now.

    "HEY! YOU GET BACK HERE YOU'RE SUPPOSED TO BE DEAD!?"
     
  16. googlebac

    googlebac

    Joined:
    Feb 1, 2015
    Posts:
    56
    That basically set all the rigidbodies to not kinematic on start.
     
  17. googlebac

    googlebac

    Joined:
    Feb 1, 2015
    Posts:
    56
    Is there a way to make it so an agent always knows where you are and is engaged? I have a sniper in the distance that sometimes doesn't notice me.
     
  18. davidhughes3d

    davidhughes3d

    Joined:
    Nov 30, 2012
    Posts:
    29
    Can non-biped (humanoid) creatures be used with Tactical Shooter AI? are there options for more than one melee animation also?

    [edit] found one answer on page 20

    "For almost the entirety of development my rig was set to be generic, so I'd say yes, barring some extreme circumstances with your model (like it being a snake, or something). "
     
  19. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    Try increasing their FOV in the target script.
     
  20. unity3d-studio021

    unity3d-studio021

    Joined:
    Dec 22, 2015
    Posts:
    8
    ns-arsen said:
    On default RFPS there is bullet time effect when NPC is shot in head, how to achieve thins on my models or paragon NPCs
    I'll look into figuring this out.

    Is there something on this I tried quite a lot of stuff but failed :eek:
     
  21. RangePlusOne

    RangePlusOne

    Joined:
    Dec 6, 2014
    Posts:
    123
    Hey Squared, it doesn't look like any serious wave spawning techniques here in this pack play kindly with the TSAI. Do you have any recommendations on the Asset Store? I'm soooo close to having a prototype ready, I just need to find a pack that can do wave / elimination trigger spawning methods.
     
  22. unicat

    unicat

    Joined:
    Apr 8, 2012
    Posts:
    425
    Is it possible to drop a weapon, healthpack or ammo after an agents death ?
     
  23. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    I have not found a way to make this work yet.

    Unfortunately, I do not. I always just rolled my own with Instantiate and no pooling of any description.

    You would create a script, attach it to the agent's gameobject, add the method OnAIDeath() and then instantiate a drop prefab from inside that method.
     
    Last edited: Oct 29, 2016
  24. unicat

    unicat

    Joined:
    Apr 8, 2012
    Posts:
    425
    Getting this error after adding some cover nodes in the scene:

    UnityException: Tag: AI Controller is not defined.
    UnityEngine.Component.set_tag (System.String value) (at C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineComponentBindings.gen.cs:177)
    TacticalAI.ControllerScript.Awake () (at Assets/Tactical Shooter AI/Tactical AI/Csharp/AI Behaviour Scripts/ControllerScript.cs:34)

    The tag AI Controller is not in my taglist. Must i add this manually?
     
  25. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    Yes, you should. Also make sure that you've added an AI Controller script to an empty gameobject to your scene.
     
  26. sashahush

    sashahush

    Joined:
    Sep 5, 2012
    Posts:
    75
    Hi there, quick question. Is it possible for the animations to use root motion displacement instead?
     
  27. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    Unfortunately, that is not currently possible.
     
  28. RangePlusOne

    RangePlusOne

    Joined:
    Dec 6, 2014
    Posts:
    123
  29. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    If it's mecanim humanoid, I'm going to say probably, but having used neither, I can't say for sure. This is less a TSAI issue and more a generic Unity Animation issue.
     
  30. googlebac

    googlebac

    Joined:
    Feb 1, 2015
    Posts:
    56
    Hey Squared how are your own projects going?
     
  31. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    Not as well as I'd like. :)
     
  32. wheelbarrow

    wheelbarrow

    Joined:
    Sep 12, 2011
    Posts:
    177
    Hi squared, I bought your asset a few weeks ago, and finally started using it last night, and I gotta congratulate you on a terrific asset - your ai actually works straight out of the box, unlike a few others on the store :) I have found what I think is a bug.

    I managed to kill an ai as he was mid-throw with his grenade (it had just left his hand), and as he dropped dead to the ground, the grenade stopped moving and hung nicely in the air above and in front of him, and stayed there until I stopped testing the scene. I assume this is not intended, so I figured I would let you know, if some one else hasn't pointed it out already. It's only happened the once, I guess I killed him at just the wrong time to cause this reaction. Again, thanks for a great asset.

    Cheers.
     
    squared55 and hopeful like this.
  33. musolo

    musolo

    Joined:
    Sep 12, 2014
    Posts:
    238
    How about a TSAI webinar guys?
     
  34. musolo

    musolo

    Joined:
    Sep 12, 2014
    Posts:
    238
  35. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    Darn, I though I'd fixed that. I'll look into it.

    Unfortunately, I currently have neither the time nor the means. :(
     
  36. musolo

    musolo

    Joined:
    Sep 12, 2014
    Posts:
    238
    squared55
    For how long you are doing code? Did you start with Unity or you had previous experience in other language(s).
    it`s interesting to know your background) What`s our advice on most optimal learning routes?
    Did you do small games or projects before doing stuff big time?
    i`ve been doing few tutorial games, wached a lot of beginner stuff and know about basic C# concepts in general.
    I can outline algorithm for given simple task but when i start to code i do tons of mistakes and my sintax sucks.
    To wright small chunk of code it will take me few dozen fruitless attempts before i start to search all over internet for similar stuff, and i end up copy pasting stuff fogether for end result.
    i tried Unity scripting manual but it`s dry like hell and things ar put there in abrupt and incomprehensible way for average newby like me :\
    Could you elaborate on this learing issue?
    Would be great to hear some wisdome from pro like yourself.
    Thanks.
     
  37. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    I've been programming for... 8 years? More? I honestly can't remember how long I've been coding at this point. However, it's worth noting that I had Unity gameplay scripting down in a year or so. I started coding with Unity, and really only learned when I needed to do stuff that wasn't covered by tutorials/ Modifying a variable, here, adding a chunk of code there, and so on and so forth.

    The scripting manual won't do you much good if you don't know how to code in the first place, it's basically just a reference for all of the pre-made methods and classes, not a coding tutorial.

    Don't copy/paste stuff, if you do that, you'll never learn. At the very least, type out the duplicated code yourself. On a related note, these seem like good introductions to coding.: https://unity3d.com/learn/tutorials/topics/scripting

    I wouldn't consider myself a pro, there's far better programmers out there than me. :)
     
    Last edited: Feb 28, 2017
  38. id0

    id0

    Joined:
    Nov 23, 2012
    Posts:
    455
    Ok I want some team (say Team ID 2) change team parameters in runtime (add a enemy id or remove... maybe Player shot a member of the team and turned into an enemy).How can I do this?
     
    Last edited: Nov 13, 2016
  39. RangePlusOne

    RangePlusOne

    Joined:
    Dec 6, 2014
    Posts:
    123
    Hey Squared, are you planning on adding a "stealth" kind of function, where enemies have a chance of seeing/not seeing you? So if I'm hiding in a bush/tall grass there's a volume over that bush that increases the chance of not being spotted. I know it's probably like, SUPER intense to add but I think it would add this whole new dimension to your pack, thus amping up the price for add-ons? Just a thought/suggestion.
     
  40. 99thmonkey

    99thmonkey

    Joined:
    Aug 10, 2012
    Posts:
    525
    Like this??
    http://www.opsive.com/assets/UFPS/forum/index.php?p=/discussion/2477/go-invisible-stealth-mode/p1
     
  41. RangePlusOne

    RangePlusOne

    Joined:
    Dec 6, 2014
    Posts:
    123
  42. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    Changing the AI's target teams should be as simple as modifying the enemy array. Moving the AI to a brand-new team (for target purposes) will involve adding a target script to the object. If you know what teams will be used beforehand, you can add this in the editor and modify the priority. Agents should ignore any targets with a priority below 0.

    This might make it in at some point. I'm not entirely sure how difficult it would actually be to implement.
     
    Last edited: Nov 15, 2016
    id0 likes this.
  43. id0

    id0

    Joined:
    Nov 23, 2012
    Posts:
    455
    But how can I change priority in runtime? When i try change it in editor (in Play mode) nothing happen. What should I do?

    (I got that, just add new target script on Player.) But how can I change target script to whole team?Because sometime it will be many teams on level.
     
    Last edited: Nov 15, 2016
  44. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    If you need to change it for multiple agents, I imagine you'd just use a loop to cycle through each one.
     
  45. Arganth

    Arganth

    Joined:
    Jul 31, 2015
    Posts:
    277
    Can the asset be easily integrated with TPC from opsive?
     
  46. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    I haven't done it myself, nor do I offer official support.

    However, some people (namely, @RoyalAllen) seem to have integrated the two packages into each other. :)

     
    Last edited: Nov 18, 2016
    Arganth likes this.
  47. emperor12321

    emperor12321

    Joined:
    Jun 21, 2015
    Posts:
    52
    Do you have a roadmap for the asset going forward?
     
  48. papathor

    papathor

    Joined:
    Oct 8, 2012
    Posts:
    41
    Hey Squared, I'm having a hard time getting your asset to work with a different model. I sent you an email to the address listed in your Unity vendor profile, please let me know if you don't see it. Thanks!
     
    squared55 likes this.
  49. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    Not at the moment, no.

    I think this was resolved; just double-checking that it was, indeed, you.
     
    Last edited: Nov 22, 2016
  50. papathor

    papathor

    Joined:
    Oct 8, 2012
    Posts:
    41
    Yup, that was me, thanks again!

    I want to integrate TSAI with the A* Pathfinding Project since I'm doing procedural map generation. I've seen a couple other posts in which people did the same. How big of an undertaking is this? Is there any extant code anyone could share on this? Or just some tips on how best to go about integration would be great.
     
    Arganth likes this.