Search Unity

[RELEASED] TopDown Engine by More Mountains [new v3.0 : damage types, damage resistance, and more!]

Discussion in 'Assets and Asset Store' started by reuno, Oct 9, 2018.

  1. Naughtykyuubi69

    Naughtykyuubi69

    Joined:
    Dec 4, 2015
    Posts:
    18
    Hey Reuno a quick question, you have a tutorial or something that shows you how to do turret style enemies?
     
  2. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @Naughtykyuubi69 > No, nothing that specific I'm afraid, tutorials are about features and systems. I'd recommend looking at the AI tutorial though, it'll probably teach you all there is to know about creating AIs, which is what you'd need to create a turret style enemy. All the actions and decisions you'd need to do so are already built-in.
     
  3. Naughtykyuubi69

    Naughtykyuubi69

    Joined:
    Dec 4, 2015
    Posts:
    18
    ok thanks!
     
    reuno likes this.
  4. cmart

    cmart

    Joined:
    Jul 10, 2012
    Posts:
    121
    Just picked this up, so far I think its great. But I feel like there is a slight stutter on the follow cam in 3D. I disabled the cinemachine noise, all the post fx, and the follow cam just seems to stutter/judder a bit when following the player. Its not terrible, In fact its quite subtle.... Is it just me? Might try setting up a non cinemachine camera rig for a sanity check :)

    Anyone else notice this, any way to smooth it out?
     
  5. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @cmart > I'm not aware of any stutter, Cinemachine is usually pretty smooth.
    If the issue persists, don't hesitate to use the support form and provide a bit more context info, for example what version of Unity you're using, what version of Cinemachine, what demo you're testing, and what type of build and device you're testing on.
     
  6. cmart

    cmart

    Joined:
    Jul 10, 2012
    Posts:
    121
    Hi Reuno, just checked it out again, and it is most noticeable in the 3D sandbox scene. Both in my project and in the downloadable PC demo it behaves the same, if you move back and forth (especially while running) you can see the yellow cubes and blue pillars stutter quite a bit. The character itself doesn't stutter at all, just the scenery around it.
     
  7. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @cmart > As I said, please provide more context info via the support form, thanks. I'd need that info to be able to reproduce your context, thanks.
     
  8. cmart

    cmart

    Joined:
    Jul 10, 2012
    Posts:
    121
    Thanks, support ticket sent :)
     
    reuno likes this.
  9. BlastingGamesSL

    BlastingGamesSL

    Joined:
    Jul 24, 2017
    Posts:
    8
    Hi there!
    How should I configure my weapons to perform specific attacks when the corresponding Ability is in place?
    I have a Melee ComboWeapon set up with the attacks that I would want to be used in general, but I would need to use a different attack when Jumping and another one when Running. What would be the approach you recommend for that?
    Thanks!
     
  10. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @VandalProductions > If what you mean is just visuals, then you can use your animator to do that (transitioning to a different animation based on both the current attack and whether or not Running is true, for example).
    If you mean completely different attacks (damage caused, zone size, etc, so really different weapons), then you'd need a class to handle that weapon change automatically based on context.
     
  11. BlastingGamesSL

    BlastingGamesSL

    Joined:
    Jul 24, 2017
    Posts:
    8
    Thanks!
    Now before attacking I check if the character is Running, Jumping, or none; and then I apply the corresponding weapon before actually performing the attack. But the thing is.. weapons aren't working anymore. If I test them 3 as initial weapons they all work. If I assign any of them via ChangeWeapon at Start, they all 3 work. But if I try to change to a different one via ChangeWeapon and then attack, nothing happens. Maybe a weapon recently equipped can't attack?
     
  12. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @VandalProductions > I suppose the issue lies elsewhere then, as recently equipped weapons can actually attack. That's how combo weapons work (under the hood, they're 2, 3 or more separate weapons, switched in sequence).
     
  13. BlastingGamesSL

    BlastingGamesSL

    Joined:
    Jul 24, 2017
    Posts:
    8
    Nice, with the ComboWeapon as an example I managed it to work, thanks :)
    Also, how can a Weapon (or at least its Hitbox) be used by/during some Ability? For instance if I need the CharacterDash2D to damage any Enemy that the character touches while dashing, is there a way to connect Abilities with Weapons?
     
  14. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @VandalProductions > You can simply attach a disabled DamageOnTouch zone to your character, and have your ability enable/disable it when needed.
     
  15. revolutioco

    revolutioco

    Joined:
    Jun 26, 2020
    Posts:
    2
    Hey Reuno I installed the universal Render pipline over the engine, Im doing a 2D game, and the structure in the examples use multi camera for the UI, is there a way to use the URP 2d renderer (no support for multicamera it seems) and still have UI??
     
  16. BlastingGamesSL

    BlastingGamesSL

    Joined:
    Jul 24, 2017
    Posts:
    8
    Hi vevolutioco, I'm using TD Engine with the URP 2D. If you disable the Camera component of the UI Camera (KoalaUICamera in the Koala demos for instance) and then you change its child Canvas from "Screen Space - Camera" to "Screen Space - Overlay" you will have the GUI working again. As you said the URP 2D still doesn't handle camera stacking, but this configuration works. Not sure if Renaud knows about an issue with his engine if the UI is set to Overlay though.
    Cheers!
     
    reuno likes this.
  17. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
  18. revolutioco

    revolutioco

    Joined:
    Jun 26, 2020
    Posts:
    2
    is working! thank you very much!
     
    reuno likes this.
  19. neapolitanstudios

    neapolitanstudios

    Joined:
    Feb 17, 2011
    Posts:
    75
    @reuno I can't see this mentioned anywhere else in the thread. I'm having some issues with the pushable rigidbodies. If the player jumps on a top edge, the crate goes flying off in the direction of the opposite edge. Looking at the code, it appears that a force is applied at the hit position of the character collider.

    Is there an easy way of fixing this? I've tried messing around with child colliders on both the pushable object and the character, but I haven't had much luck.

    /edit: It's probably worth mentioning I'm using the 3D Controller.
     
  20. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @neapolitanstudios > I'm not sure I see how to reproduce your issue. Please use the support form and provide exact steps, ideally in one of the demos (Sandbox3D's got pushable blocks), thanks!
     
  21. neapolitanstudios

    neapolitanstudios

    Joined:
    Feb 17, 2011
    Posts:
    75
    I should have checked to see if I could replicate it in the demo.. Turns out I had a random collider at the base of my character that was interfering with things. Works great now! At least it was an easy fix. :)
     
    reuno likes this.
  22. ObsidianSpire

    ObsidianSpire

    Joined:
    Sep 13, 2013
    Posts:
    48
    Hi, I had a question about reflecting projectiles back upon an enemy. I'm modifying the Loft3D demo scene after saving it as a separate scene and I got reflection to work by flipping the direction vector when they hit a trigger zone attached to the player that's not in Player layer, but it doesn't seem to do damage to the enemy it hits afterward. I checked the layer masks for the projectile, damage on touch, etc. and they all include Enemies in them so shouldn't it do damage? Please let me know if there is something else I need to modify to trigger damage.
     
  23. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @ObsidianSpire > Does it do damage without your script? If yes, then that's likely the issue. I can't think of anything that could prevent it. Maybe your trigger. Hard to tell, but using debug tools on your script to see what's happening will hopefully help.
     
  24. ObsidianSpire

    ObsidianSpire

    Joined:
    Sep 13, 2013
    Posts:
    48
    Hmm, it looks like the enemy bullets do damage some of the time without reflection. I'm experimenting with the room on the left and can get one of the Patrol Seek and Destroy enemies in the line of fire of another that won't die after being hit. In the attached image you can see the enemy on the left has particles from bullets colliding but its health stays at the value it was before the hit. It doesn't get knocked back or have the health bar display either.

    I think this getting hit but no damage issue has something to do with the colliders of the enemies but that's just a guess. I've also attached my scripts so you can see if I'm doing something wrong there instead. Reflect abilitity replaces Character Time Control on the player character and Reflect Upon Bullet Entry is on the trigger that's a child of the player. Unity_2020-07-20_22-14-15.png Unity_2020-07-20_22-20-20.png
     

    Attached Files:

  25. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @ObsidianSpire > That seems completely normal, these projectiles are only meant to damage the player, not the other AIs.
     
  26. ObsidianSpire

    ObsidianSpire

    Joined:
    Sep 13, 2013
    Posts:
    48
    But they do damage to the other AI some of the time. I didn't fire a shot in the first pic but the third enemy in that room was killed by enemy bullets.
     
  27. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @ObsidianSpire > I'd recommend trying to isolate issues, if you start mixing your scripts, it's gonna make it harder to pinpoint problems. Right now I'm not even sure what the issue is :)
    If the issue persists (and if you think it's on the engine side), please use the support form and provide repro steps to it, in a fresh install, no changes made. I'll be happy to have a look.
     
  28. neapolitanstudios

    neapolitanstudios

    Joined:
    Feb 17, 2011
    Posts:
    75
    @reuno, apologies. I'm still dealing with some pushing issues.

    I'm trying to play an animation when the character pushes an object. There isn't a prebuilt parameter for pushing crates from what I can see. I don't believe I can create my own following the documentation/video as physics interactions are not an ability class. How would you recommend approaching this inside the framework of the engine?
     
  29. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @neapolitanstudios > At a minimum : have a class cast a ray (or more, depending on your context) in front of your character. If colliding with a pushable (and potentially moving), trigger the animation.
     
  30. MRBAEK

    MRBAEK

    Joined:
    Sep 30, 2014
    Posts:
    13
    hi, i got a question for melee combo.
    after i analyze ComboWeapon script, i think melee combo order is script order in inspector tab.
    is this right? or is there can set the combo order?
    best regards.
     
  31. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @MRBAEK > That's correct, it's based on the component order.
     
  32. MRBAEK

    MRBAEK

    Joined:
    Sep 30, 2014
    Posts:
    13
    hi, i have a other question.

    please see this image below:
    movementwhileattacking.gif

    if i doing movement input while kick animation, hitbox orientation following input direction.

    can i fix hitbox's orientation while attack animation?
     
  33. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @MRBAEK > Weapons have an option to prevent movement while in use, and you can see an example of a correctly setup weapon (correctly in that it does what you're after) in the MinimalSword3D demo scene. Prefab is called LoftSword.
     
  34. ObsidianSpire

    ObsidianSpire

    Joined:
    Sep 13, 2013
    Posts:
    48
    Code (CSharp):
    1. Assets\TopDownEngine\Common\Scripts\Environment\Teleporter.cs(117,53): error CS1503: Argument 2: cannot convert from 'MoreMountains.Tools.MMTween.MMTweenCurve' to 'MoreMountains.Tools.MMTweenType'
    2.  
    3. Assets\TopDownEngine\Common\Scripts\Environment\Teleporter.cs(136,54): error CS1503: Argument 2: cannot convert from 'MoreMountains.Tools.MMTween.MMTweenCurve' to 'MoreMountains.Tools.MMTweenType'
    What should I do to fix this error? This is in an unmodified v1.8 script.
     
  35. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @ObsidianSpire I’d need more info. How do you get that error? Does it happen in any of the demos, no changes made? If yes, where? If not, what did you change? If the issue persists, please use the support form and provide more context, thanks.
     
  36. jlhacode

    jlhacode

    Joined:
    Feb 20, 2020
    Posts:
    13
    This isn’t really caused by TDE, but it did start appearing after installation. I have a "click-to-move" system, and I call this in the update function to control my animator.


    In my Update() function, I call:

    Code (CSharp):
    1.     void Update() {
    2.         currentPosition = transform.position;
    3.  
    4.         if (oldPosition != currentPosition) {
    5.             var vectorDifferenceBetweenOldAndCurrent = (currentPosition - oldPosition).normalized;
    6.             animator.SetFloat("moveX", vectorDifferenceBetweenOldAndCurrent.x);
    7.             animator.SetFloat("moveY", vectorDifferenceBetweenOldAndCurrent.y);
    8.             animator.SetBool("moving", true);
    9.         } else {
    10.             animator.SetBool("moving", false);
    11.         }
    12.  
    13.         oldPosition = currentPosition;
    14.     }
    15.  

    It works alright, but my character doesn't face the proper direction when the game starts. It aldo seems like he animates for a frame when the scene loads, which isn't intended. What would be the recommended way to fix this if I'm loading my character from a prefab?
     
  37. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @jlhacode > I don't know, I don't have enough info to tell, and this doesn't seem related to the engine :)
    I suppose the animation part is related to that code you posted. Don't hesitate to use the support form if you have questions related to the engine!
     
  38. jlhacode

    jlhacode

    Joined:
    Feb 20, 2020
    Posts:
    13
    Related to my last question: I've actually disabled my animation code, and found out that my character orientation doesn't respect the North/South/East/West facing direction that I set on the Go To Level Entry Point component.
     
  39. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @jlhacode > Please use the support form and provide more info : how did you create your character, is it 2D or 3D, where/how can I reproduce the issue, etc. It'll be easier to help that way :)
     
  40. karakori

    karakori

    Joined:
    Feb 2, 2020
    Posts:
    7
    Hello - I'm wondering if the TopDown Engine has functionality for having an NPC look at the player when interacting with them (i.e. dialogue), or ensuring that a player can only interact with an NPC/object when facing them?

    This has been giving me some trouble trying to code it on my own, so if I could get an asset that handles it, in addition to the other advantages offered by the TopDown Engine, I'd look into purchasing it.

    Thanks!
     
    Last edited: Jul 27, 2020
  41. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @karakori > There's an AI action that lets you face the player at all times (or any target).
    And while there's nothing in the engine preventing you to like walk back towards a NPC and activating its dialogue zone, that'd be relatively easy to add (it's basically just an if condition).
     
  42. karakori

    karakori

    Joined:
    Feb 2, 2020
    Posts:
    7
    Thank you!

    Yeah, I'm using Pixel Crushers Dialogue System, so I'd be able to use it for handling the conditional logic.

    Is there any documentation where I can read more about this AI action? I should specify that I'm making a 2D topdown game with sprites - I know the LookAt function doesn't work in 2D in Unity the way it works in 3D.
     
    Last edited: Jul 27, 2020
  43. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @karakori > Not really no, it's just an action that asks your Character to rotate towards the current Brain target. There isn't much more to it than that :)
     
    karakori likes this.
  44. neapolitanstudios

    neapolitanstudios

    Joined:
    Feb 17, 2011
    Posts:
    75
    @reuno - Sorry for bothering you again. I'm trying to recreate the pressure plate example you have in the 2D Sandbox scene (although in 3D). My pushable crate doesn't activate my switch. Characters activate it when using the CharacterButtonActivation ability, so the switch is working. Do you have any ideas? Cheers.
     
  45. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @neapolitanstudios > It's hard to tell what the issue may be without more details of what you're doing. Maybe you forgot the button activator component? If the issue persists and if you think it's on the engine's side, don't hesitate to send me more info via the support form, I'll be happy to help you.
     
  46. neapolitanstudios

    neapolitanstudios

    Joined:
    Feb 17, 2011
    Posts:
    75
    Cheers, I just filled out a form. I did have a button activator component. I've also tried activating both a script and a MMFeedback. Both worked on my character, neither worked on my pushable object. Hopefully you can help clear things up. :)
     
    reuno likes this.
  47. LassieLemon

    LassieLemon

    Joined:
    Jan 25, 2020
    Posts:
    6
    @reuno TDE ist on the unity store frontpage! Congrats!
     

    Attached Files:

    reuno likes this.
  48. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @LassieLemon > And Nice Vibrations is part of the Power Tools so I guess I win the frontpage today.
     
  49. LassieLemon

    LassieLemon

    Joined:
    Jan 25, 2020
    Posts:
    6
    reuno likes this.
  50. Tretiak

    Tretiak

    Joined:
    Jan 22, 2018
    Posts:
    49
    Hey Im starting new project and want to import topdown engine with minimum project settings overrides. I saw there are for example build settings, dynamics settings, input manager etc. I know mandatory are input manager and tag manager when importing package, can I safely exclude other like build settings, quality settings etc to keep asset working ? Or can you write which are strictly mandatory to include when importing, Thanks