Search Unity

TopDownShooter-ToolKit

Discussion in 'Assets and Asset Store' started by songtan, Dec 14, 2015.

  1. Jpbsilva

    Jpbsilva

    Joined:
    May 28, 2019
    Posts:
    6
    yes, my offline mode is going to be top down shooter
     
  2. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,753
    In that case. It should be compatible.
     
  3. Andreas12345

    Andreas12345

    Joined:
    Oct 17, 2013
    Posts:
    436
    I got in Unity 2019.2.12f1
    Code (CSharp):
    1. ArgumentException: Input Button RightThumbStick_X is not setup.
    2. To change the input settings use: Edit -> Settings -> Input
    3. TDSTK_UI.UIMainControl.Update () (at Assets/TDSTK/Scripts/UI/UIMainControl.cs:169)
    And i think that is the reason i cannot shoot?

    When i setup the RightThumbStick_X and RightThumbStick_Y the turret is not working with mouse or with thumbstick
     
    Last edited: Apr 15, 2020
  4. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,753
    Have you got a controller plugged in? My guess is the setting for your controller thumb-stick in the InputSetting is not working (to be honest I'm not quite sure how to set that up as I don't use a controller myself and different controller have different mapping).

    The code only works one input at a time, either controller or mouse. If you unplug your controller, the mouse input should work.
     
  5. Andreas12345

    Andreas12345

    Joined:
    Oct 17, 2013
    Posts:
    436
    I can handle this, just want to inform :)
     
  6. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,753
    I see. Thanks for letting me know.
     
    Andreas12345 likes this.
  7. Pourya-MDP

    Pourya-MDP

    Joined:
    May 18, 2017
    Posts:
    121
    Hi there
    Does this plugin have in game shopping system(upgrading with xp ore virtual currency?)
    Im going to buy this if it have what i want

    Ps:any .apk for testing it on mobile?
     
    Last edited: Apr 20, 2020
  8. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,753
    Yes there's a xp based levelling system and a currency based perk system. You can check the webdemo and see for yourself. Unfortunately I don't have .apk readily available.
     
  9. Pourya-MDP

    Pourya-MDP

    Joined:
    May 18, 2017
    Posts:
    121
    Hi again and thanks for response
    But im not familliar with perk system does it acts like a weapon system upgrading?
    For example upgrading clipsize,board,gunpower,etc?
    And apply it to each weapon individualy?
     
  10. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,753
    The perk system is a flexible upgrade system where user unlock/buy item that provide various bonuses (unlock/upgrade weapon, upgrade base stats, etc.). The whole system can be configured to work like a typical rpg skill/tech-tree. Or an in game shop where player buy various upgrades.

    To answer your question. Yes, it can be used to upgrade stats of individual weapon. Bear in mind that it does has some limitation that it cant do whatever that is not pre-programmed. However you can always do your own customization if it doesn't cover what you need.
     
  11. Pourya-MDP

    Pourya-MDP

    Joined:
    May 18, 2017
    Posts:
    121
    Hey
    And sorry for to much questions
    But i have to make sure that its suits my needs
    So here it is
    Can we use this controller for real humanoid characters with smooth animatioms?
    I already bought https://assetstore.unity.com/packages/templates/systems/sci-fi-top-down-game-template-2-0-84667 which is great on animation (it has even root motion) and almost everything but it doesnt have xp levelimg and upgrade system and much options so i decided to buy your system
    And want to make the game with only one kit because i dont have the time and effort to put on two different systems and make them work together
    So final question is does this tool capable of handling a humanoid characterTDS?
    Thanks for your time;)
     
  12. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,753
    Yes the toolkit should be able to handle animation, humanoid included. That said, it's quite basic and may not up to your expectation. Meaning you can have the character play animation like run, attack and so on, it won't blend different movement animation (like run and strafe) together.
     
  13. Kiritsu-Games

    Kiritsu-Games

    Joined:
    Mar 25, 2013
    Posts:
    9
    Hi, I can't open any editor window, getting this error (Unity 2020.1.0f1, TDSTK 1.3.2f4).

    ArgumentException: method return type is incompatible
    System.Delegate.CreateDelegate (System.Type type, System.Object firstArgument, System.Reflection.MethodInfo method, System.Boolean throwOnBindFailure, System.Boolean allowClosed) (at <fb001e01371b4adca20013e0ac763896>:0)
    System.Delegate.CreateDelegate (System.Type type, System.Object firstArgument, System.Reflection.MethodInfo method) (at <fb001e01371b4adca20013e0ac763896>:0)
    UnityEditor.HostView.CreateDelegate (System.String methodName) (at <b17f35b08b864a3ca09a7032b437596e>:0)
    UnityEditor.HostView.CreateDelegates () (at <b17f35b08b864a3ca09a7032b437596e>:0)
    UnityEditor.HostView.SetActualViewInternal (UnityEditor.EditorWindow value, System.Boolean sendEvents) (at <b17f35b08b864a3ca09a7032b437596e>:0)
    UnityEditor.DockArea.SetSelectedPrivate (System.Int32 value, System.Boolean sendEvents) (at <b17f35b08b864a3ca09a7032b437596e>:0)
    UnityEditor.DockArea.AddTab (System.Int32 idx, UnityEditor.EditorWindow pane, System.Boolean sendPaneEvents) (at <b17f35b08b864a3ca09a7032b437596e>:0)
    UnityEditor.DockArea.AddTab (UnityEditor.EditorWindow pane, System.Boolean sendPaneEvents) (at <b17f35b08b864a3ca09a7032b437596e>:0)
    UnityEditor.EditorWindow.CreateNewWindowForEditorWindow (UnityEditor.EditorWindow window, System.Boolean loadPosition, System.Boolean showImmediately, System.Boolean setFocus) (at <b17f35b08b864a3ca09a7032b437596e>:0)
    UnityEditor.EditorWindow.Show (System.Boolean immediateDisplay) (at <b17f35b08b864a3ca09a7032b437596e>:0)
    UnityEditor.EditorWindow.Show () (at <b17f35b08b864a3ca09a7032b437596e>:0)
    UnityEditor.EditorWindow.GetWindowPrivate (System.Type t, System.Boolean utility, System.String title, System.Boolean focus) (at <b17f35b08b864a3ca09a7032b437596e>:0)
    UnityEditor.EditorWindow.GetWindow (System.Type t, System.Boolean utility, System.String title) (at <b17f35b08b864a3ca09a7032b437596e>:0)
    TDSTK.UnitAIEditorWindow.Init () (at Assets/TDSTK/Scripts/Editor/W_UnitAIEditorWindow.cs:20)
    TDSTK.UnitAIEditor.OnInspectorGUI () (at Assets/TDSTK/Scripts/Editor/I_UnitAIEditor.cs:63)
    UnityEditor.UIElements.InspectorElement+<>c__DisplayClass58_0.<CreateIMGUIInspectorFromEditor>b__0 () (at <b17f35b08b864a3ca09a7032b437596e>:0)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&)
     
  14. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,753
    Thanks for letting me know. I've found the cause of the issue and is working on uploading a fix as soon as I can. It should be up within the next 1-2 hours. Sorry for the trouble.
     
    Kiritsu-Games likes this.
  15. Niroan

    Niroan

    Joined:
    Jun 16, 2019
    Posts:
    70
    I have and issue on mobile.

    The player animation is really weird.
    When i play on mobile device i run with controllers and when i strafe and its set to point and attack. The Animation is playing forward and so on.

    Im making and game where you could potentiually run backwards and shoot forward. When i run forward and shoot backwards the animations goes nuts cause its not animation correct.

    Is there a way to detect that i run backwards and shooting forward.?
     
  16. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,753
    I've noticed a bug with the animation system. I'll try to get it fixed.

    Can I just get a confirm that it works when you are running it on your editor? It's suppose to work the same on both the editor and in any particular build (mobile device or not).
     
  17. Niroan

    Niroan

    Joined:
    Jun 16, 2019
    Posts:
    70
    animatons seems to break the chars animations looks weird now.
    another issue is melee chars only attack once? after first hit they just stand still.
    i want them to attack charcter melee and keep attacking
     
  18. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,753
    It's hard to tell what is wrong without taking a closer look. A large part of animation is in the import setting of the animation. Maybe you can send me your model and prefab so I can have a look?
     
    Niroan likes this.
  19. Niroan

    Niroan

    Joined:
    Jun 16, 2019
    Posts:
    70
    Yes i would love to do that. Where can i send it ot
     
  20. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,753
    You can email me or private message me. You can find my email in the 'Support and Contact' window from the drop down menu.
     
  21. george_bacanu

    george_bacanu

    Joined:
    Oct 24, 2017
    Posts:
    15
    Hello,
    I have a question, is there a possibility for the player to move forward automatically? In the case of a fighter jet, I would like it to move automatically. Maybe you can help me.
    Thank you.
     
  22. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,753
    Of course. You can do a simple hack in the script to have the forward input to always registered as on. Just change line150 and line151 of UIMainControl.cs to:

    player.Move(new Vector2(Input.GetAxisRaw("Horizontal"), 1), Input.GetKey(KeyCode.LeftShift));

    And that should do it.
     
  23. george_bacanu

    george_bacanu

    Joined:
    Oct 24, 2017
    Posts:
    15
    Thanks a lot!
     
  24. Niroan

    Niroan

    Joined:
    Jun 16, 2019
    Posts:
    70
    Another Issue im facing.
    When i attach the TDS animation controller.
    And attach the unit Ai. It sets the rigid body.

    If i look at the Unit code your freezing xyz on rotation and y on direction.

    but somehow This breaks my animation. It causes my enemies to GO trough the floor. Or at least haft their legs.

    if i turn of the freeze the Unit flies around like its a bee trying to catch my char.

    My setup is:

    i Got 1 toon character that runs around.
    And all enemies are animated toon characters and are trying to kill me.

    other thing is. My enemies are attacking when close range, i used the animation for melee attacks. But the animation only run once. But attacks keeps coming in. Is This intentional that animation for melee attacks only run once?

    Please help me fix This.
     
  25. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,753
    It's hard to tell what is wrong without seeing the settings on the prefab. But my guess is you have some colliders in the prefab (in your model maybe). Those colliders are interacting with the root collider, either pushing the unit down through the floor when position is freeze, or send the unit flying when it's not. Try check if there's any collider within the prefab and remove it. With any luck it should fix the problem.

    As for the animation, the animation runs for every attack. I check and the animator is working fine. My guess is your problem is with animation import setting. Has it been set to loop?
     
  26. Niroan

    Niroan

    Joined:
    Jun 16, 2019
    Posts:
    70
    So it should be looping ??
    Im confused now, i bought the TDTK4 aswell on that all units need colliders? Cause of the abilites This is not idea here? Or How it works?
     
  27. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,753
    TDTK4 is a very different framework that works differently. In TDTK, non of the unit require any collider. If anything adding collider could potentially mess things up. In TDSTK, you will need collider on each unit for collision detection and physics simulation (so the unit won't just run through each other). By default, the script will make sure the collider and rigidbody on the unit are setup correctly. But it doesn't scan through the whole prefab hierarchy to remove any unnecessary component. So if you have other collider in the within the prefab and is not setup properly. Various things could happen (like what happen to your prefab).
     
  28. Niroan

    Niroan

    Joined:
    Jun 16, 2019
    Posts:
    70
    Okay, nice to know.
    Is there any layers i should give units? and so on?
     
  29. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,753
    Not really. It's mostly done automatically via the script. Just make sure you don't leave any unnecessary collider in the scene of the prefab.
     
  30. Niroan

    Niroan

    Joined:
    Jun 16, 2019
    Posts:
    70
    Hmm i put all scripts and mesh on same GameObject and it worked. It does not work if you put animator on child item.

    I think i have figured out what is wrong with Melee attack.
    Your checking melee attack if a collision is made on collider. But this only fires onces. Then you send the contactCurrentCD to the current Cooldown. This is then decremented with -= Time.Deltatime in update function.

    But the whole collision is not happing again. because the unit is allready inside the colider when it attacks my player.
    I want it to keep attack as long as collision is inside the colider. And ONLY when the player leaves the collider so the enemy is not colliding with it anymore. Then it should stop attacking.

    Can you please help me accomplish this?
     
  31. Niroan

    Niroan

    Joined:
    Jun 16, 2019
    Posts:
    70
    I made a hack to your code and applied to the melee attack fix. Now its attacking correctly when its inside range and not only attacking once :)

    for anyone stucked on This issue you Can change the UNIT script
     
  32. Migueljb

    Migueljb

    Joined:
    Feb 27, 2008
    Posts:
    551
    What if I wanted to use an actual player character with player enemy types. Is this easy to change in place of solid objects like tanks and such?
     
  33. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,753
    You mean a humanoid model? Yes, the system support just about any kind of model.
     
  34. martinreimer

    martinreimer

    Joined:
    Feb 21, 2018
    Posts:
    16
    @songtan Happy New Year! I believe I found a bug. In unity 2019.4 on the demo gauntlet levels, the player tank can drive through the yellow blocks. Also, if you could integrate gamepad support that would be great!
     
  35. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,753
    I'm aware of the bug. A fix is coming soon. I'll see what I can do about the controller support.
     
  36. martinreimer

    martinreimer

    Joined:
    Feb 21, 2018
    Posts:
    16
    Great! Thank you.
     
  37. Nezmo

    Nezmo

    Joined:
    Sep 11, 2020
    Posts:
    7
    Hello,
    please can you explain how the Trigger Player Switch works? I was trying to switch between 2 different player units but it seems to not be working. All i have got is teleport kinda thing. Thank you.
     
  38. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,753
    Sorry for the delayed respond @Nezmo. Yes it can work as a teleporter but you can also switch unit during the teleportation process. However you will need to assign the 'Target Prefab' (the unit to switch to) for it to work. Also if you are switching to the same prefab, you will need to disable 'Different Prefab Only' for it to work.
     
  39. Nezmo

    Nezmo

    Joined:
    Sep 11, 2020
    Posts:
    7
    well i did that, but its not working how you describing. What do i need is that the player can switch between 2 different tanks. let say for example i do have yellow and blue tank and i need to be able to switch between those 2. Also is it possible to trigger it with some key i mean button from keyboard?
     
  40. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,753
    It's targeted to a specific prefab. Means you always switch to a specific unit, regardless of what your current unit. So if you want to be able to switch between blue and yellow tank, what you can do is create two switch triggers side to side. One switch to blue tank and one to yellow tank. The player can then trigger the switch depends on what they want.

    It's an in game trigger so it's not possible to trigger it with button pressed.
     
  41. Nezmo

    Nezmo

    Joined:
    Sep 11, 2020
    Posts:
    7
    I have just went through the trigger options and tested all of it. Just want to let you know that the option "Different Prefab Only" is not working at all. I have just tested it and have made duplicate of yours player_gauntlet unit and just to make sure the switch is working i did change the color of the yellow to the blue. So i do have 2 different pefabs right? And when i use the option Different Prefab Only it is not triggering at all even if i do have blue tank and target prefab is yellow tank. Maybe i am missing something but it also could be a bug. Please can you have a look at this? thx

    P.S.: i even made original prefab from the duplicate, but its not working eighter the way
     
  42. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,753
    The prefab checking is based on the value of prefabID, a hidden attribute, unique to each unit assigned to UnitPlayerEditor. If you simply copy and paste, or duplicate the gameobject or prefab, they still have the same prefabID and the trigger won't work.
     
  43. Nezmo

    Nezmo

    Joined:
    Sep 11, 2020
    Posts:
    7
    ok that means i have to do the new player through your system, got it. Thx.

    one more question. For example in the gauntlet scene there is the orange blocks which they have unit script on them can i somehow set it the way that they can be killed (destroyed) by yellow tank but not by the blue one? or at least it can be set to be destroyed with only certain weapon?
     
  44. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,753
    You can try using the damage/armor type system in DamageTableEditor. Give each blue and yellow tank a different damage type and create 2 armor type, each immune to one of the damage type. Say blue tank uses weapon with damage type-1 which can only damage armor type-1, and yellow tank uses weapon with damage type-2 which can only damage armor type-2. Now you can have the target immune to either blue tank or yellow tank by setting the armor type.
     
  45. Nezmo

    Nezmo

    Joined:
    Sep 11, 2020
    Posts:
    7
    Nice one. thx so much for the hint.
     
  46. Nezmo

    Nezmo

    Joined:
    Sep 11, 2020
    Posts:
    7
    also, please any chance for at least local multiplayer?
     
  47. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,753
    Well, I'll be honest. The framework is design for single player game. It's going to need a considerable amount of work to support multiplayer. And I'm not sure it's going to be useful to the majority of the user so it's probably not worth the time to do it. On top of that I'm quite occupied with other project these days so I don't have the time to do it.

    Short answer, not happening in the foreseeable future. Sorry to dissapoint.
     
  48. SavaGhost

    SavaGhost

    Joined:
    Sep 20, 2018
    Posts:
    4
    Hi there, I get the errors attached below when I try and use homing shootobject types or laser shootobject types. The error seems to be caused by "hitpoint" returning null. Any help would be appreciated.
     

    Attached Files:

  49. songtan

    songtan

    Joined:
    Apr 9, 2011
    Posts:
    2,753
    Sorry for the trouble. Have you modified the code at all? It seem the error you are experiencing doesn't quite lined up with the code I have. Also hitPoint is a Vector3, it can't be null. Also looking at the line number and the offending line, could it be that you haven't assigned any collider to your shoot-object?
     
  50. SavaGhost

    SavaGhost

    Joined:
    Sep 20, 2018
    Posts:
    4
    Thanks for the quick reply,

    Yes, I am trying to experiment with randomized bullets, so I added this to Weapon.cs but that's about it.
    Code (CSharp):
    1.   shootObject = shootObjList[Random.Range(0, shootObjList.Count)];
    shootObjList has all the premade shootObject prefabs added to it. I have checked the shootObjects and they all seem to have a collider.
     
unityunity