Search Unity

[RELEASED] Third Person Shooter Bundle

Discussion in 'Assets and Asset Store' started by Viniterra, Mar 17, 2020.

  1. Viniterra

    Viniterra

    Joined:
    Dec 4, 2014
    Posts:
    193
    Hello guys,

    I am pleased to announce a brand new package, for everyone who wants to create a third-person shooter:
    the Third Person Shooter Bundle.

    banner.png

    Get it now on the Unity Asset Store: Third Person Shooter Bundle

    This bundle contains the existing Cover + Shooting System, a professional cover shooter controller for your third-person game, and also features the brand new Enemy AI package, a full AI system for shooter enemy NPCs, with a plug-and-play, expandable FSM model. The bundle also comes with an exclusive scene, containing some extra shooter game specific features.

    For information upon the shooter controller features, please refer to the standalone package official topic:
    Cover + Shooting System - Third Person Shooter - Official topic

    For more info on the Enemy AI enemy NPCs package, please refer to the standalone package official topic:
    Enemy AI - Official topic

    Anyone will be able to upgrade from both standalone packages to the Third Person Shooter Bundle, and grant a discount on the second package full price.



    Tutorial: How to setup the third-person controller
    Tutorial: How to setup the enemy NPCs

    Tutorial: Mastering Enemy AI: Building Custom FSMs for NPCs

    For any support issues, to ensure the faster response, please use the official support channel:

    Support for the Third Person Shooter Bundle package

    This is the official forum for suggestions, comments, etc. Please fell free to provide any feedback.

    Thanks!

    UPDATE:

    We've just released a new video tutorial on creating custom Finite State Machines (FSMs) for hostage NPCs using our Enemy AI module of the Third Person Shooter Bundle. If you're interested in enhancing your game's AI, this video might be helpful.

    What You'll Learn:

    • Building a custom FSM for a hostage NPC
    • Creating states and transitions
    • Implementing actions to enhance your game's AI
    • Practical examples and demonstrations

    Watch the Video:

    New Tutorial Video: Mastering Enemy AI: Building Custom FSMs for NPCs



    Feel free to watch and share your thoughts or questions in the comments.

    Happy learning!
     
    Last edited: Sep 28, 2023
    Neviah, ikemen_blueD and RoyaleJoons like this.
  2. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    414
    Need melee
     
  3. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    414
    And grenades. Haha but i like the pack though. I like how simplified it is, easy to modify. Makes the package more versatile than most packs out there.
     
    Viniterra likes this.
  4. Viniterra

    Viniterra

    Joined:
    Dec 4, 2014
    Posts:
    193
    Thanks for the feedback. The player controller was designed in a way that the modularity makes it easy to expand. The melee module is on the roadmap to be constructed, also.
     
  5. Viniterra

    Viniterra

    Joined:
    Dec 4, 2014
    Posts:
    193
    The Enemy AI package, included in the Third Person Shooter Bundle, figures a FSM (finite state machine) AI model for the enemy NPCs (non player characters).
    The main decisions are based on tridimensional senses, like the view sense, the hear and focus, etc. They are basically defined by a radius and, if applicable, an angle (ex.: field of view angle for the view sense):

    upload_2020-3-17_16-18-37.png

    The following animations highlight some of the main states in the FSM. The patrol state is a clear alert level state, where the NPC guards a route or a fixed position:

    patrol.gif

    The search state is a warning alert state, where the NPC navigate to a suspicious position to investigate it:

    search.gif
     
    Last edited: Mar 28, 2020
  6. Viniterra

    Viniterra

    Joined:
    Dec 4, 2014
    Posts:
    193
    The take cover state is an engage state, in which the NPC seeks for a cover spot to protect itself from direct fire:

    cover.gif

    There is a chance (customizable) for the NPC to avdance to a cover there is near the player, defining a more agressive approach:

    advance.gif

    Finally, another enemy behavior that is important to highlight refers to the focus movements. This kind of behavior is triggered when the enemy is in close combat situation, making the NPC to focus on the target while moving, avoiding turning his back to the player:

    focus.gif
     
  7. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    414
    Thats cool, im probably gonna pick up the ai. If its built with the quality of the shooter i dont doubt it will be great.

    One thing i found is I dismantled most of the interactive weapon script, placed most of the functionallity on the player for it, and the player does a spherecast, gathers all the weapons and items, by tag, and distance, then the pickuo hud goes to the nearest. I found that with adding items such as ammo boxes. (And ammo types) having each weapon with thier own interactive sphere, i was picking up everything i was near. Which in my case, wasnt optimal
     
  8. Viniterra

    Viniterra

    Joined:
    Dec 4, 2014
    Posts:
    193
    The Enemy AI is already included in the Third Person Shooter Bundle. If you have acquired the Cover + Shooting System, you can now upgrade to the bundle, acquiring the AI pack at a discounted price, which is less than it's standalone value.

    About the script for picking weapons and items, it was created that way by design, to make the player acquire all items close to him, without the need of multiple pick actions.
     
  9. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    414
    beautiful, the pick up items, makes total sense, I had to change it for project requirements, and im not a coder, and it was still pretty easy for me to do because you laid out the scripts so well. very easy to work with
     
    Viniterra likes this.
  10. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    414
    one thing I did notice though, if you create more than 1 type of weapon, such as 2 types of pistols, and happen to stand next to them and pick them up. they conflict with each other in the scripts
     
  11. Viniterra

    Viniterra

    Joined:
    Dec 4, 2014
    Posts:
    193
    What do you mean by conflict? If they are the same type, but different models, only one of them will be picked. If they are same type and model, they are both picked and becomes one in your inventory.

    edit.: In fact, the ammo is filled when picking the same model, but the HUD is not refreshed. If you fire a single shot you can see the ammo update. I'll fix that, thanks.
     
    Last edited: Mar 18, 2020
  12. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    414
    oh maybe its something i changed then, but i found if they are the same model, it picks 1, but then the logic for switching weapons or shooting for it got screwed up. but it totally could be something i changed
     
  13. Viniterra

    Viniterra

    Joined:
    Dec 4, 2014
    Posts:
    193
    In any case the player picks both. If they are different, the first one is dropped and the second one goes to the inventory. If they ate equal, both are picked, occuping one slot only in the inventory, and the ammunition is filled.
     
  14. redoxoder

    redoxoder

    Joined:
    May 11, 2013
    Posts:
    74
    hello just buy the bundle
    test scenes and look very good asset
    but i need to use the ai only with my project who as already a third person asset
    but when i import the bundle in my project i have console error
    can you help me please :
    upload_2020-3-27_10-51-16.png
     
  15. Viniterra

    Viniterra

    Joined:
    Dec 4, 2014
    Posts:
    193
    Hi, thanks for the feedback.

    The location of the HealthManager script on the bundle is different from the standalone version of the Enemy AI package. Since we cannot put duplicated scripts, with the same namespace, in a Unity project, the script is originally located under the Cover + Shooting package folder.

    With the bundle, you must import that extra file, when using only the Enemy AI. Here is the location:

    upload_2020-3-27_18-54-54.png

    Please re-import the package, deselect all assets, and check only this file.
     
  16. redoxoder

    redoxoder

    Joined:
    May 11, 2013
    Posts:
    74
    hi thanks very much
    can you help me for the last error ?
    only appear when i imort the ai
    upload_2020-3-28_10-36-21.png

    ssets\Dias Games\Shooter\Scripts\InventoryData.cs(14,29): error CS0066: 'InventoryData.OnInventoryUpdate': event must be of a delegate type

    Found the error , conflict whit the two assets (shooter system and enemyAI)
    in action.cs of enemyAI
    remplace
    public abstract class Action : ScriptableObject
    by
    public abstract class ActionAI : ScriptableObject
    after
    remplace in all script the Action by ActionAI
    now no more errors.
    nice will test now
    :):)
     
    Last edited: Mar 28, 2020
  17. redoxoder

    redoxoder

    Joined:
    May 11, 2013
    Posts:
    74
    hi
    looking tuto Getting started with your Shooter Game - Enemy NPCs
    all seems to works too 20:33
    but at this my character enemy aim my player and return to idle and aim my player and return in idle ...in loop
    don't understand why ...
    any idea ??
    thanks
     
  18. Viniterra

    Viniterra

    Joined:
    Dec 4, 2014
    Posts:
    193


    As you noticed, the package you are trying to integrate with the Enemy AI also has a class named Action.

    I'll try to isolate the specific classes under the Enemy AI namespace to avoid that error. Thanks for reporting it.
     
  19. Viniterra

    Viniterra

    Joined:
    Dec 4, 2014
    Posts:
    193
    A fix to that issue has already been submitted. Could you contact me trough the support e-mail, so I can provide you an additional support on this matter? Thanks.
     
  20. satg

    satg

    Joined:
    Dec 23, 2016
    Posts:
    7
    Hi,

    Few pre-sale questions :

    1) Can we make AI act in a manner where they are patrolling (relaxed state) and if they see another dead AI, they become focused (aim state) and search for the player (random search)?

    2) Does this package have both AI waypoint system (We can build our own waypoints for patrolling) and state system (like behaviour designer)? Any screenshots for both - waypoints and state system?

    3) Does AI animation include death from angle of bullet hit - like sideways, front, back etc.?

    4) Can we change images of guns, text style of ammo, placement etc.?

    Also what is your support email? Couldn't find it anywhere.

    Regards,
     
  21. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    414
    Adding in directional hitting/deaths isnt hard to code in if its not there. Or use ragdoll. Any images from any packs ive seen is customizable, its just a image.
     
  22. Viniterra

    Viniterra

    Joined:
    Dec 4, 2014
    Posts:
    193
    Hello, thanks for your interest.

    1) Can we make AI act in a manner where they are patrolling (relaxed state) and if they see another dead AI, they become focused (aim state) and search for the player (random search)?

    You can easilly extend the FSM and create a Decision for that, transitioning to the search state in case it is true.


    2) Does this package have both AI waypoint system (We can build our own waypoints for patrolling) and state system (like behaviour designer)? Any screenshots for both - waypoints and state system?

    The waypoints are a list, customizable for each enemy via inspector. If by state system you mean a finite-state machine, so yes,the base of this AI is a FSM model, and it is easy to extend with more states/actions, and decisions/transitions. A next video tutorial will show how to extend it. Also, you will find a full diagram of the current FSM on the README file of the package.

    3) Does AI animation include death from angle of bullet hit - like sideways, front, back etc.?

    Not by animation, but a when a enemy dies, force is applied to the ragdoll, from the direction of the hit.

    4) Can we change images of guns, text style of ammo, placement etc.?

    Yes you can, all of that is fully customizable. The ones provided (textures, models, font, particle effects, materials etc.) was made for the example scenes and the tutorial.

    Hope it helps.
     
  23. Viniterra

    Viniterra

    Joined:
    Dec 4, 2014
    Posts:
    193
    Hi, it is already there. :)

    Even when the enemy dies, and the body is on the ground, you can see that force applied to the dead body. Take a look at the demo and check it for yourself.
     
  24. Viniterra

    Viniterra

    Joined:
    Dec 4, 2014
    Posts:
    193
    A day 1 patch is already online. It fixes (for the Enemy AI pack) some minor bugs regarding the enemy aim calibration, and also isolates scripts with common classes names under the Enemy AI namespace, to avoid conflicts.

    For those who already acquired, please update your packages.
     
  25. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    414
    Beauty, i had that issue, but havent had time to address it yet
     
    Viniterra likes this.
  26. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    414
    The only issue with ragdoll, is the physic engine cost cpu to run, so ragdoll is nice, and for many ppl is a common way to do deaths, but performance wise, isnt the best solution, i have the AI but havent played with it too much yet, i forget, are the limbs kninematic and swap to gravity on death? Or just use gravity entire time?
     
  27. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    414
    You dont happen to have any idea when melee would be a possibility eh? And or shotguns
     
  28. Viniterra

    Viniterra

    Joined:
    Dec 4, 2014
    Posts:
    193
    Since the ragdoll is needed to detect which member was shot, the entire ragdoll members are set to kinematic while the enemy is alive, easing the physics processing. Only when the enemy dies the health script enables them, so the gravity can make its job.
     
  29. Viniterra

    Viniterra

    Joined:
    Dec 4, 2014
    Posts:
    193
    A shotgun is more closer on plans than a complete melee system. But a simple close combat hit feature, like some shooters have, can be included too. The next add-on to be added is probably about explosives, grenades etc.
     
  30. satg

    satg

    Joined:
    Dec 23, 2016
    Posts:
    7
    Hi,

    any idea when the throwing action will be implemented? Also please make sure that instead of grenades stones can be thrown to distract enemies.

    Regards,
     
  31. Viniterra

    Viniterra

    Joined:
    Dec 4, 2014
    Posts:
    193
    Thanks for the suggestion. This can be achieved by using the AlertManagement, passing the position where the stone has gone.

    As said before, the next add-on to be added is probably about explosives, grenades etc.
     
  32. aldochamulo

    aldochamulo

    Joined:
    Jan 9, 2020
    Posts:
    6
    need help i followed the tutorial how to pick up gun and take cover.. but it's not working its's not picking up nor taking cover it just runs around and jump
     
  33. Viniterra

    Viniterra

    Joined:
    Dec 4, 2014
    Posts:
    193
    Hello, are there any messages displayed on the console?
     
  34. aldochamulo

    aldochamulo

    Joined:
    Jan 9, 2020
    Posts:
    6
    no messages
    it just walk pass the gun
     
  35. aldochamulo

    aldochamulo

    Joined:
    Jan 9, 2020
    Posts:
    6
    it displays the UI on the screen PICKUP
     
  36. Viniterra

    Viniterra

    Joined:
    Dec 4, 2014
    Posts:
    193
    You might have missed something on the tutorial. I’ve sent you a private message to help you with that.
     
  37. aldochamulo

    aldochamulo

    Joined:
    Jan 9, 2020
    Posts:
    6
    NullReferenceException: Object reference not set to an instance of an object
    CoverBehaviour.Update () (at Assets/TPS Bundle/Cover+Shoot/Scripts/PlayerScripts/CoverBehaviour.cs:89)
     
  38. Viniterra

    Viniterra

    Joined:
    Dec 4, 2014
    Posts:
    193
    please take a look at your private messages.
     
  39. aldochamulo

    aldochamulo

    Joined:
    Jan 9, 2020
    Posts:
    6
    i sent you a video of the game play
     
    Viniterra likes this.
  40. aldochamulo

    aldochamulo

    Joined:
    Jan 9, 2020
    Posts:
    6
    it didn't work i even tried redoing it with the model pistol from the TPS bundle and the cube example from the tutorial
     
  41. Viniterra

    Viniterra

    Joined:
    Dec 4, 2014
    Posts:
    193
    I have answered your e-mail.
     
  42. studentvz

    studentvz

    Joined:
    Dec 14, 2014
    Posts:
    149
    What about performance, on mobile exactly? Is it optimized, do you use pooling, etc?

    And about the Unity version, does it support Unity 2018?
     
    Last edited: Apr 23, 2020
  43. Viniterra

    Viniterra

    Joined:
    Dec 4, 2014
    Posts:
    193
    The scenes run normally on mid-end or better spec mobile devices (tested with 3-4 years devices).

    There is no pooling. The root enemy objects stays in the scene as dead bodies, although not needed assets are removed from it when they die.

    For the Third person Shooter Bundle package, it supports Unity versions 2019.2.21 or higher (this info is always present in the package page).
     
  44. studentvz

    studentvz

    Joined:
    Dec 14, 2014
    Posts:
    149
    The pooling of things that are instantiated and destroyed, for example, bullets, effects, etc.

    Why are you limited to Unity 2019? Many developers still use Unity 2018, even Unity 2017.
     
  45. Viniterra

    Viniterra

    Joined:
    Dec 4, 2014
    Posts:
    193
    The instant bullet effects like smoke, sparks, shot tracer, are particles that auto-destroy after they end. The exception is bullet holes, for the player controller, that has a pooling technique to re-use the oldest ones on new shot places.

    The package was initially created using 2019, which was the latest version by the time. But I am considering porting the asset to the latest LTS version indeed, thanks for the suggestion.
     
  46. satg

    satg

    Joined:
    Dec 23, 2016
    Posts:
    7
    Hi,

    Got your asset pack two weeks back. Nice job on this. Tried the main demo scene and everything works properly. I do have few questions though :

    1) How do I change the camera angle with which the player is viewed? Like I want the camera to follow the player but view him from z offset of -8 to -10 and y offset of 4-5 which it does but it still looks straight. I want the camera to rotate little bit so that it looks at the player and not in his direction. Hope you get it.

    2) Can I change bullet trails or add them? I didn't see the option anywhere. I want some yellow flashy trails for bullets.

    Regards,
     
  47. Viniterra

    Viniterra

    Joined:
    Dec 4, 2014
    Posts:
    193
    Hello,
    Thank you for your acquisition and for the feedback.

    1) I didn't get well what do you intent... Assuming you are talking about the third person shooter scene, you can modify the camera position and focus under the Third Person Orbit Cam script, attached to the camera.

    To modify the pivot point it focus on, you must change the Pivot Offset parameter. The pivot is calculated starting from the player position (0,0,0).

    To modify the camera orbit position, which is given by the offset related to the pivot point, you must modify the Cam Offset parameter.

    The Aim Behaviour action of the player also has particular values for these 2 parameters, which is activated when you aim with the player.

    2) The bullet trail is a particle prefab.

    For the player, it is the tracer particle, inside the ShotEffects prefab:

    Assets/TPS Bundle/Cover+Shoot/Prefabs/ShotEffects.prefab

    For the enemies, it is here:

    Assets/TPS Bundle/EnemyAI/Prefabs/tracer.prefab

    It runs over the positive Z axis.

    If you believe the current tracer an smoke trail effect for the shot particle is not visible enough, you can modify it, for example, by adding more smoke particles to the trail, or even replace it by new particle, like a laser shot, or anything else you want.
     
  48. satg

    satg

    Joined:
    Dec 23, 2016
    Posts:
    7
    Hi,

    regarding the first question, check the attached image.

    When I change pivot offset and cam offset I get 1 and 2 as result. The camera still looks in same direction.

    I want number 3 where the camera tilts from a distance and focuses on the player, hence the need to change the angle or something similar.

    How to achieve this result? Like what if I want the camera to see the player from vertically top as in top down shooter?

    Regards,
     

    Attached Files:

  49. satg

    satg

    Joined:
    Dec 23, 2016
    Posts:
    7
    also another question : How do I start a game with the player already holding a weapon. Like begin with him holding a rifle.

    Regards,
     
  50. Viniterra

    Viniterra

    Joined:
    Dec 4, 2014
    Posts:
    193
    The Bundle scene camera script is a third person camera that orbits the player, it is a different design from what you are looking for.

    Why not use the the camera script from the TopDown scene instead? What you are looking to is different from it? I didn't get it well..