Search Unity

[RELEASED] Corgi Engine - Complete 2D/2.5D Platformer [new v8.0 : advanced damage system]

Discussion in 'Assets and Asset Store' started by reuno, Dec 18, 2014.

  1. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @Muppo > I'm glad it's working now. Thanks for sending additional info, I'll look into it to make sure there's no bug.
    @CrowbarSka > No, there's no movement on the Z axis, otherwise it would be 3D, not 2D. And it doesn't work with rigidbodies, that's the whole point of the engine actually :) But you might be interested in the TopDown engine, maybe, because the game you describe isn't a 2D platformer, it looks more like a top down action game.
    @guidkal69 > I never tried it but I highly doubt the parallax scripts would work out of the blue with Cinemachine. They've been designed to work with the default CameraController. If you change the controller, you'll need to modify these as well. I plan on integrating Cinemachine in the engine as the default controller, as I absolutely love this package. I'm just waiting on Unity to add proper support for packages in Asset Store assets, because right now it's non existent, and leads to a lot of problems. As soon as they add that, I'll gladly add support for it.
     
  2. KriYorDev

    KriYorDev

    Joined:
    Oct 3, 2017
    Posts:
    32
    Whoever is willing to assist me, I have a quick question. Maybe I am missing the part where I use some code from the engine.

    What i need is just simple trigger. I have a transparent box with a 2DCollider. When the Player goes trough it I wanted a GameObject to appear/disappear. The problem is that no matter what I tried the Player based on one of the Corgi Presets doesn't register the collision with the box. The box does have the Is Trigger tick. I made a small script, which I place on the box to detect the Player and enable the GameObject. Even tried the opposite. I really though its gonna be really simple, but maybe I have to do it some other way. Thanks.

    Code (CSharp):
    1.  
    2. using UnityEngine;
    3. using System.Collections;
    4.  
    5. public class EnableObject : MonoBehaviour
    6. {
    7.     public GameObject Zone;
    8.  
    9.     void OnCollisionEnter2D(Collision2D col)
    10.     {
    11.         if (col.gameObject.tag == "Player")
    12.         {
    13.            Zone.SetActive(true);
    14.             Debug.Log("Collided");
    15.         }
    16.     }
    17. }
     
  3. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @kriyordev > If your box is set to trigger, you might want to use OnTriggerEnter2D instead. There are multiple examples of this throughout the engine. A simple search will pop you many results. You can look at the LevelRestarter class for a barebones example of how it works. Note that this is nothing specific to the engine, it's just standard Unity :)
     
    KriYorDev likes this.
  4. KriYorDev

    KriYorDev

    Joined:
    Oct 3, 2017
    Posts:
    32
    Yes I am still learning to actually make use of the Corgi scripts. I took the LevelRestarter, changed it to just activate/deactivate the zone. Worked like a charm. OnCollisionEnter2D was from my first attempt, so I forgot to try OnTriggerEnter2D. Thanks a lot!
     
  5. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
  6. CrowbarSka

    CrowbarSka

    Joined:
    Dec 15, 2009
    Posts:
    192
    Right, it kind of is! I have most of my other mechanics figured out, I was just looking for a stable character motion controller. :D
     
    reuno likes this.
  7. KriYorDev

    KriYorDev

    Joined:
    Oct 3, 2017
    Posts:
    32
    Was this added in some way? I looked over the documentation, but didn't find any info on switches specifically. Apparently it was planned for version 2.2. I am asking just to know if should go about to make those trap systems myself with the AI on a basic level or MovingPlatforms at parts.

    Thanks!
     
  8. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @kriyordev > I think that's the ButtonActivated zone and all that went after that? There are now many tools and examples of how to have zones that the user can activate and that trigger stuff (chests, doors, etc). But I'm not sure if that's what you're referring to. That'd be the Keys, doors and chests section of the documentation, among other places.
     
    KriYorDev likes this.
  9. wedgiebee

    wedgiebee

    Joined:
    Aug 9, 2016
    Posts:
    40
    Hi, just bought the plugin a couple days ago and love how reliable the platforming feels! Great work!

    I've encountered an issue with moving platforms and was wondering if there are any workarounds or if I've set up something incorrectly.

    It's a very specific case, but basically if I have a MovingPlatform moving along the floor and I stand to the right side of it, when it touches me I fall through the floor! This does NOT happen when I stand to the left side.

    Corgi_MovingPlatformBug1.gif

    NOTE: This is what happens when the character is sized at 1x1 units! When the character is sized at 1 unit wide and 2 units high, this DOES NOT happen, so hopefully that gives some clues as to what the problem might be...
     
    Last edited: Nov 21, 2018
  10. cardcastleusa

    cardcastleusa

    Joined:
    Mar 20, 2018
    Posts:
    9
    Was having an issue with the Initialization()

    Basically when I used the Auto Builder for AI or Player everything would work as expected. Except when I tried to play. I would get the error of null in the foreach loops in EarlyProcessAbilities(), ProcessAbilities() and LateProcessAbilities().

    It seemed like the Initialization() was not being called in the virtual awake(). I was able to fix the issue by placing an if statement in each of the ProcessAbilities Functions


    Code (CSharp):
    1.  
    2. if (_characterAbilities != null)
    3.             {
    4.                 foreach (CharacterAbility ability in _characterAbilities)
    5.                 {
    6.                     if (ability.enabled && ability.AbilityInitialized)
    7.                     {
    8.                         ability.EarlyProcessAbility();
    9.                     }
    10.                 }
    11.             }
    12.             else
    13.             {
    14.                 _characterAbilities = GetComponents<CharacterAbility>();
    15.             }
    16.  
    Not sure if anyone else was having these errors.
     
  11. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @wedgiebee > That interaction is simply not supported by default :) There's no behaviour for that, and you'd have to implement the one you want. The fact that it works under certain circumstances is just coincidental. That kind of interaction falls under what I consider to be "physics" interactions, and while they're easy to handle with raycasts on something like a flat ground, they'd become really messy when on a slope for example, so I'm not trying to push the engine in that direction, Unity's physics would be much more suited for something like that. Depending on the behaviour you expect, implementing a behaviour for that can be fairly easy (or very hard). If you just want to be pushed on flat ground, creating a new ability that casts a ray, detects the platform, and adds to your controller the same speed would be quite simple and the way to go.

    @cardcastleusa > I've never heard of such errors, and I'm not sure how to reproduce, all my automated auto-builder tests are positive.
    I just did a manual test just to be sure : fresh install of the latest version of the engine (5.2), added a sprite in a scene, added a Character component to it, pressed the "Autobuild Player Character", pressed play, everything's fine, no error.

    I'm glad you fixed your problem, but if you've got a minute to spare please send me more details (asset version, Unity version, steps to reproduce the problem) on the support email, and I'll have a look at it!
     
  12. wedgiebee

    wedgiebee

    Joined:
    Aug 9, 2016
    Posts:
    40
    Ah got it :) Thanks for the suggestion! Yeah, for my use case I'm only working with flat surfaces, no slopes, so I'm gonna try that out! I much prefer the way your engine feels to how Unity physics feels, so gonna try my best to get this to work :p Thanks again ~
     
  13. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @wedgiebee > If that doesn't work out let me know, I'll see what I can do :)
     
  14. ehuvio

    ehuvio

    Joined:
    Nov 4, 2014
    Posts:
    15
    I just installed the Corgi and watched some AI videos. There's a mention of advanced AI methods, but there are no scripts where the video mentions they should be.
     
  15. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
  16. Worlz

    Worlz

    Joined:
    Nov 25, 2015
    Posts:
    2
    Hello,

    first of all the Corgi Engine Asset is a great and convenient tool. But while upgrading from v5.1 to v5.2 I came across a very strange bug.

    First, I upgraded Unity from the LTS 2017.4.15f to Unity 2018.2.15f1, than I upgraded Corgi from v5.1 to v5.2.
    In one of my levels build in v5.1, I placed some pushable box prefabs in the scene. After upgrading to v5.2, I changed those prefabs to work with the new push/pull mechanics.
    My level had 8 moveable boxes, but only 6 of them would function probably. Some boxes would not be pushed or pulled at all. I tried quite a lot of workarounds, from deleting the existing prefab to create a new prefab to set up the movable box prefab completely new, nothing seems to fix the problem.
    The strange part is, if I would copy an existing prefab from the hierarchy and use it, it would function properly until I save and switch the scene.
    After reloading the scene, the newly created moveable box would stop functioning.

    Digging deeper, I realised that switching between Force Binary and Force Text influence the functionality between moveable boxes.

    Finally, I found a fix for it, but it's rather ugly. I severed the connections from each box with the prefab and everything works fine. Every box is pushable/pullable.

    But this is rather inconvenient.

    Did someone else came across this bug?
    Did you find any other way to fix the bug?
    I hope my description is precise enough.

    Thank you in advance :)
     
  17. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @Worlz > Thanks for reporting this. I'm pretty sure I've fixed this bug for the upcoming release (it's a very weird one). If you can wait until the next release that's great, if not, drop me an email on the support email and I'll see if I can send you just the updated files.
     
  18. ehuvio

    ehuvio

    Joined:
    Nov 4, 2014
    Posts:
    15
    Thanks for the tip. After upgrade everything seemed to go right. But when I set up a character and put it on scene, it jumps off from level - so it doesn't stay where I set it and drop to floor. Any ideas? Another thing is that I want to create trigger points where AI character randomly changes direction, falls of from platform or jumps - or any combination of these. What would be best solution to create such?
     
  19. ehuvio

    ehuvio

    Joined:
    Nov 4, 2014
    Posts:
    15
    I removed the level bounds from AI character and then it didn't jump off level. Still another question. I would like the AI characters to change directions when bumping on each other. How would you do that?
     
  20. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @ehuvio > You'd need to create a new AI Action for this I guess.
    Edit : or maybe just use the existing ones and have the enemies layer as an obstacle layer on decisions. That could work too.
     
  21. ehuvio

    ehuvio

    Joined:
    Nov 4, 2014
    Posts:
    15
    Thanks for the answer. What about those trigger positions?
     
  22. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @ehuvio > Trigger positions? I'm not sure what you mean :)
     
  23. ehuvio

    ehuvio

    Joined:
    Nov 4, 2014
    Posts:
    15
    With trigger positions I mean a trigger placed on level in which - when an AI character comes by - it triggers a script that randomly affects AI characters action. Like move off platform, turn around or jump. And with witch it would be easy to tweak the values different choices. Like .50 to jump and .25 to turn around and to fall off.
     
  24. Muppo

    Muppo

    Joined:
    Sep 28, 2016
    Posts:
    242
    @ehuvio , you can use JumpOverride as reference for that then add a randomizer. As far as I know, it could look similar to this

    Code (CSharp):
    1.  
    2. using UnityEngine;
    3. using System.Collections;
    4. using MoreMountains.Tools;
    5.  
    6. namespace MoreMountains.CorgiEngine
    7. {  
    8.     public class BehaviorModifier : MonoBehaviour
    9.     {
    10.         public bool MoveOffPlatform;
    11.         public bool AnyOtherAbility;
    12.  
    13.         protected int RandomNumber;
    14.  
    15.         ///
    16.         public virtual void OnTriggerEnter2D(Collider2D other)
    17.         {
    18.             AIWalk _aiwalk = other.GetComponent<AIWalk>();
    19.             if(_aiwalk != null)
    20.             {
    21.                RandomNumber = Random.Range(0,[/* here goes the number of abilities you want to modify minus one */]);
    22.  
    23.                 if (MoveOffPlatform && (RandomNumber == 0))
    24.                     other.GetComponent<AIWalk>().AvoidFalling = false;
    25.  
    26.                 if (AnyOtherAbility && (RandomNumber == 1))
    27.                     other.GetComponent<AIWalk>().AnyOtherAbility = false;
    28.             }
    29.         }
    30.     }
    31. }
    32.  
    Is that what you're looking for?
     
    reuno likes this.
  25. Worlz

    Worlz

    Joined:
    Nov 25, 2015
    Posts:
    2

    Thank you for your help, I'll wait for the next release :)
     
    reuno likes this.
  26. AbhishekRaj

    AbhishekRaj

    Joined:
    Dec 1, 2016
    Posts:
    143
    Hello everyone,

    I am a Unity developer who is developing games from the last 3 years and I also have a bit of experience with C++. I have bought Corgi Engine because I always wanted to build a simple 2D Side Scroller, something on the lines of Flappy Bird but not the same because we have enough copies of that.

    I am facing issue of not knowing where to start? Corgi is absurdly feature rich and I think that it makes it very much complicated for beginners. I can't even describe how frustrated I am feeling because of not understanding anything about Corgi.


    Can anyone please help me with that? Some tips/suggestions or simple tutorials about Corgi. I have seen the video tutorials but I couldn't understand how to put all that into one and produce a game which can at least have a menu and a Gameplay scene.



    Thanks in advance
     
  27. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @AbhishekRaj > I'd suggest starting with the documentation, that even contains a "Getting started" section. And then dedicated sections and tutorials about each feature of the engine. Maybe start with the one that interests you the most. There's also a very entry level tutorial by Unity themselves about the engine, you might want to have a look at it.
    I'll also add that for something as simple as Flappy Bird (which isn't really a platformer) something like the Corgi Engine sounds a tad overkill :)
     
    AbhishekRaj likes this.
  28. AbhishekRaj

    AbhishekRaj

    Joined:
    Dec 1, 2016
    Posts:
    143
    Thanks for your advice. I will look up the tutorials which you mentioned. I sincerely hope that I understand more about Corgi Engine and use this incredibly awesome asset in the future.

    Is it an overkill? I never thought about this aspect. Do you suggest to develop such a game without the Corgi Engine? Actually, I have Zero experience with unity 2D so all these questions are from a noob's point of view:D
     
  29. Boom_Shaka

    Boom_Shaka

    Joined:
    Aug 31, 2017
    Posts:
    141
    Do particle systems' 2d colliders work out of the box with Corgi? In other words, can I add a damage on touch script to a game object that has a particle system with the 2d collider module active or do I just set Corgi variables/call events using OnParticleCollision in my own script?
     
    Last edited: Nov 25, 2018
  30. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @AbhishekRaj > Flappy Bird has to be one of the easiest game to make. I wouldn't use any framework to do so, native Unity is more than enough to handle that.
    @Boom_Shaka > I don't think this will work out of the box, no, you'll need a script for it I reckon. But I've never tried it, so I may be wrong.
     
    AbhishekRaj and Boom_Shaka like this.
  31. ehuvio

    ehuvio

    Joined:
    Nov 4, 2014
    Posts:
    15
    Hi, is there an existing way of detecting AI character's direction? Or do I have to set some getters?
     
  32. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @ehuvio > As explained in the documentation, you can look at a character's controller for info about its direction (its Speed, among others). This goes for all characters, AI or not. No need to add any getters :)
     
  33. shyamlondonconsolidated

    shyamlondonconsolidated

    Joined:
    Apr 1, 2018
    Posts:
    36
    Hi Reuno,

    I am trying to understand trigger event and listen events;

    In the LevelManager.cs, a playerdeath event is trigged;
    MMEventManager.TriggerEvent(new CorgiEngineEvent(CorgiEngineEventTypes.PlayerDeath));

    I have a scoremanager script which I want to listen for the player death event and essentially add some score, or save a PlayerPref score function


    public virtual void OnMMEvent(CorgiEngineEvent deathEvent)
    {
    if (deathEvent.playerdeath == "PlayerDeath")
    {
    // DO SOMETHING
    Debug.Log("Do something here!");
    totalScore += 100;
    }
    }

    I am unsure what the highlighted playerdeath needs to be.

    Kind Regards,

    Shyam
     
  34. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @shyamlondonconsolidated > That should be something like this (if I get what you're asking) :
    if (deathEvent.EventType == CorgiEngineEventTypes.PlayerDeath)

    You'll find many, many examples of these events being used in the engine.
    The AchievementRules script specifically looks for PlayerDeath events, for example.
     
  35. JAMiller

    JAMiller

    Joined:
    Apr 2, 2009
    Posts:
    78
    Hello,

    Really liking CorgiEngine and have been able to get a huge start on my game in just a few days. I've run into one problem with the 'non-physics' based controller, I don't know how to resolve. Is there any way to get the movement to 'slide' when encountering sloped walls and ceilings? For example, using the FlyingCopter character and flying into a 45 degree wall it will get stuck, rather than sliding along the collision.

    Any advice on how or where to implement this kind of sliding?

    Edit: I saw reuno's advice here on ground sliding, seems like it may be similar (except mine deals with any platform ceiling or wall you collide with, not what you are standing on).
     
    Last edited: Nov 27, 2018
  36. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @JAMiller > That's not something that is built-in.
    I see a bunch of different ways you could implement that :
    - modify the controller to handle that (not the easiest, but probably the cleanest)
    - have an ability add / modify the direction based on the angle you collide with (easier, safe)
     
  37. JAMiller

    JAMiller

    Joined:
    Apr 2, 2009
    Posts:
    78
    Thanks, I am looking into modifying the controller. Unfortunately I have no experience with non-physics based controllers so it will be a learning process.

    If I could add on more thing, I notice there are inconsistencies with the flying & sliding in general:

    When colliding horizontally-45 it slides fine but then gets stuck on the bottom:


    When colliding up-45 it slides for one pixel at a time (stair stepping kind of)


    When colliding down with the floor it does not slide unless facing towards the ground


    I realize this is not a flying engine but a platformer engine. However I'm trying to make a platformer where flying is a big part of it, and there are lots of 45 degree angles so the inconsistent movement when colliding is not good. At this point I would even prefer no sliding at all from any angle to be consistent.

    If I can't figure it out I may look into pausing the corgi physics controller and using Unity physics-based movement when flying to get smoother results.
     
  38. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @JAMiller > The "inconsistencies" come from the fact slopes and ceilings are handled differently. It is indeed a platformer engine. I wouldn't recommend it for a flying game. Actually if everything "flies", the TopDown Engine would be much better suited. If it doesn't, and it's only a punctual thing in your game, then either implement the changes I recommended, or indeed turn off the controller for a more simple one, a platformer controller is overkill if you just want to move around freely.
     
  39. KriYorDev

    KriYorDev

    Joined:
    Oct 3, 2017
    Posts:
    32
    I am in need of some assistance. I have manged to create various intractable platforms, but there is one that gets me an error I really couldn't decipher. I made a falling trap where the trap itself is an AI. It detects the player and moves with a chosen by me speed down. If it hits the Player he dies and the Trap as well. If the Trap touches my Platform ground, however everything stops. The trap has all the necessarily AI scripts, with just a small amount of Health. The problematic part is the DamageOnTouch script I added. I added the Target Layer Mask to Player & Platform, so when it hits a Player, the Trap takes and gives damage thus killing the Player and being Destroyed right after. This works. When it hits the Platform I get this:

    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. MoreMountains.CorgiEngine.DamageOnTouch.SelfDamage (Int32 damage) (at Assets/CorgiEngine/Common/Scripts/Agents/Damage/DamageOnTouch.cs:269)
    3. MoreMountains.CorgiEngine.DamageOnTouch.OnCollideWithNonDamageable () (at Assets/CorgiEngine/Common/Scripts/Agents/Damage/DamageOnTouch.cs:252)
    4. MoreMountains.CorgiEngine.DamageOnTouch.Colliding (UnityEngine.Collider2D collider) (at Assets/CorgiEngine/Common/Scripts/Agents/Damage/DamageOnTouch.cs:197)
    5. MoreMountains.CorgiEngine.DamageOnTouch.OnTriggerEnter2D (UnityEngine.Collider2D collider) (at Assets/CorgiEngine/Common/Scripts/Agents/Damage/DamageOnTouch.cs:152)
    I tried adding Health to the Platform too, as I thought maybe it crashes because the Trap can't deal the damage specified to the Platform as it did with the Player, but only take it when it hits the Platform. Didn't work. So yeah anything would be of help. I just want the Trap to be able to hit the Player and mutually kill each other and in case it missed it gets destryed but the Platform stays. Don't want to lose my ground.
     
  40. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @kriyordev > I'm afraid it's impossible to tell what might be wrong in your code from just that error. I would suggest using the debugger to see what is actually null at that moment in time, as the error tells you, and fix things from there.
     
    KriYorDev likes this.
  41. gferrari

    gferrari

    Joined:
    Jan 14, 2015
    Posts:
    135
    Hi! If I want use only the inventory system, what folder I need to import? thanks!
     
  42. Boom_Shaka

    Boom_Shaka

    Joined:
    Aug 31, 2017
    Posts:
    141
    Maybe add a DamageOnTouch script to your platform and have it only target your trap? Your trap would only target the player. Just a thought.
     
    reuno likes this.
  43. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
  44. KriYorDev

    KriYorDev

    Joined:
    Oct 3, 2017
    Posts:
    32
    Hmm ok. Will continue to poke around.

    P.S. I haven't changed any code btw. Its just the way I described it and I use only the stock Corgi scripts.
     
  45. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @kriyordev > Sure, but using the debugger to understand what's not working, in your code or the way you assembled the components, is still the best way to figure out what's wrong. Context is everything when it comes to a bug, and just that error, out of context, is not enough to do so.
     
  46. henkesky

    henkesky

    Joined:
    May 23, 2015
    Posts:
    36
    @reuno I was trying to set up more than one animations/ability for a particular weapon(to be able to perform more than one type of skill/ability with my sword), but it seems it can only have one melee weapon script and therefore one animation/skill. Is there a way i can add more than one skill to a particular melee weapon ?
    I tried to make another version melee weapon script with a different name and attach it to the weapon, so it can serve as a different skill, but it seems like character handler weapon only accepts gameobject with weapon melee weapon script.

    I have also noticed that my melee animations are played only half way. It starts, plays half way then stops immediately.
     
  47. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @henkesky > A few remarks :
    - as explained in the documentation, the CharacterHandleWeapon expects a Weapon (whatever its type). Your script probably doesn't inherit from Weapon. It should.
    - if your animations only play halfway, you need to setup a better animator. There's probably another animation that cuts your attack animation. Unity has some good documentation about it.
    - each weapon has its own animations. If you have, for example, a sword, and want it to do multiple attacks, you can either setup a combo weapon, or create multiple weapons, both are viable options.
     
  48. henkesky

    henkesky

    Joined:
    May 23, 2015
    Posts:
    36
    @reuno Actually i did(i mean inheriting from weapon), but i mistakenly forgot to apply prefab.

    As for the animation, i noticed that i have to hold it down for like 3 secs for the animation to play completely, if i just press the button it plays half way. It doesn't even work at all for some of my clips. Just attempts to play then stops immediately. As for setting the animator correctly, am actually using corgi animator, i only changed nthe clips.

    I mean having the ability to use multiple different attacks, without having to switch weapons. I achieved this by using CharacterHandleSecondaryWeapon, and using an empty gameobject as the weapon. Now this is still not enough, i want the at least to be able to use 3 attacks, so am looking at creating CharacterHandleTertiaryWeapon . Now the problem is, does corgi engine allow creating two inventories in one project, whereby one will serve a purpose of actually equipping different weapons while the other will serve a purpose of secondary and tertiary weapon which in the actual sense are skills/abilities.

    Finally, for some reason, while trying to set damage area for my weapons, i can't see the colliders(the rectangular or circle collider) for the area size
     
    Last edited: Nov 29, 2018
  49. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,923
    @henkesky > As explained in the documentation, I wouldn't recommend using the demo animators for all situations. They're based on an "any state" pattern, they're just for demo purposes. Each character is unique and deserves its own animator, there's no silver bullet when it comes to animators. So again, I'd check your transitions, it's highly likely your attack transition gets interrupted. Setup better transitions :)
    And yes, if you want more attacks, extending CharacterHandleWeapon into more Secondary (already in)/Tertiary etc is the way to go. And you will also need more inventories in that case, and maybe a few tweaks to the code depending on what you want to do, but that's all supported, yes.
    And I don't know why you wouldn't see the colliders, they're native Unity components.
     
  50. m039

    m039

    Joined:
    Nov 28, 2016
    Posts:
    1
    Hi @reuno! When I move my character onto a one way platform, he jumps up to the skies. Do you know what is it and how can I fix it?

    To reproduce this bug I took the MinimalLevel scene, added two OneWayPlatform200x25 and changed scale of Rectangle from (0.3, 0.3, 0.3) to (1.0, 1.0, 1.0). The result you may see on the attached gif. On the gif, I'm using only keys for moving left and right, not jumping.

    screencast 2018-11-29 19-15-44 (1).gif
     
    Last edited: Nov 29, 2018