Search Unity

[RELEASED] TPSA - Third Person Shooter System (template)

Discussion in 'Assets and Asset Store' started by Stiffx, Jan 24, 2015.

?

What additional pack would you like to see in TPSA?

Poll closed Apr 1, 2015.
  1. Enemy AI Shooter

    44.4%
  2. Friend AI (like sherry from Resident evil 4)

    55.6%
  1. Stiffx

    Stiffx

    Joined:
    Oct 27, 2014
    Posts:
    455
    ;)
     
  2. Rose-Remnant

    Rose-Remnant

    Joined:
    Nov 14, 2012
    Posts:
    123
    just posting this here as I am proud of this in game menu I made, I think it fits well with this game type.
     

    Attached Files:

    Stiffx likes this.
  3. Rose-Remnant

    Rose-Remnant

    Joined:
    Nov 14, 2012
    Posts:
    123
    let me know if you are interested in seeing the code for the menu
     
  4. Hammod

    Hammod

    Joined:
    Oct 1, 2014
    Posts:
    5
    Hi,
    I am setting the fire type to Physics , but now whatever I do the player is shooting him self with his pistol! I tried to change the x,y,z,w variables in the TPSA_Aim_Controller for the right hand but nothing worked, am I missing anything ?
    also I am setting the physics fire object position to the right hand , is this true ?
     
  5. Stiffx

    Stiffx

    Joined:
    Oct 27, 2014
    Posts:
    455
    Take a look at the layers, TPSA_WeaponController ValidLayers and do not select the player's layer
     
  6. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    Is 1.3 still the most current or did I miss a new version announcement in here somewhere?
     
  7. Stiffx

    Stiffx

    Joined:
    Oct 27, 2014
    Posts:
    455
    No you didn't, I am working on the 1.4 right now, just added the new weapons a few minutes ago, right now I'm fighting unity Light maps, soon you can download the new version
     

    Attached Files:

    • Bake.jpg
      Bake.jpg
      File size:
      187.7 KB
      Views:
      789
    Last edited: Jun 6, 2015
  8. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    Nice! So it might be up and ready this weekend sometime?
     
  9. Stiffx

    Stiffx

    Joined:
    Oct 27, 2014
    Posts:
    455
    I will not say yes because everytime I try to release it I find something new to change. But it's very close to the release.
     
  10. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    LOL. I understand that! I should just force myself to work on a different project but really want to experiment with the new version.
     
    Stiffx likes this.
  11. Hammod

    Hammod

    Joined:
    Oct 1, 2014
    Posts:
    5
    thanks for your answer, I've created a layer called "Enemy" and selected it as ValidLayers, still the same problem, I think the problem is that the bullet being fired backwards to the player instead of going forward
     
  12. Stiffx

    Stiffx

    Joined:
    Oct 27, 2014
    Posts:
    455
    :eek::confused: I really don't get it
     
  13. Hammod

    Hammod

    Joined:
    Oct 1, 2014
    Posts:
    5
    oops! the fire object I selected was an explosive, it was killing the player once it is fired , never-mind :D
     
  14. poison77

    poison77

    Joined:
    Dec 24, 2013
    Posts:
    40
  15. poison77

    poison77

    Joined:
    Dec 24, 2013
    Posts:
    40
    Question! :)
    I have set up new character on the same demo scene! Now everything is working fine, only new character wont stepup on wall wont cover , jump over.
    I can pickup with E button but cant jump over or stepup. Also when i press X to cover, nothing happens. C is working.
    Can someone help ?

    Thanks
     
  16. poison77

    poison77

    Joined:
    Dec 24, 2013
    Posts:
    40
    Anyone ? :)
     
  17. Rose-Remnant

    Rose-Remnant

    Joined:
    Nov 14, 2012
    Posts:
    123
    Thanks for posting the update man, looks nice
     
  18. Rose-Remnant

    Rose-Remnant

    Joined:
    Nov 14, 2012
    Posts:
    123
    Dumb question, but will there be a possible add on for like a water bottle drinking animation or pick up. Would do the same as the bandage but just a different type of pick up.

    Just wondering
     
  19. Rose-Remnant

    Rose-Remnant

    Joined:
    Nov 14, 2012
    Posts:
    123
    Here is the code for the menu. I just shoved it in the controller but am sure you can take it out and mess with it.

    You will have to go through and add stuff to the update and so forth and declare the variables as the rest of file is to huge to post here. but its pretty simple to do. The rest of the menu is just a switch statement for the options. Decided not to show that as its a work in progress.....

    But this will get you started

    And yes the menu is all programmed not using canvas, I felt limited using canvas.

    Code (CSharp):
    1.     if (paused){
    2.  
    3.             GUI.BeginGroup (new Rect (Screen.width / 2 - 40, Screen.height / 2 - 40, 170, 220));
    4.             GUI.Box (new Rect(0,0,170,220),"Paused");
    5.      
    6.             if (GUI.Button(new Rect(20,30,125,30), "Resume")){
    7.                 paused = false;
    8.             }
    9.          
    10.             if (GUI.Button(new Rect(20,80,125,30), "Restart")){
    11.                 Application.LoadLevel(Application.loadedLevel);
    12.             }
    13.          
    14.             if (GUI.Button(new Rect(20,130,125,30), "Main Menu")){
    15.                 Application.LoadLevel(0);
    16.             }
    17.             if (GUI.Button( new Rect( 20,180,125,30), "Options")){
    18.                 openMenu = !openMenu;
    19.             }
    20.             GUI.EndGroup ();
    21.    
    22.         }
     
    Last edited: Jun 8, 2015
  20. poison77

    poison77

    Joined:
    Dec 24, 2013
    Posts:
    40
    @Draken Knight
    Thanks man :) But looks like no one is home here :) I posted a question 2 days ago, no reply from stiffx or anyone :)
    Did you try to change a main character ?
     
  21. poison77

    poison77

    Joined:
    Dec 24, 2013
    Posts:
    40
    Im trying to setup new character. Im watching this video
    and i have Unity 5.0.2.f and TPSA 1.3 official version for Unity5.
    I add Main Camera in Camera slot, then i add Camera Aim Target and Camera Look At, after that im getting error message "The Camera Target must NOT be the child of your Camera GameObject" if i move AimTarget not to be child of Camera then i get message "The Camera Target must be the child of your Camera GameObject"
    What should i do ? I can to both :) This must be some TPSA error. Can you please HELP!!! :)

    Thank you.
     
  22. PROTOFACTOR_Inc

    PROTOFACTOR_Inc

    Joined:
    Nov 15, 2009
    Posts:
    4,054
    you should download the latest version directly from @Stiffx web site... by registering your asset store's invoice #
     
    Stiffx likes this.
  23. poison77

    poison77

    Joined:
    Dec 24, 2013
    Posts:
    40
    i did that, i have latest version!
     
  24. PROTOFACTOR_Inc

    PROTOFACTOR_Inc

    Joined:
    Nov 15, 2009
    Posts:
    4,054
    whoops, sorry I misread your post... "for unity 5" while I read from unity... Hope someone can chime in to help you out then.
     
  25. Stiffx

    Stiffx

    Joined:
    Oct 27, 2014
    Posts:
    455
    Hi there @poison77

    I've received your email, sory about the delay, this update is going to get me killed, working hard here to get things done. Anyways at page 10 of this forum I talk about this issue, it's a small mistake (sory about that) and I did not uploaded the pack again cause the new update will fix that and many other issues and also bring new features.

    Here's what happend.

    Hi there for everyone who tried to setup new character please add a small fix to the TPSA_CharacterSetup.cs file located at Scripts/Editor at line 104

    change:
    Code (csharp):
    1.  
    2. if (CameraLookAt.parent != Camera.transform)
    3.  
    4.  
    to this
    Code (csharp):
    1.  
    2. if (CameraLookAt.parent == Camera.transform)
    3.  
    4.  
    My bad :oops:
     
  26. poison77

    poison77

    Joined:
    Dec 24, 2013
    Posts:
    40
    Ok, awesome! :) Thanks
     
  27. poison77

    poison77

    Joined:
    Dec 24, 2013
    Posts:
    40
    Can you add small thing like, when AI kills player, fade out and level restart ?
    That can be useful :)
     
    blackbird likes this.
  28. Stiffx

    Stiffx

    Joined:
    Oct 27, 2014
    Posts:
    455
    Very nice idea, please remember me of this when the update is done, for now I'm avoiding new implementations just to get things done fast. But thanks for the idea.

    Cheers
     
  29. poison77

    poison77

    Joined:
    Dec 24, 2013
    Posts:
    40
    No problem, i will remind you ;) Also a fade in ;)
     
  30. macodys

    macodys

    Joined:
    Jul 22, 2012
    Posts:
    64
    when is the update coming i can't wait!!
     
  31. Rose-Remnant

    Rose-Remnant

    Joined:
    Nov 14, 2012
    Posts:
    123
    Poison you can just do this bro in the TPSA Character Controller, its cheap and easy.
    Code (CSharp):
    1.  
    2.  
    3. void Die()
    4.     {
    5.         if (!IsDead)
    6.  
    7.         {
    8.             IsDead = true;
    9.  
    10.             GameObject rdg = (GameObject)Instantiate(RagDoll, PTransform.position, PTransform.rotation);
    11.  
    12.             Transform[] ragdollJoints = rdg.GetComponentsInChildren<Transform>();
    13.             Transform[] currentJoints = PTransform.GetComponentsInChildren<Transform>();
    14.  
    15.             for (int i = 0; i < ragdollJoints.Length; i++)
    16.             {
    17.                 for (int q = 0; q < currentJoints.Length; q++)
    18.                 {
    19.                     if (currentJoints[q].name.CompareTo(ragdollJoints[i].name) == 0)
    20.                     {
    21.                         ragdollJoints[i].position = currentJoints[q].position;
    22.                         ragdollJoints[i].rotation = currentJoints[q].rotation;
    23.                         break;
    24.                     }
    25.                 }
    26.             }
    27.  
    28.             PTransform.gameObject.SetActive(false);
    29.             //return to main menu
    30.             Application.LoadLevel(0);<----add this
    31.         }
    32.  
    33.     }
    But yea would like to see a fade out script also. Something better then just Application.LoadLevel.
     
    Last edited: Jun 16, 2015
    Stiffx likes this.
  32. Rose-Remnant

    Rose-Remnant

    Joined:
    Nov 14, 2012
    Posts:
    123
    @Stiffx I know it might be a pain in the butt but could you do an AI New Character setup vid? Been trying to add a new enemy and having issues.

    Thanks in Advance

    Here is an error I am getting

    NullReferenceException: Object reference not set to an instance of an object
    TPSA_AI_ZombieBehaviour.TargetIsInSight (Int32 hitsInPerson) (at Assets/TPS_AIM/Scripts/AI/TPSA_AI_ZombieBehaviour.cs:390)
    TPSA_AI_ZombieBehaviour.StatusUpdate () (at Assets/TPS_AIM/Scripts/AI/TPSA_AI_ZombieBehaviour.cs:287)
    TPSA_AI_ZombieBehaviour.Update () (at Assets/TPS_AIM/Scripts/AI/TPSA_AI_ZombieBehaviour.cs:103)

    The Pic shows the AI test Char in the scene, he does the idle but nothing else.
     

    Attached Files:

    Last edited: Jun 16, 2015
  33. Darkworth

    Darkworth

    Joined:
    Jan 19, 2011
    Posts:
    41
    Is this working in Unity 5?
     
  34. Pandur1982

    Pandur1982

    Joined:
    Jun 16, 2015
    Posts:
    275
    Hello all i have same questions,

    -work the camera with collison on walls?
    -came new movements (like swiming,diving and jump foward)?
    -came a enemy ai in the future how they can shoot?
    -work this with the asset inventory pro?
    -have you a seperate Forum for this asset like before tutorials and mods.

    At time is see it is a great asset and i will buy it next month.
     
  35. poison77

    poison77

    Joined:
    Dec 24, 2013
    Posts:
    40
    @Draken Knight Thank man :) I could do that. Im waiting for 1.4 :) That i can start making my game!
     
    Stiffx likes this.
  36. Rose-Remnant

    Rose-Remnant

    Joined:
    Nov 14, 2012
    Posts:
    123
    Yea 1.4 looks to be like it is going to be well refined, thanks much for Stiffix for keeping up with it
     
    Stiffx likes this.
  37. sovietboss

    sovietboss

    Joined:
    Jan 18, 2015
    Posts:
    8
    Did third person tank control/cameras get implemented yet?
     
  38. Xaphan

    Xaphan

    Joined:
    Sep 12, 2014
    Posts:
    5
    It's not something that I can't change myself, but I notice that the animations for throwing grenades from cover still mimics holding a rife. Just an FYI. Killer asset, I can't wait to see 1.4.
     
    Stiffx likes this.
  39. Stiffx

    Stiffx

    Joined:
    Oct 27, 2014
    Posts:
    455
    Yes it is

    Thank you! Yeah I noticed that, I started to change things to be out of the box (at least for most of the options) before complete cover animations. I hope to finish it soon and start working more on the cover part. Also climbing stairs and many other issues.

    Thank you all for your support.

    Cheers
     
  40. Stiffx

    Stiffx

    Joined:
    Oct 27, 2014
    Posts:
    455
    -work the camera with collison on walls?
    yes

    -came new movements (like swiming,diving and jump foward)?
    :confused: what do you mean?

    -came a enemy ai in the future how they can shoot?
    For now the enemy does not shoot, you need to implement that you're self. Or wait a new enemy pack.

    -work this with the asset inventory pro?
    Never tested.

    -have you a seperate Forum for this asset like before tutorials and mods.
    what do you mean?

    At time is see it is a great asset and i will buy it next month.
    Thank you ;)
     
  41. Stiffx

    Stiffx

    Joined:
    Oct 27, 2014
    Posts:
    455
    Yes I can, but I need to finish 1.4 first, because now there's some changes to the AI. If I do the vid now it will not be compatible with your current version.

    Thanks
     
  42. Rose-Remnant

    Rose-Remnant

    Joined:
    Nov 14, 2012
    Posts:
    123
    Thanks man, looking forward to it
     
  43. Rose-Remnant

    Rose-Remnant

    Joined:
    Nov 14, 2012
    Posts:
    123
    I have some basic AI scripts that I can toy with in the mean time, have to admit am new to Unities FSM and am really trying to learn.
     
  44. Pandur1982

    Pandur1982

    Joined:
    Jun 16, 2015
    Posts:
    275
    thx for the answer stiffx :)

    with movements i mean , the character can swim in water and jump foward and so one,in the video on youtube i see the charackter roll foward.
     
  45. chrisoooooooooooooooo1

    chrisoooooooooooooooo1

    Joined:
    Mar 30, 2015
    Posts:
    53
    Hey stiffx!

    Bought your pack yesterday and even downloaded the newest version straight from your homepage - all in all im very satisfied with it, but I have one question and one small request:
    Question: How to walk?
    Request: Can we have a walk-by-default checkbox in the inspector?
     
  46. blackbird

    blackbird

    Joined:
    Aug 9, 2011
    Posts:
    591
    is the 1.4 update already up ?
     
  47. Pandur1982

    Pandur1982

    Joined:
    Jun 16, 2015
    Posts:
    275
    one more question,i have see in the youtube video´s you have key´s ,is it possibel to use a key on a door and teleport player/canvas to a other scene or is this function not implentet at the moment?and came the function in the future.

    i have make a script for my player for move to other scene and i will use it in TPSA

    a snippte from this is

    Application.LoadLevel(sceneIndex);
    gameObject.FindGameObjectWithTag("Player").transform.position =SpawnPoint.position;

    you think that can work with TPSA?
     
    Last edited: Jun 28, 2015
  48. Stiffx

    Stiffx

    Joined:
    Oct 27, 2014
    Posts:
    455
    You mean speed right? the char is always running... at 1.4 he will walk, but if you really want to do that in the current version just go to TPSA_PlayerController and look for maxSpeed variable, and set it to 0.5f

    Not yet :oops:

    Yes it will work just remember to add the
    Code (csharp):
    1.  
    2. void Awake() {
    3. DontDestroyOnLoad(transform.gameObject);
    4. }
    5.  
    to all of the components you need to keep alive
     
    Rose-Remnant likes this.
  49. Rose-Remnant

    Rose-Remnant

    Joined:
    Nov 14, 2012
    Posts:
    123
    Just a note if you want to setup a timer re spawn system you might need to get rid of DontDestroyOnLoad(transform.gameObject); I was toying with my menu and when I did a lvl restart it would create an extra body or player. Commented that out and worked fine.
     
  50. Mad_Mark

    Mad_Mark

    Joined:
    Oct 30, 2014
    Posts:
    484
    Words of support and encouragement Stiffx - Thank you for taking the time to build this asset, and for sharing it with the world. Just laid down the coppers to pick this up with very high hopes. My grandkids want a zombie shooter, custom made with their own likeness. Built and animated those already. Now I am looking forward to adopting this framework as the engine for that game.

    Questions:
    I have imported the AssetStore TPSA asset into a new project. I have downloaded the update from your website. Do I now copy the update directly into my project, or do I copy the update over the files from the asset store? If the latter, where _IS_ that directory?

    Wouldn't it be easier, or more intuitive for importing, to package the update, rather than zip it? Then it could just be imported using Import Custom Asset.

    The Readme doc is pretty thin. Is there a guide to help me setup my own scene, with my own player, with my own cast of nasty zombies, and using my own AI? (I am going to use RAIN, and also purchased their Squad Command tool) I know there is a YouTube vid for character setup and pickups, but I want to know what every script does, and where it should be used.

    Did you mean to include the AssetStore Tools in the archive? Looks like a publisher's toolkit. Hope it isn't tied to your account in any way.

    Thanks again,
    Mark