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. ImPrankster

    ImPrankster

    Joined:
    Jan 25, 2020
    Posts:
    4
    OK seems i understand why im wrong
     
  2. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,926
    @ImPrankster > You can find examples in the engine itself by simply looking for references of that delegate. The HealthAutoRefill class implements it, for example.
    You also may want to read about delegates in Unity in general, as there's nothing special about that one :)
     
  3. keepthachange

    keepthachange

    Joined:
    Oct 15, 2014
    Posts:
    87
    How would i use this to damage emerlad ai with topdown engine scripts.

    If you’d like to apply damage to an AI directly, for something like a custom character controller, you can do so with the code below. It is assumed you have a reference to the hit target when doing so.

    Damage (int DamageAmount, TargetType AttackersTargetType, Transform YourTargetsTransform, int RagdollForce)

    //Damages an AI to the YourTargetReference object

    if (YourTargetReference.GetComponent<EmeraldAI.EmeraldAISystem>() != null)

    {

    YourTargetReference.GetComponent<EmeraldAI.EmeraldAISystem>().Damage(YourDamageAmount, EmeraldAI.EmeraldAISystem.TargetType.Player, YourPlayerTransform, 400);

    }
     
  4. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,926
    @keepthachange > I suppose that'd be a question for the emerald AI people, I don't know that system at all.
     
  5. GPG

    GPG

    Joined:
    Feb 22, 2013
    Posts:
    13
    Hello, I'm having a hard time setting up an AI who just runs and hits the player with a melee weapon, it's a zombie so it doesn't actually need to have a weapon in hand, I have looked at the tutorials but I am no closer to sorting the issue and there is no 3d example of a melee AI for me to follow can anyone help
     
  6. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,926
    @GPG > There are examples of 2D melee enemies, the logic would be exactly the same in 3D. I'd recommend looking at them and replicating that. And in the context of the engine, any melee attack is a Weapon, even if it doesn't have a model, so I'd suggest creating one. Of course there are other ways to apply damage, but that's probably what you're after.
    If the issue persists please use the support form and provide more info about what you're doing, thanks.
     
  7. cat3515

    cat3515

    Joined:
    Mar 11, 2015
    Posts:
    4
    Hello
    I bought the Top Down Engine on October 31, 2019.
    I'm using v. 1.5.1 on Unity 2019.2.0f1.
    I must say I'm very happy with it.

    In my game, a dialog is triggered when the player is at a certain distance from a target (NPC).
    At this point ( when the dialog is triggered ), I need to pause the engine to prevent interaction.
    I can call the pause window but I don't want the resume, restart level or back to level selection buttons to appear.
    What I mean is: Is there a way of pause the engine ( like the pause window), but not showing the pause menu?
    Or maybe a way to prevent game input...
    Can you please help me on this?
    Best regards
     
  8. Muppo

    Muppo

    Joined:
    Sep 28, 2016
    Posts:
    242
    You can freeze your player movement and input when the dialogue plays, if that helps
     
    imitrea likes this.
  9. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,926
    @cat315 > I answered your email as soon as I got it, didn't you receive it correctly (or someone sent the exact same question). In any case, here's my answer : Sure, you can use the GameManager's Pause method by specifying whether you want a pause menu or not (it's the method's only parameter, as explained in the documentation).
     
    cat3515 likes this.
  10. judemcenth

    judemcenth

    Joined:
    Feb 27, 2016
    Posts:
    13
    hello, is there a way already included to make the projectiles ricochet or would i have to edit the code? thank you
     
  11. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,926
    @judemcenth > No, that's not something that is built-in right now.
     
    judemcenth likes this.
  12. Mirgan

    Mirgan

    Joined:
    Feb 2, 2016
    Posts:
    25
    Hello! Any one tried to use this asset on mobile devices? I turned off construction processing, released the worst quality, deleted everything except 1 character from the scenes, and the FPS does not rise more than 20 = (Maybe there is a chance that it will work on mobile devices?
     
  13. Muppo

    Muppo

    Joined:
    Sep 28, 2016
    Posts:
    242
    It works out of the box, but it depends much on the power of the device you're using.
     
  14. hjenkinz

    hjenkinz

    Joined:
    Sep 11, 2012
    Posts:
    5
    Hey all. Maybe someone experienced with the engine can point me in the right direction here...

    I'm making a game with a 3D environment but with sprite characters.

    upload_2020-2-6_11-56-39.png
    Character movement works great by simply using the Top Down Controller 3D, Character Orientation 2D (so the sprite flips) and MM Billboard.

    I'm having an issue getting the weapons to shoot around the character correctly. Essentially I'm trying to reorient the Koala Rifle to shoot on the Z and X axes rather than the Y axis. I tried swapping out and modifying the Character Orientation script and I've looked at the weapon code, but I can't quite figure out how to make this work. If someone could point me in the right direction (Is it in the character script, the weapon script etc?) then that would be much appreciated.
     
  15. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,926
    @Mirgan > Have you tried profiling your game to understand what's wrong with your build? The engine itself is very low footprint. It's likely on your assets' side. Without knowing if you're CPU or GPU bound for example, it's quite hard to provide any advice. If the issue persists don't hesitate to provide more info via the support form.
    @hjenkinz > Make it a normal 3D weapon (like the Loft ones), with a billboard behaviour for your sprite. I wouldn't recommend trying to use the 2D scripts to create a 3D weapon. Your game as you set it up is purely 3D now. The shape of your models has no impact on the logic.
     
  16. hjenkinz

    hjenkinz

    Joined:
    Sep 11, 2012
    Posts:
    5
    Thanks @reuno. That helped. Unfortunately, the sprite of the weapon will not face the camera no matter what I do. The sprite of the gun is several layers deep into the parent object, and if I attach the billboard behaviour as you suggest, it detaches from the character completely. If I put the billboard behaviour on the top layer of the gun it also doesn't work. I don't understand why the MMBillboard script has to make a parent, rename it etc. Am I better off just writing my own billboard behaviour script?
     
  17. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,926
    @hjenkinz > Oh I didn't mean MMBillboard, that's for a completely different use. I just meant use a billboard approach. That would probably be solved at the shader level in your case.
     
  18. zarkarkas

    zarkarkas

    Joined:
    Dec 4, 2018
    Posts:
    2
    Hello!

    Sorry if the question was already asked, but could you tell me if the management of a party is supported already?
    Such as allowing the player to control many characters at the same time, like a in RTS games or party RPGs.

    Thanks in advance
     
  19. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,926
    @zarkarkas > While it's certainly possible to implement it using the engine, there is no example of that right now. And it's never been asked before :)
     
    zarkarkas likes this.
  20. zarkarkas

    zarkarkas

    Joined:
    Dec 4, 2018
    Posts:
    2
    Ok, thank you for the reply! :) I will find a way to implement it ! ;)
     
    reuno likes this.
  21. MudPuppet

    MudPuppet

    Joined:
    Aug 10, 2012
    Posts:
    162
    Hello, I am in the process of setting up my 3d character and currently it is mostly setup in the same fashion as one of the Loft3d characters. ie: Humanoid Rig/Animator Controller. So far everything seems to be working okay and looking how I want except for one thing and that's when a weapon is attached. I am not sure if this is to do with how the WeaponIK class is setup or humanoid rig setup.

    My first issue is that when using weapon IK setup the hands auto-attach to the weapon just fine but the character's head is looking directly at the WeaponAttachment GameObject. I need to work out some way for the neck/head to be ignored. I have tried to utilise masking on the humanoid rig for my 'Idle with Weapon' model/rig but am under the impression that the Weapon IK system somehow overrides that side of character setup and in the rig itself.

    My second issue is with the Weapon again but when a character is crawling. I am not sure of the ramifications of having such a feature but it would be nice if there was some other weapon offset settings for dealing with when the character is crouched or crawling so that the weapon does not appear to be sticking out of the character's head.

    Thus far i am just tinkering trying to perhaps find a happy medium between WeaponAttachment on the character vs WeaponAttachmentOffset on the weapon but can't seem to hit a solution for both situations.

    Any advice or info would be greatly appreciated.
     
  22. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,926
    @MudPuppet > You'd need to extend WeaponIK to adapt it to your specific use case. Right now it'll impact the head as well.
    As for your second question, you have access to a list of objects to offset in the CharacterCrouch class, as explained in the documentation.
    And please just use the support form, as you already do. No need to post everywhere, thanks.
     
  23. MudPuppet

    MudPuppet

    Joined:
    Aug 10, 2012
    Posts:
    162
    Hey Reuno, no problem but thanks for clarifying that it was the WeaponIK class as that gives me somewhere to look into. At the moment I have just set the WeaponAttachment way in front to get the head up a bit and the actual weapon geometry offset backwards to compensate. I will also double-check on the CharacterCrouch class for further 'offset' options. I guess that another hack might be to offset the neck/head in the rig/animations.
     
    reuno likes this.
  24. ellisthemiracle

    ellisthemiracle

    Joined:
    Jul 4, 2018
    Posts:
    27
    Hello,
    I've been using this asset for some time now and really like it.
    But is there any third-party support for this asset? For example, I want to use ProCamera 2D plugin as my main camera controller, is it possible?

    Regards.
     
  25. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,926
    @ellisthemiracle > Everything's possible. I don't know that specific asset, and don't provide support for 3rd party assets, but people have been using the engine with all sorts of other assets. I don't see why this one couldn't be integrated. You should ask on the discord I think some people there have used it, the name rings a bell.
     
    ellisthemiracle likes this.
  26. Muppo

    Muppo

    Joined:
    Sep 28, 2016
    Posts:
    242
    ProCamera 2D works fine with Corgi Engine, you just need to set it. Can't tell more about because I don't use it but have seen it working perfect on CE v6.0
     
    ellisthemiracle likes this.
  27. ellisthemiracle

    ellisthemiracle

    Joined:
    Jul 4, 2018
    Posts:
    27
    Hey,
    Thanks for the reply.
    I bought the asset and it works perfectly with Top Down Engine.
    Cheers.
     
    reuno likes this.
  28. farazk86

    farazk86

    Joined:
    May 31, 2017
    Posts:
    195
    Hi,

    I finally got some time to play around with this asset but am having troubles with getting it to work.

    I'm using Unity 2019.3.0 and the latest top down engine. I followed the instructions here: https://topdown-engine-docs.moremountains.com/install.html but from the very get go I was having troubles with the invalid dependencies for some of the packages. Even though I was using 1.6.1 of TDE I still followed teh manifest.json method but that also did not work.

    What did work was manually updating all of the packages in the package manager.

    Now when I press play, I get errors like this on every demo:

    Capture.PNG

    I tried deleting the folder and re importing again from the asset store but its the same problem.

    Am I the only one getting this? How do I fix this please?

    Thanks
     
  29. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,926
    @farazk86 > I've never seen these errors, and they've never been reported either. Without context or any info on what you did it's hard to tell what could cause them. Please provide more info via the support form, thanks.
     
    farazk86 likes this.
  30. farazk86

    farazk86

    Joined:
    May 31, 2017
    Posts:
    195
    Thanks for the reply. but it seems to be a problem with the latest version of Unity, I just used 2019.2.12 and its working out of the box. :)
     
  31. mickeyband

    mickeyband

    Joined:
    Dec 30, 2018
    Posts:
    16
    Hi, I'm having trouble editing Prefabs.

    Whenever I try to save a change, it hits me with 4 red errors involving MMFeedbackChromaticAbbreration and MMFeedbackCollorGrading both having the error "does not derive from MonoBehavior".

    Says please change script to derive or remove it from the GameObject. Haven't been able to figure out what to do.



    Unity Version 2019.3.0f6


     
  32. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,926
    @ItachiTGM > There seems to be something very wrong with your prefab, but without knowing what you did, or even what version of the engine you're on, it's quite hard to help.
    Please provide more info via the support form, thanks.
     
  33. ApeAsylum

    ApeAsylum

    Joined:
    Jul 22, 2017
    Posts:
    2
    Hey,

    The new version does not seem to work using Unity version 2019.3.1f1. I followed the installation instructions and copied the manifest.json over to the new location and re-imported.

    I received this error on re-launch of unity:
    upload_2020-2-19_13-18-49.png

    If I continue I get the following compiler errors:
    upload_2020-2-19_13-27-19.png

    Hope I haven't just done something dumb :S
     
  34. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,926
    @ApeAsylum > As explained in the documentation, you don't have to copy the manifest anymore. This is only for older versions of Unity.
    As for 2019.3.1f1, it's not supported by default right now, so all you have to do, as explained in the documentation, is manually update the packages that tell you they need to be updated. That can differ from install to install, but it's likely to be the Pixel Perfect Camera one, as seems to be the case in your screenshot.
    If the issue persists please use the support form, thanks.
     
    ApeAsylum likes this.
  35. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    488
    @ApeAsylum It works fine in 2019.3.x - just import TDE then manually update the packages in package manager and you're good to go
     
    reuno likes this.
  36. MudPuppet

    MudPuppet

    Joined:
    Aug 10, 2012
    Posts:
    162
    Hello, I am considering some kind of Jetpacking3D ability for a character as I don't want it to be able to jump but rather hover instead, at a constant height, whilst the jump button is held down. Would looking at the JumpAbility be the best place to investigate this or could it be more beneficial to look at the Jetpack Ability in the Corgi Engine?

    I am only enquiring here in the forum because I am shutdown for the night and don't have access to Unity on this computer. Perhaps someone has already achieved Jetpacking in TDE and can point me in the right direction.

    This is actually for a Follower/Pet character that I also hope to be able to switch to in-game so maybe I need a custom JumpAbility for when it's following and the JetpackAbility for when it is controlled by the player.

    Any advice much appreciated.
     
  37. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,926
  38. gferrari

    gferrari

    Joined:
    Jan 14, 2015
    Posts:
    135
    Hello! I am testing the Minimal 2D grid Demo and when I reach an edge it get stuck (I can´t move it anymore, only shoot). It is a new project with Unity 2019.3.2f1, I just import the asset. I do not know if I have to configure something, if it is a bug or a bad installation of the asset (Follow the instructions of the Important notes)

    Thanks!
    upload_2020-2-22_22-54-28.png
     
  39. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,926
    @gferrari > Hello, yes, that is indeed a bug.
    It's been heavily reported and fixed for the next release.
    Thanks for reporting this.
     
    gferrari likes this.
  40. Automageddon

    Automageddon

    Joined:
    Oct 31, 2016
    Posts:
    4
    Hi Reuno,
    Congrats on the engine, super flexible and amazing out of the box.
    Quick question, is it possible to set up turn based movement on this engine?
    Player would move by 1 tile, then its enemy turn and so forth.
    I checked the API but it doesn't seem there's anything that I can use to get that info.
     
  41. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,926
    @Automageddon > There is already a grid system you can use for this, and public APIs that will let you move your characters any number of tiles in any direction, you should check it out. There are also multiple examples of grid movement within the asset that you can look at. The Explodudes demo is the bigger one.
     
  42. Automageddon

    Automageddon

    Joined:
    Oct 31, 2016
    Posts:
    4
    I think I might have worded my question incorrectly, I know they are grid based, but is there a way to move in turns?
    Or to get an event after player or Ai have moved by 1 unit so I can implement my own turn system?
     
  43. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,926
    @Automageddon > No, that'd be a bit outside the scope of the engine. From what I understand you're just after a simple counter that fires events on a regular basis, that shouldn't be too hard to implement. And then with the engine's APIs I mentioned earlier it should be fairly easy to get what you have in mind.
     
  44. BioBurden

    BioBurden

    Joined:
    May 28, 2018
    Posts:
    115
    Hi, I'm just wondering if there's plans for a dialogue feature? Ie. RPG-like dialogue between the player and NPCs etc.
    Thanks.
     
  45. vorokoi

    vorokoi

    Joined:
    Oct 18, 2019
    Posts:
    39
    Dialogue System by Pixel Crushers already has an integration for TopDown Engine. I highly doubt dialogue would be added to TDE since it isn't usually found in this genre.
     
    TonyLi likes this.
  46. BioBurden

    BioBurden

    Joined:
    May 28, 2018
    Posts:
    115
    That's perfect, many thanks for recommending that asset. :)
     
  47. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,926
    @BioBurden > No plans for that in the immediate future. I've never tried Dialogue System myself but I've only heard praise for it from the people who've used it with the engine.
     
  48. MudPuppet

    MudPuppet

    Joined:
    Aug 10, 2012
    Posts:
    162
    Last week I managed to bring in the Dialogue stuff (DialogueZone/DialogueBox) from Corgi Engine and with a little effort get the Dialogue System to work in exactly the same way as the DS/Corgi integration package does utilising the DialogueZone. About the only thing that I didn't conquer was the character 'freeze' (but enough so that the player can't move).

    Other than that, yes, the Dialogue System works with TDE and has a standard integration package - my choice for utilising the Corgi Dialogue Zone was that I like the look of it and had already sorted it out along with Rewired in my Corgi platformer project.

    DS_TDE_Integration.jpg
     
  49. Muppo

    Muppo

    Joined:
    Sep 28, 2016
    Posts:
    242
    @MudPuppet ,
    You can freeze the character but it works different from Corgi one. Add this where the "freeze" method was called.

    Code (CSharp):
    1. //if the player can't move while talking, we notify the game manager
    2. if (!CanMoveWhileTalking)
    3. {
    4.     _characterButtonActivation.GetComponent<Character>().ConditionState.ChangeState(CharacterStates.CharacterConditions.Frozen);
    5.  
    6.     if (ShouldUpdateState)
    7.     {
    8.         _characterButtonActivation.GetComponent<Character>().MovementState.ChangeState(CharacterStates.MovementStates.Idle);
    9.     }
    10. }
    Working fine on TDE v1.5.1
     
    MudPuppet likes this.
  50. MudPuppet

    MudPuppet

    Joined:
    Aug 10, 2012
    Posts:
    162
    Hello, just wondering about Pet/Followers, AI setup, Character Swapping, and Player/Enemy Layers. Currently I have the pet following the player but it only works if the pet character's Layer is set to Enemies. I also have Character Swapping working with the Player and the pet. I am wondering what might be the best way to set the Layer up for the Pet so that when it is player controlled I don't run into any issues with other stuff in the engine. Should I perhaps set up a new layer for it (like Followers perhaps)?