Search Unity

[RELEASED] TopDown Engine by More Mountains [new v1.5 : grid movement and new demo]

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

  1. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,083
    @anil_unity385 > Create a new class, call it whatever you want, make sure its execution order is last, and have it call a pause event (TopDownEngineEvent.Trigger(TopDownEngineEventTypes.Pause, null)) on Start.
     
  2. anil_unity385

    anil_unity385

    Joined:
    Feb 7, 2019
    Posts:
    18
    Thank you sir!
     
    reuno likes this.
  3. anil_unity385

    anil_unity385

    Joined:
    Feb 7, 2019
    Posts:
    18
    Another question if you don't mind answering @reuno . I want to increase the damage a weapon does at run time. My character collects a power-up / learns a skill and this increases the damage they do. I see that Damage is assigned from the DamageOnTouch class, and that is spawned from the Projectile class. Would I need to add another variable to the weapon itself instead of the projectile and map this at run time to each bullet?

    My game has the concept of the starting damage being X, but this value can increase through gameplay.
     
  4. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    390
    I'm also interested by that answer. Have some ideas already but hearing it from the dev's vision would be awesome :)
     
  5. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,083
    @anil_unity385 > Basically you'll want to have that value change every spawn. To do so, the easiest way is to extend ProjectileWeapon, and in the SpawnProjectile method, where the projectile gets setup (around line 100), you also set its DamageOnTouch values.
     
  6. MaKuZ

    MaKuZ

    Joined:
    Jan 1, 2018
    Posts:
    2
    Before I ask something, I would like to say that I'm super noob! But love games and want to make one, I'm an artist by profession, I have been exploring almost 1 year for possible options, I'm no coder, even I actively try to ignore it, my core focus are art and story, so I was looking for full systems, and I came across to some, personally fall in love with your system, I did not buy it yet, was reading your documentation, before I buy it there are two information I need to know badly, I want to implement research system. It will allow players to unlock new abilities as well as their upgrades. Is there any way I can implement this using this engine, secondly is there any quest system. frankly I'm very much stuck between ORK and this topdown engine. I'm unable to create custom things, so totally dependent on Out of box things , my game will be 2d game, please help.
    Thanks and regards
     
  7. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,083
    @MaKuZ > There are systems within the engine that you could repurpose for these features, but I wouldn't call that out of the box. You'd definitely need to create custom code for specific features like that.
     
    IlyaKo and MaKuZ like this.
  8. MaKuZ

    MaKuZ

    Joined:
    Jan 1, 2018
    Posts:
    2
    Ohh sure, thanks a lot, any plan for such things in future?
     
  9. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,083
    @MaKuZ > Maybe down the line. I still want to focus on core top down features first.
     
    MaKuZ likes this.
  10. bravery

    bravery

    Joined:
    Mar 26, 2009
    Posts:
    270
    Hi reuno,

    I'm analyzing the Koala Dungeon level, as I'm interesting in building a top-down 2D levels, and I notice that all the level elements (doors, grounds, walls, decoration ...etc) are exist under the Grid (so you have design it using unity tilemap), however there is freeformProps are exist out-side the grid like PushableBlocks Falling platforms these are not using the tilemap / grid system!
    may I ask why is that? or what is the advantage of keeping them out-side?
     
  11. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,083
    @bravery > Outside of the grid they can move (or be positioned) without being snapped to the grid.
     
  12. bravery

    bravery

    Joined:
    Mar 26, 2009
    Posts:
    270
    nice, I like how the level is being designed, it look professional and have a lot of details, may I ask the following:
    1- when you build this level koala , what was your inspiration specially regarding the level design part?
    2- Was there any methodology you follow when you create this nice level? like have you sketch first on paper? How did you decide the rooms locations? and what every room should contain?
    It will be great if you can share with us your experience in level design as well, as that will give a great push.
     
  13. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,083
    @bravery > The Koala demo is just loosely based on the layout of the Heroquest board game :)
     
  14. bravery

    bravery

    Joined:
    Mar 26, 2009
    Posts:
    270
    @reuno oh god, anyway do you have any ideas or can provide any support (references, urls ..etc ) on the art of top-down level design?
     
  15. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,083
    @bravery > I don't really have resources like that unfortunately. I've picked up all I know from working along with level designers in the industry, and I suppose studying games all the time, but I've never come across a manual or something. If it exists I'm interested :)
     
  16. RikiKlein

    RikiKlein

    Joined:
    Dec 14, 2018
    Posts:
    15
    There is an interesting talk about level design in Hyper Light Drifter:
     
    IlyaKo and reuno like this.
  17. Dougomite

    Dougomite

    Joined:
    Jul 15, 2011
    Posts:
    58
    Hey, loving the Top Down Engine, wanted to mention a feature I thought could be useful.

    1. Buttons that have an activation time. Like they need to be held down for 3 seconds and taking damage would interrupt the button press. Also playing an animation while using the button could be useful.
    Not sure if something like that was in your plans but I'll probably add it to ButtonActivated at some point myself.
     
    reuno likes this.
  18. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,083
    @Dougomite > I don't think that was ever requested before, I'll add that to the todo list, thanks for the suggestion!
     
  19. tequyla

    tequyla

    Joined:
    Jul 22, 2012
    Posts:
    327
    Hello,

    is possible to drop items when monster or objects are killed/deleted ?

    ++
     
  20. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,083
    @tequyla > There is no dedicated component for that (yet - it's on the todo list).
    But in the meantime I believe it'd be doable to implement that without typing one line of code.
    You've already got item pickers, and every destructible thing (objects, enemies) rely on a Health component to handle their destruction. On that Health component you can bind an MMFeedback, and MMFeedbacks allow you to instantiate objects. So you could have a feedback play on death that instantiates a picker at an offset.
     
  21. Dougomite

    Dougomite

    Joined:
    Jul 15, 2011
    Posts:
    58
    Awesome to have that button idea on the list. I went ahead and made one myself. Here's the code for the class I wrote just to give you an idea of what I was thinking. I had to add some stuff to the base classes but I think the idea comes across.


    Code (CSharp):
    1.  
    2. public class HeldButtonZone : KeyOperatedZone
    3. {
    4.     [SerializeField]
    5.     protected float NecessaryTimeToHoldButton;
    6.     protected float _buttonHeldTime;
    7.  
    8.     public override void TriggerButtonAction()
    9.     {
    10.         if (!CheckNumberOfUses())
    11.         {
    12.             return;
    13.         }
    14.         if (_collidingObject == null) { return; }
    15.         if (RequiresKey)
    16.         {
    17.             CharacterInventory characterInventory = _collidingObject.GetComponentNoAlloc<CharacterInventory>();
    18.             if (characterInventory == null)
    19.             {
    20.                 PromptError();
    21.                 return;
    22.             }
    23.             _keyList.Clear();
    24.             _keyList = characterInventory.MainInventory.InventoryContains(KeyID);
    25.             if (_keyList.Count == 0)
    26.             {
    27.                 PromptError();
    28.                 return;
    29.             }
    30.             else
    31.             {
    32.                 if (NecessaryTimeToHoldButton <= _buttonHeldTime)
    33.                 {
    34.                     _buttonHeldTime = 0;
    35.                 }
    36.                 else
    37.                 {
    38.                     base.TriggerButtonAction();
    39.                     characterInventory.MainInventory.UseItem(KeyID);
    40.                 }
    41.             }
    42.         }
    43.         if (NecessaryTimeToHoldButton <= _buttonHeldTime)
    44.         {
    45.             TriggerKeyAction();
    46.             ActivateZone();
    47.         }
    48.     }
    49.  
    50. //New class added to ButtonActivatedZone and called in the CharacterAbility when a button is activated and is still  pressed afterwards
    51.     public override void TriggerButtonHeld()
    52.     {
    53.         if (!CheckNumberOfUses())
    54.         {
    55.             return;
    56.         }
    57.         _buttonHeldTime += Time.deltaTime;
    58.         _buttonPrompt.SetBackgroundFill(_buttonHeldTime / NecessaryTimeToHoldButton);
    59.         if (NecessaryTimeToHoldButton <= _buttonHeldTime)
    60.         {
    61.             TriggerButtonAction();
    62.             _buttonHeldTime = 0;
    63.         }
    64.     }
    65.     /// <summary>
    66.     /// Activates the zone
    67.     /// </summary>
    68.     protected override void ActivateZone()
    69.     {
    70.         _lastActivationTimestamp = Time.time;
    71.         ActivationFeedback?.PlayFeedbacks(this.transform.position);
    72.         if (NecessaryTimeToHoldButton > _buttonHeldTime)
    73.         {
    74.             return;
    75.         }
    76.         if (HidePromptAfterUse)
    77.         {
    78.             _promptHiddenForever = true;
    79.             HidePrompt();
    80.         }
    81.         _numberOfActivationsLeft--;
    82.     }
    83. }
    84.  
    85.  
     
  22. IndieGBA

    IndieGBA

    Joined:
    Oct 24, 2017
    Posts:
    8
    Hello,

    Is there the possibility to turn the 4-directional 2D into 8-directional?

    Thanks,
     
  23. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,083
    @Dougomite > Thanks for sharing this! Can I add it to the extensions repository?

    @IndieGBA > Absolutely, that's already supported. Basically in your animator you just need to setup the blend trees so they support 8 animations instead of 4 (as is already the case in the demos).
    upload_2019-6-13_10-22-49.png
    That's just a matter of adding more animations in the bottom list here, and define what posX and posY you want for each.
     
  24. Dougomite

    Dougomite

    Joined:
    Jul 15, 2011
    Posts:
    58
    Yeah totally, I haven't tested it a ton but it works for what I wanted, just simple hold down activate zone for X amount of time.

    The next thing I needed that I'll probably add is a MMFeedback that instantiates a random pickup, so we can drop loot when killing an enemy. I saw someone else ask about that, if I wanted to leave things like that for other people to use too is posting here the best place or is somewhere else better.
     
  25. Dougomite

    Dougomite

    Joined:
    Jul 15, 2011
    Posts:
    58
    Tonight went and made a Feedback to randomly drop some loot.
    upload_2019-6-14_0-33-8.png

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4.  
    5. namespace MoreMountains.Feedbacks
    6. {
    7.     /// <summary>
    8.     /// This feedback will instantiate a random associated objects
    9.     /// </summary>
    10.     [AddComponentMenu("")]
    11.     [FeedbackHelp("This feedback allows you to instantiate the loot drops specified in its inspector, at the feedback's position (plus an optional offset). You can also optionally set an amount of force to launch the loot from the spawn point.")]
    12.     [FeedbackPath("GameObject/Loot Drop")]
    13.     public class MMFeedbackLootDrops : MMFeedback
    14.     {
    15.         public int minimumNumberOfLootToSpawn = 1;
    16.         public int maximumNumberOfLootToSpawn = 1;
    17.  
    18.         [Header("Loot Objects")]
    19.         public List<LootItemInfo> ListOfLootToInstantiate = new List<LootItemInfo>();
    20.         private LootItemInfo LootToInstantiate;
    21.         /// the position offset at which to instantiate the vfx object
    22.         public Vector3 LootPositionOffset;
    23.  
    24.         protected MMMiniObjectPooler _objectPool;
    25.         protected GameObject _newGameObject;
    26.  
    27.  
    28.         private int LootObjectWeightTotal = 0;
    29.         public float lootSpawnForceMaxRadius = 1;
    30.         public float extraForceToPickup = 5;
    31.         public float extraForceToPickupRadius = 5;
    32.         public ForceMode forceMode = ForceMode.Impulse;
    33.  
    34.         /// <summary>
    35.         /// On init we create an object pool if needed
    36.         /// </summary>
    37.         /// <param name="owner"></param>
    38.         protected override void CustomInitialization(GameObject owner)
    39.         {
    40.             base.CustomInitialization(owner);
    41.  
    42.             if (Active && (ListOfLootToInstantiate.Count > 0))
    43.             {
    44.                 LootObjectWeightTotal = 0;
    45.                 foreach (var lootObject in ListOfLootToInstantiate)
    46.                 {
    47.                     LootObjectWeightTotal += lootObject.weightedChance;
    48.                 }
    49.             }
    50.         }
    51.  
    52.         /// <summary>
    53.         /// On Play we instantiate the specified object, either from the object pool or from scratch
    54.         /// </summary>
    55.         /// <param name="position"></param>
    56.         /// <param name="attenuation"></param>
    57.         protected override void CustomPlayFeedback(Vector3 position, float attenuation = 1.0f)
    58.         {
    59.             if (Active && (ListOfLootToInstantiate.Count > 0))
    60.             {
    61.                 int numberOfLootToSpawn = Random.Range(minimumNumberOfLootToSpawn, maximumNumberOfLootToSpawn);
    62.  
    63.                 for (int lootNumber = 0; lootNumber < numberOfLootToSpawn; ++lootNumber)
    64.                 {
    65.                     int randomNumber = Random.Range(0, LootObjectWeightTotal);
    66.  
    67.                     foreach (var lootObject in ListOfLootToInstantiate)
    68.                     {
    69.                         randomNumber -= lootObject.weightedChance;
    70.                         if (randomNumber <= 0)
    71.                         {
    72.                             LootToInstantiate = lootObject;
    73.                             break;
    74.                         }
    75.                     }
    76.  
    77.                     if (LootToInstantiate != null)
    78.                     {
    79.                         for (int i = 0; i < LootToInstantiate.amount; ++i)
    80.                         {
    81.                             _newGameObject = GameObject.Instantiate(LootToInstantiate.gameObject) as GameObject;
    82.                             _newGameObject.transform.position = position + LootPositionOffset;
    83.                             //set a random position spawn position
    84.                             _newGameObject.transform.position += Random.insideUnitSphere * lootSpawnForceMaxRadius;
    85.  
    86.                             Rigidbody rb = _newGameObject.GetComponent<Rigidbody>();
    87.                             if (rb != null)
    88.                             {
    89.                                
    90.                                 //apply force to the loot objects
    91.                                 _newGameObject.GetComponent<Rigidbody>().AddExplosionForce(extraForceToPickup, transform.position, extraForceToPickupRadius, 1, forceMode);
    92.                             }
    93.                         }
    94.                     }
    95.                 }
    96.             }
    97.         }
    98.     }
    99.  
    100.     [System.Serializable]
    101.     public class LootItemInfo
    102.     {
    103.         public LootItemInfo()
    104.         {
    105.             amount = 1;
    106.             weightedChance = 1;
    107.         }
    108.  
    109.         public GameObject gameObject;
    110.         public int amount;
    111.         public int weightedChance;
    112.     }
    113. }
    114.  
     
  26. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,083
    limo likes this.
  27. Boggler

    Boggler

    Joined:
    Jun 8, 2014
    Posts:
    2
    Hello, first of all I would like to say that I am loving working with this asset, I was really surprised by the quality. :D

    I'm currently trying to set the inventory system to fit my project proposal, but I'm having a hard time understanding, since my C# knowledge is not as advanced as the asset (I'm working to get this level haha), then I would like to know if someone with a deeper knowledge could point me in a direction to what I want to do, I just need one direction, I can handle the rest.
    I've been reading the documentation and the API , but without success in seeing exactly what I need.

    My question is as follows, I'm trying to get the items to be selected with the simple "hover" of the mouse, for example in the following gif, I need to click on an item so I can move it, what I wanted to do is that by the mouse over the item I want, the item is selected automatically without needing any click.



    I do not want any script or anything of the kind delivered in my hand (Copy / paste), I just want a simple direction from where I could modify the code to make it work, more precisely in which script this function to click the item first and use some function (e.g. "move") is found.

    I hope that I have been able to explain my problem correctly, pardon me for any spelling errors, and thanks for any help. <3
     
  28. Dougomite

    Dougomite

    Joined:
    Jul 15, 2011
    Posts:
    58
    @Boggler, Check out the file InventorySlot.cs and look at the OnSelect and SlotClicked functions. Since InventorySlot inherits from the Unity Button(https://docs.unity3d.com/ScriptReference/UI.Button.html) class you should be able to check if the buttons "IsHighlighted" and do something then. Editing in there should get you in the area of what you're looking for.

    Also might need to tweak some stuff in the InventoryDisplay & InventoryInputManager....but probably not.
     
    Last edited: Jun 16, 2019
    reuno and Boggler like this.
  29. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,083
    Boggler likes this.
  30. Boggler

    Boggler

    Joined:
    Jun 8, 2014
    Posts:
    2
    @Dougomite @reuno Many thanks for pointing me to the location where I could solve my problem, after a good time playing with the script, I finally managed to make them work the way I wanted them, it probably was not the best way it should be done lol, the important thing is that it is working as I planned. So thank you. :)

    @reuno A little doubt, is there any plan already set to make the "Top Down engine" work on Unity 2019.2, or some micro solution to the "Cinemachine UI" error, or are you waiting for some official or more stable release? I'm just asking out of curiosity.
     
  31. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,083
    @Boggler > I'm not aware of any Cinemachine UI error, all you have to do if you want to use 2019.2b is maybe update the packages that trigger errors. I don't think there are any errors with the engine itself, just packages.
    But no, I don't plan to make the engine natively work with such an unstable beta (or any beta for that matter). This is a production tool.
     
    Boggler likes this.
  32. VP_no1

    VP_no1

    Joined:
    May 12, 2018
    Posts:
    105
    Hi. I am new to 2D and sprites and I watched some tutorials and read documentation. I am not 100% I understand how to build a new level in TD Engine.
    The only way I can think of is to build my own palettes and use them to paint new TileMap Game Objects or on existing TileMaps. Is this correct?
    Thank you!
     
  33. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,083
    @VP_no1 > In 2D you can certainly use tilemaps, or simply sprites.
    To create a new level it's recommended to look at the minimal scene documentation (and/or tutorial) and start from there.
    It's really just a matter of dropping sprites or painting tiles and setting the proper layers for your walls and ground, and boom you've got a level.
     
    VP_no1 likes this.
  34. IndieGBA

    IndieGBA

    Joined:
    Oct 24, 2017
    Posts:
    8

    Hello, Is there a chance that this system runs on runtime? Would it be fantastic for it to be used to place objects (trees, boxes, various props, houses, etc.) on the map and change how the map looks and create a randomized level every time you start a game? Thank you!
     
    digiross likes this.
  35. tequyla

    tequyla

    Joined:
    Jul 22, 2012
    Posts:
    327

    thanks you Sir.

    ++
     
  36. dev_2051

    dev_2051

    Joined:
    Jul 25, 2013
    Posts:
    78
    hi @reuno , Does top down engine has any inbuilt companion AI features which can assist the main characters?

    Thanks
     
  37. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,083
    @dev_2051 > The engine comes with an advanced AI system, made of actions and decisions (mostly) that let you create any kind of NPC, whether it's friend or foe, and you could use it to create a companion AI. I'd recommend looking at the Advanced AI part of the documentation to learn more about this and see if that works for what you have in mind.
     
  38. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,083
    Good news everyone, I've just submitted v1.4 of the TopDown Engine to the Asset Store. As usual, it solves all reported bugs to date, and brings enhancements and new features. Most of the new features this time revolve around the most requested feature to date, the ability to change characters at runtime. You'll now be able to do so in three different ways : swapping between multiple characters in a scene, replacing your current character with another prefab entirely, or simply change its model at runtime.

    Here are the full release notes :
    - Adds the CharacterRotation2D ability, allowing you to rotate a 2D model entirely, to face either the movement's direction or the weapon's direction (think Hotline Miami). Also adds the RotatingKoala prefab to demonstrate that.
    - Adds an example of how you can use a switch/lever to open/close a door to the MinimalSandbox2D demo scene.
    - Adds PickableActions, items that can be picked and trigger any action of your choice on pick. Adds an example of that with a key in the MinimalSandbox2D demo scene, that makes a door openable on pick.
    - Adds ButtonActivator, a class you can put on any object to make it possible for it to activate ButtonActivatedZones
    - Adds ButtonActivatedZones, a simple way to create zones that trigger actions when entered by the player and/or ButtonActivators.
    - Adds a Pressure Pad to the MinimalSandbox2D demo scene, a ButtonActivatedZone example, that opens or closes a door when the player steps on it, or when a Pushable Block is pushed on top of it. Yay, puzzles!
    - Adds a new MMFeedback to control floats from any monobehaviour
    - Adds MMFeedbackFade, a new MMFeedback to trigger fades in and out, or completely custom ones
    - Adds the CharacterSwitchModel ability, allowing you to switch just the visual appearance of a character at the press of a button.
    - Adds the CharacterSwap ability, which allows you to swap control over different characters in a scene (think Lost Vikings). Adds the Minimal2DCharacterSwap demo scene, that allows you to switch control over 7 different characters.
    - Adds the CharacterSwitchManager, that lets you replace your current Character with entirely new ones, replacing the full prefab.
    - Adds a better Ghost camera
    - Adds a better AutoRotate class
    - Adds more control options to Button Activated Zones : activation requirements, limit of one activation at once, ability to work with activators
    - Adds the PersistentBackgroundMusic class, to handle background music that survives scene loads. The "regular" BackgroundMusic class no longer persists over scenes.
    - Adds an option to set a second key binding to close inventories
    - Adds an option to ButtonActivated zones to be "activable" or not.
    - Adds explicit methods to close and open doors.
    - MMSpriteReplace now also supports SpriteRenderers, not just Images.
    - Adds a method to CharacterAbility to update the current target input manager
    - Adds a safe distance mechanism to MovingPlatforms2D, that optionnally moves characters closer inside the platform to prevent them from falling when they are barely on the platform on enter.
    - Character AutoBuild now automatically sets default layers for TopDownControllers
    - Fixes a case where melee weapon's gizmo box wouldn't display correctly
    - Fixes WeaponAim3D component menu name
    - Fixes a bug with the Activating animator parameter not triggering properly
    - Fixes a typo in MMInput
    - Fixes a few bugs that could happen when respawning characters with a healthbar and/or flicker
    - Fixes a bug that could cause duplicate detections of targets by the MMConeOfVision
    - Prevents potential exceptions when adding a MMCinemachineCameraShaker to a virtual camera without noise
    - Fixes a bug that prevented TopDownController3Ds to detect the possibility to go back to original size correctly
    - Prevents a weapon from applying a speed modifier to a character after having been auto destroyed
    - Enables GPU instancing on demo materials where relevant
    - Caches main camera in all instances where Camera.main was still used
    - Lightens the background texture used in all the Minimal2D demo levels for readability.
    - Renames CharacterAbility's Reset method to ResetAbility
    - Adds missing comments to the GrasslandsMultiplayerLevelManager class
    - Requires Unity 2019.1.0

    As usual, expect a few days of delay before it's available for download. I hope you'll like this new version!
     
  39. Michoko

    Michoko

    Joined:
    Apr 15, 2017
    Posts:
    11
    Thank you for the new release! Just adding my vote for a grid-based movement in upcoming versions. :)
     
    Boom_Shaka and reuno like this.
  40. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,083
    The update is now live, let me know if you run into any issues with it!
     
  41. MilziPPG

    MilziPPG

    Joined:
    Oct 9, 2018
    Posts:
    16
    Hi!

    Very much looking forward to check out the new update!

    Just a quick question about the AI and using projectile weapons. So, I'm using a 2D scene and I have an enemy that effectively acts as a turret that doesn't move. Here's a screenshot of the AI Brain (it is super simple for the minute until I can get this to work)

    ai brain.PNG

    I then have a projectile weapon attached to the AI and it should follow the player when the player enters the enemy AI's radius. This is what the Weapon Aim 2D that I have attached to the projectile weapon

    weapon aim 2d.PNG
    Now, the problem at the moment is that when I enter the radius and I get very close to the enemy, the projectile weapon starts going crazy and jitters hugely. It tries to follow the player but it aim everywhere like crazy and super quickly.

    However, what I have noticed is that if I increase the range of the radius, the jittering does not happen as much, but it still does.

    Anyone have any ideas?
     
  42. Boom_Shaka

    Boom_Shaka

    Joined:
    Aug 31, 2017
    Posts:
    99
    @MilziPPG - what do you mean by "jittering"? Is it rotating around it's available 8 directions trying to fix on target? Or is the weapon itself moving back-and-forth/up-and-down?
     
  43. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,083
    @MilziPPG > Hard to tell without context, but if there's some distance between the weapon and your brain's center it'll have a hard time figuring out where to shoot. You can either make sure the weapon is properly centered on your AI, or prevent shooting when too close.
     
  44. MilziPPG

    MilziPPG

    Joined:
    Oct 9, 2018
    Posts:
    16
    Yo, I've got a real short video of what it is



    I'll check and see the distance between the AI's centre and the weapon, see if that's anything. Thanks!
     
  45. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,083
    @MilziPPG > If the problem persists please use the support form, I'll need more info, this video doesn't show much unfortunately.
     
    MilziPPG likes this.
  46. MilziPPG

    MilziPPG

    Joined:
    Oct 9, 2018
    Posts:
    16
    Thanks @reuno, I will do!
     
  47. Boom_Shaka

    Boom_Shaka

    Joined:
    Aug 31, 2017
    Posts:
    99
    @MilziPPG - I've seen this behavior in other systems/platforms. The AI is caught between decision points and moving the object accordingly. Since the decisions occur so rapidly, the movement looks like "jittering". For example, I was working on a 2d game where the enemies switched directions based on the player location. Unfortunately, my player was so large it crossed over "switch" points; if the player was right above (or right below) the enemy, the AI couldn't decide whether to face left or right and kept flipping back-and-forth between the two. Looked my zombies were doing the "Thriller" move at warp speed.


    Hard to say from just the video, but my first guess is your minimum and maximum angles - they won't allow for 360 degree rotation, so your weapon won't be able to target anything below -45 degrees and above 45 degrees. Try -180 and 180 and see if that makes a difference.

    Second guess would be the 8-direction movement - try switching to "free" movement and see if that helps any.

    That's all I got...you may be better served with the support form.
     
    Last edited: Jun 26, 2019
    IlyaKo and reuno like this.
  48. SpyrosUn

    SpyrosUn

    Joined:
    Nov 20, 2016
    Posts:
    83
    Hi, I just started playing with TDE on new project, and I am getting a lot(like thousands of Input Axis/Button exceptions.

    I am seeing those when playing any of the demo scenes and not sure why. Any ideas ? Thanks !

    EDIT: I have a suspicion that it may be caused because of a clash with the project settings for TDE and another asset I am using, Easy Build System. Both display the message about the project options when installed.

    EDIT2: Indeed, that was the reason, when I removed Easy Build System, I stopped getting errors. I guess there is a conflict on how the two assets handle input, or something like that. Doesn't look like it would be a simple thing to combine them.
     

    Attached Files:

    Last edited: Jun 27, 2019
  49. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,083
    @SpyrosUn > I don't know that asset you mention, but you can probably just add their input settings at the end of the engine's one. It's just a text file with a long list of entries.
     
  50. Muppo

    Muppo

    Joined:
    Sep 28, 2016
    Posts:
    210
    Dunno why but forum stopped noticing me about new post, just ran into 1.4 by email.
    Still have to do the 'copy the manifest.json into your Packages folder' thing as I see, I'll give new features a try asap!