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. SupremeSmash

    SupremeSmash

    Joined:
    Nov 30, 2018
    Posts:
    30
    Just bought the Corgi Engine and watched some tutorials - I cant get my character to flip on direction change

     
  2. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @SupremeSmash > Please use the support form for support questions like these, and please explain your problem. This video doesn't show anything, I can't guess what you did wrong from it.
    You may want to read the documentation first, it explains in details how to do that by the way.
    You can also look at the many examples provided with the asset first.
     
    SupremeSmash likes this.
  3. knuppel

    knuppel

    Joined:
    Oct 30, 2016
    Posts:
    97
    Hello,
    I'd like to change the target layer mask of a follower at runtime:
    makeazombie.GetComponent<MoreMountains.CorgiEngine.AIShootOnSight>().TargetLayerMask = LayerMask.NameToLayer("Player");
    But in inspector at AiShootOnSight Target Layer Mask is "Mixed...".
     
  4. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @knuppel > It's mixed because you have more than one layer in your layermask (which is completely normal).
    You need to create a layer mask to feed it. You'll find plenty of examples of that throughout the engine.
    One of the ways to do that is to set that manually on your class via its inspector. Declare a public Layermask variable, set it, and feed it to the engine's one.
    Alternatively you can build it manually like so https://answers.unity.com/questions/1103210/how-to-add-layer-to-layer-mask.html
     
  5. Grafos

    Grafos

    Joined:
    Aug 30, 2011
    Posts:
    231
    I am trying to make my first timeline cinematic. The cinematic is triggered by the player, but it seems the player object has to already be in the scene to be able to use it in the timeline editor. Since you can't have that with corgi, as it instantiates the player after the game starts, how can I go about doing this?
     
  6. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @Grafos > You can either use the Timeline API to feed it the character, or substitute the actual player with a copy for the duration of your timeline sequence.
     
  7. Boopity

    Boopity

    Joined:
    Jul 25, 2019
    Posts:
    7
    Regarding luigi's bloodsuck request - I think it's not as specific as it may seem. Though the context is obviously specific to their game, it's just a grapple mechanic where you and an enemy can perform limited actions once you're in a grappling/grappled state. It's a little niche, but it would be a great addition to many combat-oriented games. Even basic platformers could make use of enemies that can grapple the player. The ability to drain health is just a generic property that would be attached to weapons.

    Also, I just wanted to hear if there were any updates on a map feature? Searching through the thread, it seems as though it doesn't get quite enough support to be implemented. On this topic, I just want to say that while many games may not need a map, the games that do need one absolutely need one. Metroidvanias are the obvious example here - a map is pretty much 100% required for that genre. To make matters worse, a look at the asset store reveals that there aren't really any 2D metroidvania-style map assets available. This means that anyone hoping to make a metroidvania would probably need to look elsewhere unless they wish to program their own map system. Best you can do is to get Platformer Pro, at which point you obviously wouldn't be using Corgi. Of course, TopDown Engine would also benefit from a map system for the Zelda-like games so it's a 2-for-1!
     
  8. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @nkinstler > Thanks for your feedback!

    The engine already comes with the base mechanics required to do a grappling state. You can freeze and/or grip a character to transform, the rest is game specific, and the engine won't get in your way. That's what I was referring to.

    As for the minimap, I agree that quite a few genres would benefit from one, but over all the productions I've worked on, that's one of the things that is the hardest to mutualize. The reason for that is that it's closely tied to the way you create your levels. The engine is agnostic in that regard, and will let you work with tiles, 3D models, handpainted 2D elements, generated stuff like Ferr2D, procedural levels, etc. Creating a system that would support all of these, and all the possible ways of doing a map (one scene, multi scenes link, abstract, realistic mapping of obstacles, etc) would be a massive task, and wouldn't provide much value as it still wouldn't be a fit for most use cases. Just like UI, a minimap is very specific to each game, I don't believe in a magic solution for it, and that's likely the reason why there aren't many on the store. One version of it only would be useless for 99% of people.
     
  9. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    It's the third time this week that I get asked via email how to pause the game at the very start of a level, so I thought I'd share the answer here as well :

    All you have to do to pause the game is trigger a pause event.
    Doing that on Start or Awake is bound to cause issues though as most classes are initializing at that time.
    You can wait one more frame, or have your class run last by changing its execution order.

    Here's a demo class that does that (changing the execution order has to be done via the editor) :

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using MoreMountains.CorgiEngine;
    5. using MoreMountains.Tools;
    6.  
    7. /// <summary>
    8. /// A test class that triggers a pause on start or on demand
    9. /// If you have a fader in your scene, chances are it's dark on start and covering the UI
    10. /// If that's the case, just move your Pause splash over the fader
    11. /// </summary>
    12. public class TestClass : MonoBehaviour
    13. {
    14.     [InspectorButton("Pause")]
    15.     public bool PauseButton;
    16.  
    17.     public virtual void Pause()
    18.     {
    19.         CorgiEngineEvent.Trigger(CorgiEngineEventTypes.Pause);
    20.     }
    21.  
    22.     protected virtual void Start()
    23.     {
    24.         // Comment one of the following depending on how you want it to work:
    25.  
    26.         // Either trigger a pause here, but make sure your script's execution or
    27.         Pause();
    28.  
    29.         // Or wait til next frame to do so, once everything has been properly initialized
    30.         StartCoroutine(PauseCoroutine());
    31.     }
    32.  
    33.     protected virtual IEnumerator PauseCoroutine()
    34.     {
    35.         yield return null;
    36.         Pause();
    37.     }
    38. }
    39.  
     
    Muppo likes this.
  10. AmobearGame

    AmobearGame

    Joined:
    Mar 31, 2016
    Posts:
    28
    Hi @reuno .I bought this package.I downloaded latest version 5.5 but I can't find RetroAI scene which introdution new feature in this version.
     
  11. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @petvenger > It's likely not 5.5 then. I'd recommend reading the first, highlighted item of the FAQ (the one marked with "please read this"). If that doesn't solve your problem please let me know!
     
  12. AmobearGame

    AmobearGame

    Joined:
    Mar 31, 2016
    Posts:
    28
    I have read about the new features in new v5.0 include: Advanced AI system ,the new HealthBar system.But when i donwnload latest verison on asset store I can't find AI system and some of scene like this video.
    .
     
  13. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
  14. AmobearGame

    AmobearGame

    Joined:
    Mar 31, 2016
    Posts:
    28
    @reuno .I have read FAQ but it don't have which I need.I'm using unity 2017.4.20f2 and it compatibility with latest verison corgi engine.Thanks for support.
    upload_2019-7-27_21-53-37.png

    PS: I have read again about this: Package has been submitted using Unity 5.3.5, 5.4.1, 5.5.0, 5.6.0, 5.6.1, 2017.1.0, 2017.2.0, 2017.3.0, 2018.1.0, 2018.2.6, 2018.3.4, and 2019.1.0 to improve compatibility with the range of these versions of Unity.
    And I don't see support version Unity which I'm using.Is this reason I can't get AI System?
     
  15. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @petvenger > That's exactly what's explained in the FAQ I pointed you at twice now. You need a more recent version of Unity if you want to get the more recent versions of the engine. And as explained in the FAQ, you can check what version of Unity each version of the engine requires on the Releases page.
     
  16. AmobearGame

    AmobearGame

    Joined:
    Mar 31, 2016
    Posts:
    28
    Thanks @reuno for support.After I installed verison unity 2018 it's done.:):):)
     
    reuno likes this.
  17. christougher

    christougher

    Joined:
    Mar 6, 2015
    Posts:
    558
    Hi @reuno just noticed the player 1-4 controller package isn't on your integration site. :)
     
  18. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
  19. gearedgeek

    gearedgeek

    Joined:
    Jun 19, 2015
    Posts:
    236
    I have a question about the AI aiming. I have noticed that the AI is not aiming at the center of the player. Is there a way to adjust the AI position for aiming? Basically the AI is aim at the player's feet.
     
  20. BigBoiii_Jones

    BigBoiii_Jones

    Joined:
    Aug 3, 2014
    Posts:
    40
    The full documentation doesn't seem top be loading correctly its just a blank page and I tried several web browsers. Also I'm more of the artsy and animation type and have hardly any code knowledge so how easy is it to pick up for someone with little to no code knowledge? I do have some experience with visual scripting with PlayMaker.
     
    Last edited: Jul 30, 2019
  21. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @gearedgeek > The AI aims (by default) at the player's transform. It'd be very easy to extend the AIActionShoot class to add a Vector3 offset to it, for example. I can add that to the todo list if you want.
    @EHEBrandon > Please don't hesitate to use the support form when you can't reach the documentation. I looked at the uptime history and there were no issues over the last month - it's hosted on github pages, it's virtually never down. So not sure what the issue was here, but I'd be happy to help if you gave me more details. As for how easy it is to pick up, that really depends on you, your goals, and your will/abilities to learn, it's hard to answer that question for someone else. Maybe look at the many tutorials to get a better idea of how the engine works :)
     
  22. gearedgeek

    gearedgeek

    Joined:
    Jun 19, 2015
    Posts:
    236
    @reuno That would be great if you could add that option for the AI. When you add it to the todo list, what does that mean? You will add it in the next update?
     
  23. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @gearedgeek > That means it gets added to a backlog. Then it gets prioritized for each update, mostly depending on frequency of requests (so far you're the first to make that request), and the value the feature brings. If it's something super easy to extend (like this, which is just a Vector3), it usually doesn't get top priority because it's something that most people usually solve on their own.
    I try to add a few of these to each release, so depending on how much stuff is in the backlog at the time of the update, it may or may not make it in the immediate next update.
     
  24. gearedgeek

    gearedgeek

    Joined:
    Jun 19, 2015
    Posts:
    236
    @reuno I see. That's what I was figuring but I just wanted to ask.
     
    reuno likes this.
  25. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @gearedgeek > I just added aiming offset to the next release :)
     
  26. gearedgeek

    gearedgeek

    Joined:
    Jun 19, 2015
    Posts:
    236
    @reuno That's awesome! Thank you for the update. I'm looking forward to it. :)
     
    reuno likes this.
  27. BigBoiii_Jones

    BigBoiii_Jones

    Joined:
    Aug 3, 2014
    Posts:
    40
    I think I'm starting to understand the engine well. I have a few questions however two questions kind of relate to inventory.

    1. I know Inventory Engine allows you to equipped armor and weapons is there a way to make it so we can have a separate way to equip armor for head, body, legs, and feet? How would I approach that?

    2. Say if you have several weapons that are both melee and ranged is their anyway to control their damage and range variables? I haven't gotten to far in the tutorial yet so it may be covered but I just want to make sure for loot reasons.

    3. Are we able to have ranged weapons like guns, bows, etc...be controlled by the player using the mouse to aim up and down? This may be a dumb question just haven't gotten to the steps for attack properties yet. Just want to make sure its possible.
     
    Last edited: Aug 1, 2019
  28. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @EHEBrandon > 1. As explained in the documentation, you can create an inventory for each of these. You have examples of an armor slot, just create a legs slot, etc.
    2. Yes, of course you can control these, that's defined per weapon and/or ammo.
    3. Of course you can have ranged weapons. Everything's possible if you want to. The engine is built to be extended. For a complete list of all that is built-in, you can check the list of features on the asset's page, or the documentation, it'll be faster than asking here :)
     
  29. Miketysonjr

    Miketysonjr

    Joined:
    Mar 15, 2018
    Posts:
    23
    hello, i put my background into scene and using background element... but my background is very long and i want it gradually scroll from left to right so i use parallax element instead ... the problem is when i jump or grounding , the background seem be hitched ,lag ...its not smooth as when i use background element , how do i fix this ? @@
     
  30. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @Miketysonjr > Without any details I don't know what's wrong here, there's no known issue with the parallax system, it's quite simple actually (and has been in the engine since v1), so I have no idea what could make it hitched. Maybe compare with the Mesa demo scenes, they also use massive textures as background, and work properly.
    If the problem persists please use the support email, and provide exact steps to reproduce your problem from a fresh install, thanks.
     
  31. BigBoiii_Jones

    BigBoiii_Jones

    Joined:
    Aug 3, 2014
    Posts:
    40
    Thank you so much. Have you ever considered creating a discord server for the engine? So that way it can bring a tighter community together for the engine to have general chat, showcase, and help section?
     
  32. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
  33. gearedgeek

    gearedgeek

    Joined:
    Jun 19, 2015
    Posts:
    236
    @reuno Is the Character Swap compatible with Rewired?
     
  34. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @gearedgeek > I'm not sure I see the link between a character swapping ability and Rewired, sorry. What do you mean?
     
  35. gearedgeek

    gearedgeek

    Joined:
    Jun 19, 2015
    Posts:
    236
    @reuno I'm using Rewired for the controls. It's working but I'm having issue with the Character Swap. I have added the Character Swap manager to the scene. I have added the Character Swap component to both of my characters then placed them into the scene. When I play the project I'm controlling both characters in the scene at the same time. So I have placed one of the Rectangle prefabs from the example scene and one of my characters and it works as long as I press P to swap between characters. I have added the SwapCharacter action to the Rewired Prefab and assigned it to a different button.
     
  36. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @gearedgeek > I've never used Rewired, I don't know what the issue is.
    I'd suggest you ask Rewired about it, they'll probably know what this is about.
     
  37. Miketysonjr

    Miketysonjr

    Joined:
    Mar 15, 2018
    Posts:
    23
    Since i set vertical speed of parallax element as 1 , problem solved ... thanks you for reply !!!
     
  38. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @Miketysonjr > I'm glad it's working now, thanks for letting me know.
     
  39. gearedgeek

    gearedgeek

    Joined:
    Jun 19, 2015
    Posts:
    236
    I have noticed that the CharacterSwap will not work if you create a character into the scene. Apparently the Characters must be in the scene active in order CharacterSwap to work.
     
  40. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @gearedgeek > No, you can create them as well, but you have to tell the CharacterSwapManager that you did so, it's not gonna guess on its own, that'd ruin performance if it was performed at runtime.
     
  41. gearedgeek

    gearedgeek

    Joined:
    Jun 19, 2015
    Posts:
    236
    Gotcha, I figured out the problem. I wasn't calling the UpdateList function before SwapCharacter. Now it's working. Thanks
     
    reuno likes this.
  42. laitr01

    laitr01

    Joined:
    Mar 6, 2019
    Posts:
    2
    Mindjar likes this.
  43. Muppo

    Muppo

    Joined:
    Sep 28, 2016
    Posts:
    242
    @laitr01 , On the Character script, you have Initial Facing Direction set to Left, this setting must match character prefab facing side when created. Is the character created that way?
     
  44. laitr01

    laitr01

    Joined:
    Mar 6, 2019
    Posts:
    2
  45. Muppo

    Muppo

    Joined:
    Sep 28, 2016
    Posts:
    242
    Have you tried different settings for Flip Model on Direction Change and Rotate Model On Direction? I know both this post and the last one sound like basic stuff but sometimes is just we forget to check a single option :)
     
  46. Mindjar

    Mindjar

    Joined:
    Aug 13, 2013
    Posts:
    29
    @laitr01 - I had the same problem and it took me a while to figure that out. The solution is simple - You have to make the spine part of the character as a child of Corgi character. So You have to separate the animation part from the logic.
    I assume from the screenshots that You've done that?
    I think You've forgot to set the Character Model in Character Script to Spine Gameobject (zombie03).
    This part takes the Spine model and flips it leaving the base Gameobject intact.
     
  47. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @laitr01 > As @Mindjar said, you probably have to nest your model properly (as explained in the documentation). If that doesn't solve it, please provide more info, as I recommended to you via email yesterday :)
     
  48. KriYorDev

    KriYorDev

    Joined:
    Oct 3, 2017
    Posts:
    32
    Is there a way to have a direction change animation in Unity? I am not even sure if it's a Corgi Engine related question. I was thinking of having an animation on how my character flips direction when moving left or right. Like bending the knees or something that stop the inertia. The normal flipping works fine and well for me right now though.
    I am aware it can probably be done with skeletal animation, but I need it for a sprite-based one. Just looking for some feedback on the idea.

    Thank you!
     
  49. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    @KriYorDev > If you're using spritesheets I guess the easiest way to do it would be to draw a "change direction" animation?
     
  50. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,929
    Hey, good news everyone, the beta release for v6.0 of the Corgi Engine is ready, and I'm about to start the beta test for it early next week. If you want to participate in that beta test, please send me a message via the support form (https://corgi-engine.moremountains.com/corgi-engine-contact) with your invoice number. I'll send you a NDA for you to sign, you sign it, send it back, and I'll send you a link to download the update. If you're already part of the beta testers, just mention it in your message, no need to sign anything again of course. Note that this beta requires 2019.2. Here are the beta release notes :

    ✨ Adds the CinemachineCameraController class that provides native support for Cinemachine. All Retro and RetroAdventure demos now use Cinemachine
    ✨ Adds PickableActions, a new type of pickable items that triggers actions when picked
    ✨ Adds the ButtonActivator class, that you can put on any objects to activate ButtonActivated classes (that no longer necessarily require a Character), allowing for many puzzle creation options
    ✨ Adds the AppearDisappear class, that lets you create objects on an appearing / disappearing cycle, usually platforms but can be used for anything, and an example of that at the start of the RetroForest demo scene.
    ✨ Adds the MMFaderRound class, a new way to transition between scenes, made famous by Mario games
    ✨ Adds post processing volumes and layers to most scenes (still completely optional).
    ✨ Adds built-in support for MMFeedbacks, a super easy way to add all sorts of feedbacks (visual, sound, animations, particles, transform based, post processing, screenshakes, etc)
    ✨ Adds MMFeedbacks (and replaces legacy and limited sfx or particles triggers) for Health, DamageOnTouch, Weapons, ButtonActivatedZones, PickableItems, Teleporters, Jumpers and Character abilities. Need feedbacks anywhere else? Drop me an email, I'll be happy to add more.
    ✨ Adds a prefab finder in the editor, letting you find prefabs with missing scripts or prefabs of a certain type (useful if you want to port an old project to the MMFeedbacks system)
    Adds support for stompable in multiplayer games, and an example of that in the Minimal4Players demo scene
    Adds a TargetOffset to AIActionShoot, allowing you to control more finely how AI characters aim at targets
    Adds more options to the MMFPSUnlock component
    Button Activated Zones can now self-disable after their last use.
    Improves button prompts, better architecture and performance, and can't get stuck mid way when entering / exiting a zone quickly anymore
    Adds the Airborne animation parameter, a boolean that gets true when your character gets higher than a customizable height
    Adds a customizable ComboInProgress animation parameter to combo weapons
    Improves ButtonActivated zones by adding more action requirements options, bindable actions on activation, exit and stay, and native MMFeedbacks support.
    Adds more options for key bindings to InventoryInputManager
    Adds an option for moving platforms to start (and keep) moving when a player collides with them, even if the player exits the platform afterwards.
    Adds input buffering to CharacterHandleWeapon, allowing for easier chained attacks.
    Adds scale clamps to MMSquashAndStretch, and adds Squash and Stretch behaviour to the RetroCorgi demo character
    Adds a new animator for the RetroCorgi character, showcasing a different and more traditional way of setting up animations and transitions
    Animation parameter strings are now hashed
    ComboWeapon's ResetCombo method is now public to allow for combo cancel from external abilities
    MMTimeManager now also modifies delta time values to match the new timescale, improving rigidbodies behaviour
    Adds public bounds dimensions getters to CorgiController
    Moves a small value distance check in the CorgiController that increases accuracy at a small cost
    Improves the accuracy of the controller's stick to slope feature
    Caches a few references across the board for performance
    CharacterAbility's StopAbilityUsedSfx() is now public
    Adds native support for MMFeedbacks for Weapons
    Adds better fade control across the board (finer control over curves, timescale, etc)
    Adds the SetTransform method to CorgiController, a way for abilities to move the controller "safely" to a new position
    Fixes a bug that could cause erroneous weapon placement when using rotating models, nested weapon attachments and picking weapons from the right
    Fixes a bug that would result in the incorrect force being applied when walljumping input independently on certain walls
    Removes missing scripts from (very) old prefabs
    Fixes the comments of the Hittable class.
    Fixes a typo in ButtonActivated's UnlimitedActivations
    Prevents a bug that could cause items on a path to be dropped at the wrong position
    Prevents a weapon from still applying a movement modifier after having been destroyed
    Fixes a typo in MMInput
    Prevents a bug that could cause inventory screens from being interactable when hidden under a certain setup
    Fixes a typo in the LevelSelection scene
    Fixes a bug that could prevent properly displaying melee weapons gizmos