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,929
  2. mattjbarbosa

    mattjbarbosa

    Joined:
    Jun 28, 2015
    Posts:
    7
    Hey love the asset! I just wanted to confirm if the current recommended Unity version is still 2019.4.24f1? If not, what is the current recommended Unity version for latest Corgi Engine?
     
  3. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @mattjbarbosa > The latest version of the engine requires 2019.4.3f1 or higher. It will work on any version after that. Personally I'd recommend 2019.4.28f1.
     
  4. LorenzoSampietro

    LorenzoSampietro

    Joined:
    Jun 28, 2017
    Posts:
    20
    Hello,
    I would like to use the "CameraZoom" effect in the feedbacks.
    I added MMCameraZoom script to the camera object but it doesn't seem to work.
    Is it also necessary to have "MMCameraController" active?
    What are the constraints?

    thank you
     
  5. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @LorenzoSampietro > As explained in the documentation, all you need is a MMCameraZoom or MMCinemachineZoom on your camera, and a MMFeedback to trigger it.
     
  6. Marcsairu

    Marcsairu

    Joined:
    Feb 7, 2018
    Posts:
    9
    Hello!

    How to fix character animation getting automatically triggered on loop when on ladders? I just want the animation to play when you are actually going up and down the ladder.
    Also when using the character switch, how to make it like when you switch a character it will face the same direction as the previous sprite?
     
  7. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    Marcsairu likes this.
  8. luigi7

    luigi7

    Joined:
    Jun 30, 2015
    Posts:
    99
    Hello, quick question: is there a quick way to prevent jumping while using a weapon? I could not find anything like prevent horizontal movement or the blocking states in the abilities.
    Thank you
     
  9. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    luigi7 likes this.
  10. luigi7

    luigi7

    Joined:
    Jun 30, 2015
    Posts:
    99
    Ok, so I have to write some code. I think I have to add a MovementStates.UseWeapon, then add the relative blocking states to prevent Jump and do some ChangeState somewhere. Which ability could i look to know where to set ChangeState calls?
     
  11. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @luigi7 > As your IDE will show you with a right click, pretty much every ability calls ChangeState.
    That said, I wouldn't make UseWeapon a movement state. The best way to do what you're after would be to extend the ability you want to impact (CharacterJump?) and add an extra check on it, simply looking at the current Weapon state.
     
    luigi7 likes this.
  12. luigi7

    luigi7

    Joined:
    Jun 30, 2015
    Posts:
    99
    I know... I've right clicked about ChangeState before asking, but the code architecture is vast so i 's not always immediate to see a good way to go. Thank you very much for the advice, i'm doing your way.
     
    reuno likes this.
  13. matttardiff

    matttardiff

    Joined:
    Feb 27, 2018
    Posts:
    30
    I have a character with the grenade launcher as a secondary weapon. I don't have a weapon aim for the first one because it's not part of the design. But, of course I need to see the reticle to aim the launcher. Is there a way to only show the reticle while firing a grenade? and hide it the rest of the time?
     
  14. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @matttardiff > Sure, the reticle is a gameobject, you can enable/disable it as you'd like. Or you could simply turn its renderer on/off too.
     
    matttardiff likes this.
  15. TheAPGames

    TheAPGames

    Joined:
    Jun 1, 2020
    Posts:
    44
    Hello, I'm loving the corgi Engine, fantastic work Reuno. I have two questions as im very new to this.

    Question 1 : I made my character(2D), the animation is there, the level bound works really well. However when i play test it, the character drops on the level bound but I'm unable to move it. Not really sure if there is a video ? i have tried to throw my character to the demo scenes, but it doesn't seem to work which leads to me believe that im not setting up the "character" component on the player correctly.

    I also tried to bring in a Prefab" Playble character from the Demos" and those does not work also.

    The Player is in the prefab, dropped in the player prefab section of the level manager,

    The player has these components: Character, Rigidbody 2d, box collider 2d, Corgi Controller, character level bounds and horizontal movement.

    The player tag seems to be correct as well.

    Interestingly, the character does not register any movement whether its a jump or move, or a run.
    I get this error upon play testing as well :
    NullReferenceException: Object reference not set to an instance of an object
    MoreMountains.CorgiEngine.CameraController.GetLevelBounds () (at Assets/CorgiEngine/Common/Scripts/Camera/Regular/CameraController.cs:359)
    MoreMountains.CorgiEngine.CameraController.LateUpdate () (at Assets/CorgiEngine/Common/Scripts/Camera/Regular/CameraController.cs:209)



    Question no 2:


    I have made 3D object box, with box collider, however the player goes through it and stops at the level bounds. It doesnt seem to register the box collider? Would appreciate help with that as well.

    I would really appreciate any help,

    Cheers for this
     
    Last edited: Jul 30, 2021
  16. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
  17. TheAPGames

    TheAPGames

    Joined:
    Jun 1, 2020
    Posts:
    44
    corgiengine.jpg

    Thank you so much for your Reply.

    I'm now wondering regarding your No2 answer.

    I looked at the 3D demos, and the environments/platforms that were 3D had their regular box colliders which wasn't 2D. I read through the documents as well. If the game is a 2.5D, would a 2D colliders work on the 3D platforms and environments?


    Regarding the first questions, i did exactly those steps. Created an empty game object, followed it step by step, however it still fails to comply with any input. What is strange to me is when i duplicated an existing prefab from your demos, brought it into my scene, it fails to comply with any input as well. Is there any way to debug this and figure out what could be causing this ?


    Now I'm questioning how i set up the scene, rather the the issue with the character per se.

    Again, i truly appreciate the response and your amazing work is helping so many.
     
    Last edited: Jul 30, 2021
  18. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @Aprn > Yes, in the engine, whatever type of visual representation you use (2D sprites, tilemaps, 3D models, SDF, etc), you'll want 2D colliders to handle your collision logic. If you look at the NewCorgi3D demo scene, you'll see that, for example, platforms are setup like this :

    upload_2021-7-30_14-55-23.png

    So a mesh filter, a mesh renderer, and a box collider 2D.

    As for your problem, if these steps fail in your scene, that's likely because (as explained in the steps), your scene doesn't meet the minimal scene requirements. Try these steps in any of the demo scenes, they'll work. If they do, then your scene is the issue, check the docs on what a scene should contain.
     
    TheAPGames likes this.
  19. rewagames

    rewagames

    Joined:
    Nov 21, 2016
    Posts:
    11
    Hey @reuno ,

    I am working on auto runner platformer. My jump ability is default with below parameters.
    upload_2021-7-31_20-54-5.png
    So my jump animation is bit like contra. It works fine when i press jump button but animation does not trigger when its triggered from buffer check. I mean if i press jump button just before character lands jump happens and character moves up but run animation keeps playing. I am using latest 7.2 corgi version. Any idea what is wrong here ?
     
  20. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
  21. rewagames

    rewagames

    Joined:
    Nov 21, 2016
    Posts:
    11
    Thanks @reuno ,

    I read that already.

    When jump starts from buffer check jumping does not get set to true. And character is airborne while running animation is playing.
    upload_2021-8-1_10-10-11.png

    but in normal scenario jumping gets set to true and correct animation plays
    upload_2021-8-1_10-12-3.png

    I have been at this for 2 days now. going through every bit of code but couldn't quite point out the issue.

    Also is there any way of modifying collider size and offset while jumping in air ?
     
  22. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @rewagames > This looks a lot like a bug then. Could you try reproducing the issue in a fresh install of the engine? If it happens there as well, please send me written repro steps (no need for screenshots, just steps will do) via the support form (https://corgi-engine.moremountains.com/corgi-engine-contact). I'll send you a fix for it if I can reproduce it.
    As for modifying the collider while in the air, there's no such feature built-in, but you could look at how the crouch/crawl abilities do it, there's a method for that on the controller.
     
  23. rewagames

    rewagames

    Joined:
    Nov 21, 2016
    Posts:
    11
    Thanks @reuno
    I was able to reproduce the issue. I sent you support request via link provided above. Hope it will be an easy fix.
     
    reuno likes this.
  24. KONDRAT_GAMES

    KONDRAT_GAMES

    Joined:
    Apr 30, 2021
    Posts:
    6
    Hello, in my main menu of the game, the buttons go over the windows, how can this be corrected?
     

    Attached Files:

    • 124.png
      124.png
      File size:
      119.7 KB
      Views:
      273
  25. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @Pilcompot > That's hard to answer, it's your UI, not the engine's :)
    I suppose you can adjust these like you would any UI elements in Unity, tweaking their rect transform properties.
     
  26. Marcsairu

    Marcsairu

    Joined:
    Feb 7, 2018
    Posts:
    9
    I tried flipping the character on switch via a script by changing the localscale values to whatever the previous character's localscale value, it was successful but the problem is the character's are now walking backward.
     
  27. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @Marcsairu > If you change the local scale, that's likely what will happen, yes. There's a Flip method, I'd recommend using it instead.
     
  28. Marcsairu

    Marcsairu

    Joined:
    Feb 7, 2018
    Posts:
    9
    I also used the FlipMethod but it did the same. But no worries, I was able to fix it by using the Face Method. Thanks for being active responding to all our questions.
     
    reuno likes this.
  29. KriYorDev

    KriYorDev

    Joined:
    Oct 3, 2017
    Posts:
    32
    Hello,

    is there an easy way to make running the default movement state? I don't want to change my animator settings by cheating the with parameters and I can't seem to figure it out. I want my character to be Running by default with the ChracterRun script, but when I press the "run" button for him to walk. I tried a few things but I always get animation glitches so I was wondering if I am missing something.

    Thanks!
     
  30. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @KriYorDev > The easiest way (if you don't want to code anything) is to set your run speed to something lower than your walk speed, and invert your two animations (or your transitions).
     
  31. LorenzoSampietro

    LorenzoSampietro

    Joined:
    Jun 28, 2017
    Posts:
    20
    I have a strange behavior with the "Damage On Touch" script that I applied to an Enemy.
    In fact I copied all the properties (including Rigidbody, Healt, etc ...) that you find in the "Blob" enemy of the "Mesa2" demo.

    By modifying the demo, if I apply "Damage Taken" to "Add Force" by setting Knockback force to 10 I will blow up the enemy.

    If I do the same thing on my project the enemy doesn't move: no force appears to be applied.

    I've tried 1000's of ways trying to figure out where I was wrong but it all feels right.

    My Enemy properties:
    Schermata 2021-08-06 alle 15.59.42.png


    Do you have any suggestions?
     
  32. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @LorenzoSampietro > It's hard to tell what you may be doing wrong just from that screenshot unfortunately. The issue could also be on the receiving end of that feedback (or on both ends). I'd recommend trying to pinpoint that by combining your character with one of the enemies in the demo. If the issue persists, don't hesitate to send me (written) repro steps I could take to see what the issue may be.
     
    LorenzoSampietro likes this.
  33. KONDRAT_GAMES

    KONDRAT_GAMES

    Joined:
    Apr 30, 2021
    Posts:
    6
    Hello, I have compiled the game and I have an eternal loading in the game. In the build settings, first there is a splashscreen, startscreen, levelselection, and then there are levels. Who can tell what the problem might be?
     
  34. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @Pilcompot > The most common cause for this would be that you have an issue in your build settings, and you're trying to load a scene that isn't there. Check your logs, they'll tell you what the issue is.
     
  35. KONDRAT_GAMES

    KONDRAT_GAMES

    Joined:
    Apr 30, 2021
    Posts:
    6
    Hello, one more question why, after the game over, when switching to the stage, the level selection, all the levels that were passed again become inaccessible? And how to make sure that progress is saved after a loss?
     
    AlShahriarMiad likes this.
  36. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @Pilcompot > Assuming you're asking about the Retro Adventure demo scene, that's because, as explained in the documentation, the RetroAdventureProgressManager that handles this demo resets progress and lives on game over. In your own game you'd have your own progress manager with your own rules.
     
    AlShahriarMiad likes this.
  37. KONDRAT_GAMES

    KONDRAT_GAMES

    Joined:
    Apr 30, 2021
    Posts:
    6
    Why after the death of the character "points text" becomes 0 again?
     
  38. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @Pilcompot > Because points get reset on death. Please use the support form if you have more questions, thanks.
     
  39. hippobob

    hippobob

    Joined:
    Feb 26, 2017
    Posts:
    33
    @reuno
    After using the teleporter, how can I continue to use the teleporter in place? It seems that you need to turn on the teleporter once before you can use it again.
     
  40. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @hippobob > You'll want to check "also perform checks on stay" under ActivationConditions, as well as uncheck "AddToDestinationIgnoreList" under the Destination section.
     
    hippobob likes this.
  41. fabiopov_1

    fabiopov_1

    Joined:
    Jan 2, 2018
    Posts:
    11
    Hello,
    is there a possibility to slow down the time for everything but the player?
    For example when using the CharacterTimeControl ability ...
     
  42. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @fabiopov_1 > No, there's no such feature built-in, you'd have to implement it.
     
  43. fabiopov_1

    fabiopov_1

    Joined:
    Jan 2, 2018
    Posts:
    11
    Thanks for the prompt reply!
    Can you please give me a hint on where to start?
    I've already looked through your code but I can't find anything to start with.
     
  44. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @fabiopov_1 > That'd be a very complex system, it's hard to sum up in a forum post :)
    And there's nothing to start with already, it'd be an entirely new feature.
    There are plenty of ways to do it, but it usually comes down to managing multiple timescales (one per object, likely).
     
  45. fabiopov_1

    fabiopov_1

    Joined:
    Jan 2, 2018
    Posts:
    11
    OK, I'll continue to do some research and experiments...
    Thanks a lot!
     
    reuno likes this.
  46. Marcsairu

    Marcsairu

    Joined:
    Feb 7, 2018
    Posts:
    9
    Hello, I found something weird with the Melee attack and character switch. If you use the melee attack, switch characters, and go back to the previous character, the melee attack will continue and the hitbox's collider will be permanently activated. Any thoughts?
     
  47. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @Marcsairu > You could have your melee attack listen for a character switch and force a stop if one happens.
     
    Marcsairu likes this.
  48. enyevg

    enyevg

    Joined:
    Oct 16, 2018
    Posts:
    5
    Hello, how make a rechargeable health, similar to a jetpack, that is, when a character does not take damage, then health begins to recover after n-time. I'm not good at complex code, can you help?

    UPDATE:
    Oh, answering on my own question i found Health Auto Refil class in engine to do it. Thank you for the best asset Corgi!
     
    Last edited: Aug 15, 2021
    reuno likes this.
  49. Marcsairu

    Marcsairu

    Joined:
    Feb 7, 2018
    Posts:
    9
    Hello, can you help me how to force a character to switch movement state? MovementState.ChangeState doesn't work.
     
    Last edited: Aug 15, 2021
  50. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @Marcsairu > What do you mean by "doesn't work"? That's how it's done, and how all abilities in the engine do it. Don't hesitate to look at them for reference.
    @enyevg > Yep, HealthAutoRefill would be a good example of that :)