Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[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. SacrificedSoul

    SacrificedSoul

    Joined:
    Mar 7, 2017
    Posts:
    3
    Thanks for the response
     
    reuno likes this.
  2. AltIvan

    AltIvan

    Joined:
    Aug 3, 2013
    Posts:
    13
    I had to deal with a painful bug on the corgi engine, unchecking "Time Between Uses Release Interruption" makes an AI character fires forever after first shot, I don't think this is the intended behavior or it would be called "Fire non-stop" or something alike, to fix this bug the solution was to make sure CurrentWeapon.WeaponInputStop is called on ShootStop when a delay is being waited, otherwise _triggerReleased never becomes true and therefore it never stops shooting.

    Code (CSharp):
    1. if ((CurrentWeapon.WeaponState.CurrentState == Weapon.WeaponStates.WeaponDelayBetweenUses) && (!CurrentWeapon.TimeBetweenUsesReleaseInterruption))
    2. {
    3.     CurrentWeapon.WeaponInputStop(); // New line added
    4.     return;
    5. }
    There must be a better fix of course and I hope to see it on the engine soon.
     
    Last edited: Sep 27, 2020
    reuno likes this.
  3. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @AltIvan > This is a setting only meant to be used with player/input controlled weapons. As explained in the comment/tooltip, it determines whether or not the time between uses can be interrupted by releasing the shoot button.
    The default AI shoot action isn't designed to handle these player-only options, and so simply not turning these to false is the best fix. I admit it's not ideal, and I'll look into making this more robust in the future, thanks for reporting this!
    If you find other issues, please use the support form to report them, thanks!
     
  4. MoFaShi

    MoFaShi

    Joined:
    Oct 25, 2015
    Posts:
    43
    Hi, I have made a melee weapon for my character. right now the character can attack enemies when he is moving, but no attack animation is played.

    dose there have an option to disable this?
     
  5. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @MoFaShi > Did you setup your animation according to the documentation? Have you looked at the many examples provided with the engine? If you did and the issue persists, don't hesitate to use the support form and describe your problem, I'll be happy to help you solve it.
     
  6. AltIvan

    AltIvan

    Joined:
    Aug 3, 2013
    Posts:
    13
    I'm having a hard time believing this asset has 5 stars on the asset store, this thing is filled novice bugs, I was trying to set up a character than instead of looking at 8 directions only looked at 2, and it should be as simple as replacing this

    Code (CSharp):
    1.             _possibleAngleValues = new float[9];
    2.             _possibleAngleValues [0] = -180f;
    3.             _possibleAngleValues [1] = -135f;
    4.             _possibleAngleValues [2] = -90f;
    5.             _possibleAngleValues [3] = -45f;
    6.             _possibleAngleValues [4] = 0f;
    7.             _possibleAngleValues [5] = 45f;
    8.             _possibleAngleValues [6] = 90f;
    9.             _possibleAngleValues [7] = 135f;
    10.             _possibleAngleValues [8] = 180f;
    With this

    Code (CSharp):
    1.             _possibleAngleValues = new float[2];
    2.             _possibleAngleValues [0] = 0f;
    3.             _possibleAngleValues [1] = 45f;
    But thanks to a bug at DetermineWeaponRotation it actually aims to the opossing side as well, so if the player is allowed to aim top righ corner the bug makes it so bottom left corner is also allowed (wtf???), apparently the automatic flipping of the character when looking left is not taken into account when doing the math on that class method.
     
  7. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @AltIvan > This DetermineWeaponRotation bug's already been reported a few weeks ago, and fixed for the next release. Don't hesitate to drop me a line and I'll be happy to provide you with the fix if you need it before the next release.
    Likewise, if you find bugs, don't hesitate to report them via the support form, I'll be happy to fix them for you in no time, and include the fix in next updates!
     
  8. Quinn221

    Quinn221

    Joined:
    Oct 16, 2017
    Posts:
    22
    So when you say filled with bugs, you mean one bug?
     
  9. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    It's ok, it was indeed a bug :) And there are certainly others, I know I fix quite a few every update! If people report them, I'm always happy to fix them quickly and provide a fix.

    When fixing that particular one, I've also made changes to allow, as an option, a Character to aim its weapon and have the weapon direction control the facing direction. It's now very smooth, reverts back to "normal" facing method nicely, and will be part of the upcoming v6.6 like all other new features and fixes.
     
    Boom_Shaka likes this.
  10. enclot

    enclot

    Joined:
    Mar 29, 2018
    Posts:
    4
    Hello.

    If I call GotoNextLevel() while Geme is in Paused, it will freeze.

    Code (CSharp):
    1.  GameManager.Instance.Pause(PauseMethods.NoPauseMenu);
    2.  LevelManager.Instance.GotoNextLevel();
    Apparently, it's stopping at ( yield return new WaitForSeconds(OutroFadeDuration); ) on line 475 of LevelManager, so if I delete this line, the problem is working, but the fade won't work.

    Is there a good solution?
     
    Last edited: Oct 1, 2020
  11. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @enclot > You can't trigger the pause that way the same frame you're calling GoToNextLevel, or you'll have a race condition (both methods rely on events).
    Waiting one frame in a coroutine will solve your issue :

    Code (CSharp):
    1. GameManager.Instance.Pause(PauseMethods.NoPauseMenu);
    2. yield return new WaitForEndOfFrame();
    3. LevelManager.Instance.GotoNextLevel();
     
  12. ViperBoy

    ViperBoy

    Joined:
    Mar 27, 2020
    Posts:
    7
    I have question about the character selection scene. In the demo scenes you cannot change your character once it has been selected. The only way you can change it is if the game session ends. I am wondering does the engine allow you to have a character selection menu, where you can change your character after each level if you want to.
     
  13. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @ViperBoy > Right now that demo is built like this, but if you were to redirect to the character selection screen at a later point, it'd let you pick another character.
     
  14. enclot

    enclot

    Joined:
    Mar 29, 2018
    Posts:
    4
    I've tried.
    but , it works below.
    Code (CSharp):
    1. GameManager.Instance.Pause(PauseMethods.NoPauseMenu);
    2. //yield return new WaitForEndOfFrame();
    3. yield return null;
    4. LevelManager.Instance.GotoNextLevel();
    Thank you very much.

    and I found small bug.
    MMTime.FloatToTimeString(2.9250f, false, true, true, true);
    return "00:03.924"
     
    Last edited: Oct 2, 2020
    reuno likes this.
  15. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @enclot > I'm glad it's working now, thanks for letting me know.
    And the MMTime thing had already been reported, I have a fix for it if you'd like, don't hesitate to drop me a line.
    If you find other bugs, please use the support form to report them, thanks!
     
  16. zero_equals_zero

    zero_equals_zero

    Joined:
    Jun 7, 2014
    Posts:
    89
    Hello there. Hope everyone is safe and sound!

    How can I make sure that the camera shake only happens when I want it? Right now its for every jump, wall glide...
    I took a look at the jump feedbacks but it only seems to deal with sound and particles. I know the shake component resides on the camera. But I am unsure to manage it on my own. For example, a high fall would be better to only then show visual feedback. Not every time you jump or wall cling. Thanks for pointing me out!


    Also, I would like to suggest creating a public field to decide which loading screen is used. I have a couple of scenes that instantly loads but there is always the main loading screen. I believe its all done in the loadingSceneManager.
    I think it would be a nice little quality of life item to have in the finish level script a public item that chooses which loading screen will be used... if any... as my scenes in this project usually loads under a millisecond. Since everything is hardcoded it will be a mess when corgi updates. So please consider this suggestion ;) Thank you.

    All the very best
     
  17. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @zero_equals_zero > As you'll see in the LoadingSceneManager class itself, there is already a public static field to decide which loading screen is used, that you can use to change it at any time from any script (it's one line). That's usually done only once, but if you prefer having a different loading screen per transition, you can.

    upload_2020-10-4_9-10-2.png

    As for screen shakes, they're just feedbacks on various abilities. If you create your characters from scratch, you won't get any. If you're talking about the demo characters, some of them have these setup to showcase the different possibilities. Looking at each ability's inspector will point you at its specific set of feedbacks. If you can specify what demo character and specific shake you're referring to, I can point you at where it's defined.
     
  18. zero_equals_zero

    zero_equals_zero

    Joined:
    Jun 7, 2014
    Posts:
    89
    Thanks for clearing that loading scene up ;) I was expecting a public field in the level manager somehow (this way we could set up a loading screen per level from the editor — and default to the main loading screen if none is given) but this works too I suppose. I'll give it a shot. Thanks!

    Screenshakes: After digging deeper I found them, and found out that the feedback I was looking for is called TouchTheGroundFeedbacks. Now it's only a matter to find out apply this only when the character is falling from a certain height or has a certain velocity. Now that I know where to look this will be easy.

    As mentioned countless times before: Corgi is great — a bit overwhelming and reading the docs help — Alas — you don't know what you don't know.

    Cheers.
     
  19. drHogan

    drHogan

    Joined:
    Sep 26, 2012
    Posts:
    201
    Hi, I have an issue with dash, and I am trying to figure out if it can be fixed, it I am to be blamed or if it's a bug. My character can dash, and Character Dash is basically untouched. When they do it against a vertical wall, there is no problem happening. When it's done against rhe side of a 2-tiles (height) platform, instead the character seems to think to have landed and goes there idle.







    It does only happen with Dash, and I did notice that the animator reports all the following parameters as true




    Is it a known problem or might it only be cause by some peculiar sets of parameters/colliders shapes, etc? Would you have any suggestion on some quick if dirty way to take on this problem?

    Cheers,
    H
     
  20. enclot

    enclot

    Joined:
    Mar 29, 2018
    Posts:
    4
    I want to use Cinemachine Impulse with Player Death feedbacks.
    But I can't because it disables CinemachineVirtualCamera by MMCameraEventTypes.StopFollowing message.
    If you would like [yield return new WaitForSeconds(RespawnDelay);] in LevelManager should come before [MMCameraEvent.Trigger(MMCameraEventTypes.StopFollowing);]

    So please consider this suggestion
    Will there be any trouble if I do this?
    Code (CSharp):
    1. yield return new WaitForSeconds(RespawnDelay);//modifyed
    2. MMCameraEvent.Trigger(MMCameraEventTypes.StopFollowing);
    3. //yield return new WaitForSeconds(RespawnDelay);
    4. MMCameraEvent.Trigger(MMCameraEventTypes.StartFollowing);
     
  21. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @zero_equals_zero > I'm glad you figured it out.
    @drHogan > It's not a known issue. I'd need to know more about what you're doing to be able to help. Please use the support form and provide steps to reproduce your issue, I'll be happy to look into it.
    @enclot > I don't think there will. Please use the support form for suggestions, they'll get lost otherwise.
     
    drHogan likes this.
  22. drHogan

    drHogan

    Joined:
    Sep 26, 2012
    Posts:
    201
    Done! Thanks!
     
    reuno likes this.
  23. NamraGame

    NamraGame

    Joined:
    Feb 17, 2019
    Posts:
    31
    Hi there!
    I know the question was previously asked so it might interest some people.
    About giving a direction before a wall Jump.
    It kinda makes sense to me because I instinctively pressed the direction I wanna go.

    Well, it's probably not the best solution... but it works :)
    In the CharacterClinging.cs there's a moment pressing the opposite direction exit the clinging.
    Code (CSharp):
    1.  if (_character.IsFacingRight)
    2.                     {
    3.                         if ((!hit) || (_horizontalInput <= _inputManager.Threshold.x))
    4.                         {
    5.                             shouldExit = true;
    6.                             isPressingAwayFromWall = true;
    7.                         }
    8.                     }
    9.                     else
    10.                     {
    11.                         if ((!hit) || (_horizontalInput >= -_inputManager.Threshold.x))
    12.                         {
    13.                             shouldExit = true;
    14.                             isPressingAwayFromWall = true;
    15.                         }
    16.                     }
    well you can create a var that indicates you wanna "press away fron the wall".

    Then, in CharacterWallJump.cs, there's a moment Reuno says
    Code (CSharp):
    1. // if we're here the jump button has been pressed. If we were wallclinging, we walljump
    2.             if (_movement.CurrentState == CharacterStates.MovementStates.WallClinging)
    3.             {
    You can create another condition that includes your new variable (with get Component), so you can allow the wall jump in the opposite direction (because the original script *-1 to jump away from the wall)

    hope this helps some poor souls like me who spent 4 hours figuring this out
    Probably not the best way to it though

    Actually I'm interested in some other topics like these ones https://twitter.com/MattThorson/status/1238338580822380544
     
    Last edited: Oct 6, 2020
    andreiagmu likes this.
  24. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @NamraGame > There are other ways to do it, but if it works for you, it's a good way :)
    If you need changes like that (or others) don't hesitate to use the support form to request them, I'll be happy to add them to the todo list
     
  25. mk7gwc

    mk7gwc

    Joined:
    Mar 3, 2016
    Posts:
    27
    Hello
    I have a question.
    I would like to use the Melee Weapon feature "Prevent All Movement While In Use" to limit moving attacks, but when I press the attack button while flying laterally in the air, the lateral moment disappears. .. And the character will fall vertically.


    The same behavior was seen with the melee weapon in the demoscene. Is this a specification?
     
  26. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @mk7gwc > Yes, that option will prevent horizontal movement while using the weapon, that's to be expected.
    What feature are you after?
     
  27. mk7gwc

    mk7gwc

    Joined:
    Mar 3, 2016
    Posts:
    27
    @reuno
    The action I want is to limit the attack while running and to accept the attack input while jumping.
     
  28. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @mk7gwc > That's something you'd have to implement then, it's not a feature of the engine.
    Extending the handle weapon ability to add that extra check would be the way to go.
     
  29. mk7gwc

    mk7gwc

    Joined:
    Mar 3, 2016
    Posts:
    27
    @reuno
    oops...Roger that.
    Which area should I mess with when making such modifications?
     
  30. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @mk7gwc > You'll probably want to extend CharacterHandleWeapon and add an extra check for your conditions in its method that handles input.
     
  31. mk7gwc

    mk7gwc

    Joined:
    Mar 3, 2016
    Posts:
    27
    reuno likes this.
  32. mk7gwc

    mk7gwc

    Joined:
    Mar 3, 2016
    Posts:
    27
    sorry,I still had other questions.
    melee animation It does not play properly.

    Specifically, it is played only at the moment of input of the attack and is interrupted.
    Where should I check in such cases?

    I have attached a video and a screenshot of Animator Translation in the attachment.
     

    Attached Files:

  33. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @mk7gwc > As explained in the documentation, you likely have another transition interrupting your current animation, that's something you can fix in your animator. I'd recommend looking at examples (in the engine or elsewhere, it's really just standard Unity). The Retro Corgi example would be a good reference, especially its combo sword attacks.
     
  34. mk7gwc

    mk7gwc

    Joined:
    Mar 3, 2016
    Posts:
    27
    @reuno
    ok
    Thank you for your kindness!:)
     
    reuno likes this.
  35. mk7gwc

    mk7gwc

    Joined:
    Mar 3, 2016
    Posts:
    27
    other question.

    What flag name should I use if I want to simply switch the animation with the fall detection instead of jumping?
     
  36. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @mk7gwc > I'm not sure what you mean by flag name, or what "fall detection instead of jumping" means in that context.
    I'd recommend reading the animation section of the documentation, it covers all aspects of animation in the context of the engine. Hopefully it'll answer your question.
    If your issue persists, please use the support form, thanks.
     
  37. mk7gwc

    mk7gwc

    Joined:
    Mar 3, 2016
    Posts:
    27
    @reuno
    sorry I overlooked Animation Parameters.
    "Grounded" is Looks like it fits what I want
     
  38. luigi7

    luigi7

    Joined:
    Jun 30, 2015
    Posts:
    99
    Hi @reuno, I have this problem using Spine:
    I have a simple walk animation in Spine, when the character it's in idle and then starts to walk, it "slides" for a while in the direction i walk before the animation to starts for real. Same effect for run, but more visible due to the greater speed.
    I copied the transtions parameters from the brobro spine character, but it's not working.
    The spine is not baked.
    I tried to play with instant acceleration and input treshold parameters too.
    Am I missing something?
     
  39. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @luigi7 > That's unlikely to be something on the engine side, but more likely something in your transition setup in your animator. I suppose your transition isn't fast enough. I'd say it's also unlikely to be a Spine issue.
    A simple way to see where the issue lies is to look at your animator at runtime. Does the Walking anim parameter turn true when you start walking? If yes, the engine is doing its job, and the issue is in your transition's settings, or your other states' transition settings. Making sure your transition can interrupt others according to your plan, and making sure they transition according to your taste will fix the problem.
     
    luigi7 likes this.
  40. luigi7

    luigi7

    Joined:
    Jun 30, 2015
    Posts:
    99
    maybe you are right, seems reasonable but i can't see anything here that could introduce some delay. I'll look better and eventually reply something here... thank you :)
     
  41. CFK

    CFK

    Joined:
    Dec 13, 2014
    Posts:
    12
    player goes up when collide with some platforms.

    In the following reference, I only use horizontal movement, but when collide with some platforms, it will make the player
    goes up, how can I fix this problem?
    Collide with one way platform https://i.imgur.com/b8ClQXI.gif
    Collide with irregular platform https://i.imgur.com/16Y8UHY.gif
     
  42. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @CFK > If you think you've found a bug or run into an issue, please use the support form to report it, and provide context info (Unity version, asset version) as well as repro steps to your issue, ideally in any of the demo scenes, thanks.
     
  43. mk7gwc

    mk7gwc

    Joined:
    Mar 3, 2016
    Posts:
    27
    Question for MM Feedbacks.

    After reading the docs, I understand that MM Feedbacks can be used to make sounds in certain situations.
    How do I run my own scripts using MMFeedbacks?

    For example, I want to activate a script via "Damage Feedbacks" in the "Health" component when damaged.
     
  44. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @mk7gwc > I'm not sure I understand your question, what do you mean by "run your own scripts using MMFeedbacks"?
    I wouldn't recommend using MMF to handle gameplay logic, but there are activation and event feedbacks if that's your question.
    In any case, I'd recommend reading the MMFeedbacks documentation, it explains all there is to know about the system.
     
  45. mk7gwc

    mk7gwc

    Joined:
    Mar 3, 2016
    Posts:
    27
    @reuno

    I tried "event feedbacks", but I registered the script in "Play Events ()" in "Events", but the script does not run. Is the registration method wrong?
     
  46. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @mk7gwc > Registered the script? I'm sorry I don't know what you did exactly. If the issue persists, please provide exact repro steps via the support form, thank you.
     
  47. Boom_Shaka

    Boom_Shaka

    Joined:
    Aug 31, 2017
    Posts:
    141
    are you saying: run Script ABC when Feedback XYZ occurs?

    you might want to try: when Event 123 occurs, run Script ABC and Feedback XYZ.

    you can also post your steps/scripts on the discord channel. It's user-run and not affiliated with More Mountains, but somebody may have done something similar or have ideas for a workaround. (https://discord.com/channels/504379597794574339/507151392537051136).
     
    reuno likes this.
  48. luigi7

    luigi7

    Joined:
    Jun 30, 2015
    Posts:
    99
    It was a problem with my spine animation: it simply had a gap at the beginning, so it was playing the animation, but the first part of the animation was not walking for real :rolleyes:
     
  49. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,915
    @luigi7 > I'm glad you figured it out, thanks for letting me know!
     
  50. luigi7

    luigi7

    Joined:
    Jun 30, 2015
    Posts:
    99
    @reuno another question: is it possible to introduce a delay in the abilities? I'd need to start the jump animation a little before the character to move on y axis.