Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. 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. Dumpling007

    Dumpling007

    Joined:
    Dec 13, 2018
    Posts:
    36
    I didn't find any compilation errors, and I was fine with the first ver8.8 update, but when I opened Unity again, the scripts couldn't be mounted, there were no compilation issues, and all the scripts in the Cogi engine couldn't be mounted

    Or how to go back to an old version of Corgi
     

    Attached Files:

    Last edited: Apr 20, 2024
  2. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,960
    @Dumpling007 > The second screenshot you posted tells you what to do : fix your compile errors. You've got a compile error (or more) preventing your inspectors from loading. Or maybe you've run into an editor bug, could be both. Again I'd recommend simply rolling back to a previous commit using your VCS and trying again.
     
  3. Dumpling007

    Dumpling007

    Joined:
    Dec 13, 2018
    Posts:
    36
    If you don't upgrade to a new version, So is there another way to fix "Fixes a potential null ref in the damage resistance processor when receiving non typed knockback" like if I rewrite the script, Adds an attack type to MeleeWeapon
     
  4. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,960
    @Dumpling007 > Sure, you could just copy the DamageResistanceProcessor class from 8.8, it fixed that particular issue.
     
  5. Dumpling007

    Dumpling007

    Joined:
    Dec 13, 2018
    Posts:
    36
    Oh, Thanks my friend!
     
  6. rock9913

    rock9913

    Joined:
    Apr 5, 2024
    Posts:
    4
    Hi, corgi engine is really good, I have a lots of fun but I reach some problem recently.
    After I add a few followers to my character and give them gun and AI brain, they would attack enermy in certain logic which is very cool but lag make it not cool.



    I found that there are too many object generated after a fight which would not disappear, would it be a reason of lag? Or three to five AI brain are too many (in which I think not)?

    Thank you very much for your help and consideration!
     
  7. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,960
    @rock9913 > Your images don't display, and without any info about your context, it's hard to tell what your issue may be. What are the "objects generated after a fight" that you mention?
    In any case, how many AI Brains is too many only depends on your context. What device you're running on, its capabilities, and what your game is asking the CPU to perform. You can look at your profiler to identify your bottlenecks, and optimize them. On the AI Brain specifically, you can adjust action/decision frequencies for example, to avoid performing unnecessary tasks every frame if they're not needed.
     
  8. rock9913

    rock9913

    Joined:
    Apr 5, 2024
    Posts:
    4
    Thanks reuno, it was finally turn out that I set the Pool Size of weapon too big which lead to the problem, hope it would help others.

    The function of engine is really cool, especially the "Charecter Switch function".
    However, I got some problem with it, would you please kindly help to find out how to solve it?

    I try the "CharacterSwitchManager", however, if the character is "Walking" and the character got some feedback on "Walking" like sound effect for example stepping on grass, if I switch the charecter at this point, the feedback sound effect would keep repeat, repeat, repeat, and it would never stop.

    I really need your help reuno, please help!
     
  9. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,960
    @rock9913 > There's already a system in place for surface sounds, I'd recommend using it. If your issue persist, or if you think you've found a bug, please use the support form to report it, thanks.
     
  10. Shmtalhaaa

    Shmtalhaaa

    Joined:
    Apr 3, 2020
    Posts:
    1
    @reuno I want to make a game having controls like "King of Thieves" with Cogri Engine. But unable to find any premade options can you help me in this case?
     
  11. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,960
  12. Swordknight999

    Swordknight999

    Joined:
    May 11, 2024
    Posts:
    9
    Hi~ Reuno,how can I create a item that can increase a player's maximum health?please help me
     
  13. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,960
    @Swordknight999 > Have your item target and change your character's Health.MaximumHealth.
     
  14. Swordknight999

    Swordknight999

    Joined:
    May 11, 2024
    Posts:
    9
    Sorry, I still didn't understand. Is it using Feedback to modify properties?
     
  15. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,960
    @Swordknight999 > No, you wouldn't use a feedback for that, feedbacks are for feedbacks, not gameplay logic.
    You can see an example of something similar in the InventoryEngineHealth, an item that calls the GetHealth method on the target Health. Instead of calling that method, you'd modify the MaximumHealth.
     
  16. Swordknight999

    Swordknight999

    Joined:
    May 11, 2024
    Posts:
    9
  17. Swordknight999

    Swordknight999

    Joined:
    May 11, 2024
    Posts:
    9
    Excuse me, is it rewriting a script? Sorry, I don't know how to program. Can you help me write one? Thank you.
     
  18. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,960
    @Swordknight999 > Yes, to implement that feature you'd need to create a script. I can't do it for you, but you can check the example I pointed you at, it's exactly the same thing, just a different call.
     
  19. SwingNinja

    SwingNinja

    Joined:
    Mar 13, 2017
    Posts:
    18
    Corgi Engine or Infinite Runner? I want to make shoot on rail game. From the trailer, IR seems to be promising, but it doesn't look as complete as CE (missing a lot of mechanisms). Can everything be done with Corgi Engine (is IR the subset of Corgi Engine)? Thanks.

    Untitled.png
     
  20. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,960
    @SwingNinja > No, they're two completely separate assets, each targeting very different games, and focusing on the specifics of each genre. IRE is designed to create infinite runner games, you wouldn't use it to build a sidescrolling platformer. Likewise, CE is designed to build sidescrolling platformers, you wouldn't use it to build an infinite runner game. And you wouldn't use either to build a "shoot on rail game", as that'd be yet another genre.
     
    SwingNinja likes this.
  21. OldPetrus1021

    OldPetrus1021

    Joined:
    Apr 25, 2024
    Posts:
    3
    @reuno I see that each of your Demo Scenes contains a UI Camera. If I make many scenes as game maps, do each Scene need to be placed repeatedly? Or do I need to independently develop a function to transmit UI Camera? Does corgi engine have the function I mentioned now?
     
  22. OldPetrus1021

    OldPetrus1021

    Joined:
    Apr 25, 2024
    Posts:
    3
    Sorry, there's something wrong with my thinking. The UI Camera prefab should be loaded when the scene is loaded.
     
  23. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,960
    @OldPetrus1021 > The UICamera is optional, it's just there for the demos. You can of course keep using it, or you can create your own UI, you don't necessarily need a UI Camera, it's entirely up to you. If you decide to use it, you can simply have an instance of it in your scene.
     
    OldPetrus1021 likes this.
  24. OldPetrus1021

    OldPetrus1021

    Joined:
    Apr 25, 2024
    Posts:
    3
    @reuno Hello. In demo MinimalStairs.
    When I increase the size of the character (box collider), the stairs don't work properly.
    For example: I did not press the up button and wanted to continue walking straight, but at this time the character would go up the stairs.
    I tried raising the bottom of the stairs, which solved the problem I mentioned above, but the character turned back and bounced abnormally when passing under the stairs.
    What's a good solution for this?
     
  25. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,960
    @OldPetrus1021 > You'll need to adjust your stairs raycast settings to match your character's new size.
    If you have other questions, please use the support form, thanks.
     
  26. Swordknight999

    Swordknight999

    Joined:
    May 11, 2024
    Posts:
    9
    @reuno Hello.
    I want to achieve the effect of having multiple weapons attacking my character in the game, and have added the ability "Character Handle Secondary Weapon" to my character. May I ask if there is a way to switch weapons for this ability,just like the "Character Handle Weapon" ability,and how to do so?Thank you.
     
  27. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,960
    @Swordknight999 > Yes, the HandleSecondaryWeapon ability inherits from the HandleWeapon ability, so you can call all the same methods on it. In this case, that'd be ChangeWeapon.
     
  28. Swordknight999

    Swordknight999

    Joined:
    May 11, 2024
    Posts:
    9
    @reuno
    Thank you for your reply. Is there a corresponding reference script for this "ChangeWeapon"?
     
  29. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,960
    @Swordknight999 > A "corresponding reference script"? Not sure what you mean.
     
  30. Swordknight999

    Swordknight999

    Joined:
    May 11, 2024
    Posts:
    9
    @reuno
    Sorry, I am using translation software. What I mean is "ChangeWeapon". Do you have any script examples?
     
  31. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,960
    @Swordknight999 > You can use your IDE to find examples of the method in use. You'll find it in plenty of scripts, from AIActionChangeWeapon, PickableWeapon, and more.
     
  32. Kazim

    Kazim

    Joined:
    May 26, 2013
    Posts:
    2
    Hello everyone. I just wanna ask a question. i've (also) added CharacterFallDamage.cs on my character. What i want to do is when character falls and gets damaged it should restrict movement and should wait till my "FallDamage"animation to finish. How to accomplish this? Is it possible to do it without writing code? (With the help of mmfeedback etc.)
     
  33. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,960
    @Kazim > answered you on Discord earlier today, but just in case : no, that's not something I'd recommend doing without code, you'd do that by extending the FallDamage ability, calling Freeze on your Character, and playing an animation (that's core gameplay logic, not a feedback)
     
    Kazim likes this.
  34. sierras

    sierras

    Joined:
    Sep 29, 2019
    Posts:
    4
    Hello,
    First of all, I am a beginner, so sorry if the answer is obvious... I am trying to make an AI crouch.
    For this, I created an AI Action Crouch (based on AI action Dash) which simply executes the Crouch Ability's Crouch() function. It seems to work on the Crouch Ability (the collider changes size), but not on the animator (the AI keeps Walking as it was before).
    After looking at the code, I think the Couch Ability is executing ExitCrouch() because there is no input pressing down ?
    So I tried to create an AI Crouch Ability which bypasses all the input related code in the Handle Input() and CheckExitCrouch() functions. The AI now enters Crouching state (ability + animator), but never exits this state since no one tells it to use ExitCrouch(). I tried to reach the AIBrain to stop crouching, but can't seem to acces it from the AI crouch Ability.
    I fell like I'm doing this the wrong way, so any help or guidance would be great ! (I'm using Corgi 8.8)
    Cheers
     
  35. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,960
    @sierras > You'll want to make sure you've set InputDriven:false on your Crouch ability, if you plan on using it without input.
     
  36. sierras

    sierras

    Joined:
    Sep 29, 2019
    Posts:
    4
    @reuno thanks for your quick response !
    Yes, I unchecked Input Driven, but I only see it in the crawl parameters, does it also affect the crouching ?
    Anyways, it still doesn't fire my animator although the AI collider crouches and exits crouching...
    With Debug.Logs, I pinned down the problem to the first function in CheckExitCrouch(). Before, the _movementCurrentState is Couching, after it is Idle. If I disable this function, I get an error for the following function in CheckExitCrouch().
    Thanks again for the help !
    Cheers
     
  37. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,960
    @sierras > I've added crouch start/stop AI actions to the next update. Drop me a line via the support form if you need them before the next release, and I'll package these for you.
     
  38. sierras

    sierras

    Joined:
    Sep 29, 2019
    Posts:
    4
    Great news !
    Thanks for all the great work & support you continually put in the engine(s) !
    I'll try to wait for the next release if it's not too far away, and I'll make sure to contact you via the support form if I can't wait any longer ;-)
    Cheers !
     
    reuno likes this.
  39. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,960
    Hopefully it shouldn't be too long now :)
     
  40. Stader

    Stader

    Joined:
    Jun 8, 2018
    Posts:
    16
    @reuno > Is it possible to use DOTS technology with this asset? Or any way to optimize in a game that is extremely bullet hell with many objects in the scene simultaneously?
     
  41. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,960
    @Stader > Sure, anything is possible if you implement it. It's absolutely not designed for bullet hell games, it's a platformer framework, but you could implement in it the same optimizations you would in any other Unity project, and it'd be done the exact same way.
     
    Stader likes this.
  42. Swordknight999

    Swordknight999

    Joined:
    May 11, 2024
    Posts:
    9
    @reuno
    May I ask if it is possible to create a magic bar component in the next update that consumes the specified magic points every time a special weapon is used. The game I am developing now really needs this feature, and it would be great if it could be implemented in the future! Thank you very much for your efforts!
     
  43. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,960
    @Swordknight999 > There's already a progress bar helper you could use for that, or you could simply use the ammo system, both would work.
     
  44. Swordknight999

    Swordknight999

    Joined:
    May 11, 2024
    Posts:
    9
    @reuno
    I have solved all the questions I recently asked you. Actually, reading your code more can help me find a solution. Thank you for your help!
     
    reuno likes this.
  45. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,434
    @reuno
    Hey there, I wanted to ask if something like this is possible out of the box or if I'd need to write additional code.
    We have a 2D Frame by Frame animated game and use the corgi movementstates to play the respective animations. Now would it be possible like when simply walking to the right left to have a somewhat "Turn-Around" state. Meaning when you walk left and face the left direction and then press to the right that you enter an inbetween state where this turning to the right animation is played and then you walk right and vice versa?
     
  46. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,960
    BTStone likes this.
  47. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,960
    Good news everyone, there's a new version of the engine available on the store. v9.0 comes with plenty of improvements across the board, fixes for all known issues to date, and the latest versions of MMTools and MMFeedbacks. Here are the full release notes :

    - Adds AIStateEvents, broadcasted by the AI Brain on state changes
    - Adds CrouchStart and CrouchStop AI Actions
    - Adds the PreventThrowIfCarryingOnGrab option to the GrabCarryAndThrow ability
    - Adds DisableModelOnKill option to AutoRespawn
    - Adds an entry to the AIBrain's context menu that lets you delete all unused Actions and Decisions (use carefully)
    - Fixes a missing range check in ChargeWeapon
    - Fixes wallclinging flip settings on the MinimalChargeWeapon demo weapon
    - Fixes a typo in Ladder:RepositionLadderPlatform that would cause a null ref when no box collider was set
    - Fixes a potential null ref in the WallJump ability, when the component was left disabled with Jump active
    - Fixes the way CharacterAbility grabs its _health reference
    - Fixes CharacterLevelBounds' bottom constraint not accounting for collider offset
    - Fixes AIActions not making use of ShouldInitialize
    - Fixes CharacterButtonActivation's ActivationCooldownDuration not working correctly
    - Fixes a bug with the new InputSystem where releases wouldn't be detected correctly
    - Fixes the glide ability interfering with ledge hang when GlideOnlyIfNoJumpsLeft was set to false
    - Fixes two missing flags in RetroVania which would cause the ladder's teleporter in Room1 to loop incorrectly
    - Removes a useless camera controller from the NewCorgi3D demo scene's main camera
    - Updates Inventory Engine to v3.9
    - Updates MMFeedbacks and MMTools to v4.1.2
    - Updates project to Unity 2022.3.23f1

    I hope you'll like it!
     
  48. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,434
    Ahh I see. Hmmm. We dont use the Animator for animating our sprites. Does it only work with the Animator? If not - what can I do to make it work - preferably via code?
     
  49. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,960
    @BTStone > It's an animation parameter, so yes that only works with the Animator. But if you'd rather do it via code, then that's very easy, you could extend the Character class and override its FlipModel method. You could also create a dedicated ability (or a simple component) to handle that.
     
    BTStone likes this.
  50. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,434
    @BTStone I'll look into that then, thx :)
     
    reuno likes this.