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

    Mindjar

    Joined:
    Aug 13, 2013
    Posts:
    29
    I have a question about Grip ability behaviour. No matter how small I set the Buffer Duration After Grip value the character can't jump and attach from one grip object to another without first touching the ground. Is this intended?
     
  2. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
    @Mindjar > No, that was a recently introduced bug, it's been reported a lot, and fixed for the next release.
    Don't hesitate to use the support form next time to report a bug, way easier to keep track for me, and that way I can even send you the fix.
     
  3. Mindjar

    Mindjar

    Joined:
    Aug 13, 2013
    Posts:
    29
    Thanks, next time I'll email You :)
     
    reuno likes this.
  4. Kelgand

    Kelgand

    Joined:
    Feb 3, 2018
    Posts:
    10
    @Muppo @reuno There may be a bug related to air movement that is making wall jumping without a direction pressed a little more difficult than it should be, I just haven't gone through to confirm if it is happening to the demo levels/base engine or only my own scenes yet. As there is some interest in wall jumps right now, I can check it out when I get off of work today.

    This is what I am doing for my game where I will not have double jumps, so I don't have to worry about whether to use a regular air jump or override it with a wall jump. In the wall jumping ability, you should only need to change

    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)
    To:

    Code (CSharp):
    1. // if we're here the jump button has been pressed. If we were wallclinging, we walljump
    2. if (!_controller.State.IsGrounded && (_controller.State.IsCollidingRight || _controller.State.IsCollidingLeft))
    It's pretty simple, if you're colliding left or right and not on the ground, then you should be able to wall jump. This gets around needing to have wall clinging, and if you are touching the wall then it does work and will push you off when you press the jump button. I went through a few iterations of figuring out what kind of air movement I wanted in my game, which is how I found the potential bug. If you have SpeedAccelerationInAir set to zero (or a very low number so that you don't immediately stop when you aren't pressing a direction), then when you jump off the wall you will keep going until you hit something or the ground. If you hit another wall, then you should be able to jump again. In practice, I found that my character would stop *just* (tens of thousandths of a unit) before the wall, so I wasn't considered colliding with it. When I hit the ground, I could then press a direction to move those remaining tens of thousandths of a unit into the wall, become colliding with it, and then jump upwards and press jump again in the air to wall jump without pressing a direction.

    The bug was repeatable every time I jumped into a wall in a very basic scene I had set up a week ago (just platforms and a character without any custom abilities as I was testing the newest version of the engine), so I'll submit an official bug report through the support email if I can replicate it in the demo scenes tonight.

    I ended up not going with zero air acceleration for my game and instead have instant air acceleration. Because I still wanted to have the character "push off" the wall during a wall jump and instant acceleration meant that as soon as I was in the air I would stop moving if not pressing a direction, I have a component that persists my speed for either a duration or until I hit the ground (used both in jumping off of walls and when knocked back by enemies). Because this makes my character keep going left/right even after hitting a wall, it will make my character go the last little bit and be considered colliding with the wall, and I am able to jump from wall to wall without any directional input needed on my controller. This paragraph is essentially to say that yes, the "bouncing" from wall to wall is quite doable, but does need a little custom code depending on what your character is capable of doing.
     
  5. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
    @Kelgand > If you manage to confirm the bug please use the support form to report it, thanks.
     
  6. Ioei

    Ioei

    Joined:
    Apr 23, 2019
    Posts:
    2
    Hi. I'm not capable of write code by myself yet so I want to know how far I can go with corgi engine without writing code.
     
  7. Bagazi

    Bagazi

    Joined:
    Apr 18, 2018
    Posts:
    611
    What is the distinction of WeaponInventory and MainInventory? Is there any intersection between them? I want to save a message for which weapon be used recently,where should I save it?I am a little confused with Inventory System...
     
  8. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
    @Ioei > Hard to answer, that really depends on your skills. I guess you'd be able to do pretty much everything but add your own features, just like you would in any regular Unity project.
    @Bagazi > They're just two inventories. As for where you should save what weapon got used recently, I'd suggest creating a dedicated class to manage that. Don't hesitate to read the inventory's documentation to clear that confusion, it's all explained in details :)
     
    Ioei likes this.
  9. Boom_Shaka

    Boom_Shaka

    Joined:
    Aug 31, 2017
    Posts:
    141
    I know this wasn't your exact question, but if "yet" means you're currently learning to code (or just about to start), then this isn't a bad asset to begin with. It's not going to teach you to code of course, but it's a good working model/reference for different game features and modular design.

    You can also use it as a "sandbox" to practice what you learn in tutorials, classes and from other users. There are a lot of things you can do in this engine that only require a few lines of code - that means you can focus on specific skills without worrying about "breaking" stuff (tech talk).
     
    reuno likes this.
  10. Ioei

    Ioei

    Joined:
    Apr 23, 2019
    Posts:
    2
    That's exactly the case. I'm in the very beginning of my c# course.

    Thanks for your answer. It wasn't my exactly question but the answer was perfect for a real but non asked problem. Helped a lot.
     
    Boom_Shaka likes this.
  11. mattimus

    mattimus

    Joined:
    Mar 8, 2008
    Posts:
    576
    I'm working on adding a Wall Walking character ability so that players or AI can walk along walls. This new ability uses the CharacterGravity ability and uses a gravity override based on the slope of a contacted wall. The ability is mostly working but it has a few bugs that I can't seem to work out. I was hoping someone could see where I'm going wrong.

    I've added two functions to CharacterGravity.cs (I'll later move these to a subclass):
    Code (CSharp):
    1.      
    2.         /// <summary>
    3.        /// Override gravity
    4.        /// </summary>
    5.         public void OverrideGravity(float gravityAngle)
    6.         {
    7.             _gravityOverridden = true;
    8.             _overrideGravityAngle = gravityAngle;
    9.         }
    10.  
    11.         /// <summary>
    12.        /// Stop overriding gravity
    13.        /// </summary>
    14.         public void StopGravityOverride( Vector2 gravityDirectionVector)
    15.         {
    16.             _entryTimeStampZones = Time.time;
    17.  
    18.             // we reset our gravity
    19.             _gravityOverridden = false;
    20.             _inAGravityZone = false;
    21.  
    22.             StartRotating();
    23.  
    24.             // we transition our character's state
    25.             Transition(false, gravityDirectionVector);
    26.         }
    27.  
    and added a new class, ClayCharacterWallWalking:
    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3. using MoreMountains.Tools;
    4.  
    5. namespace MoreMountains.CorgiEngine
    6. {  
    7.     /// <summary>
    8.     /// Add this component to a Character and it'll be able to cling to walls when being in the air,
    9.     // facing a wall, and moving in its direction
    10.     /// Animator parameters : WallClinging (bool)
    11.     /// </summary>
    12.     [AddComponentMenu("Corgi Engine/Character/Abilities/Character WallWalking")]
    13.     public class ClayCharacterWallWalking : CharacterAbility
    14.     {
    15.  
    16.         /// This method is only used to display a helpbox text at the beginning of the ability's inspector
    17.         public override string HelpBoxText() { return "Add this component to your character and it'll be able to walk on walls."; }
    18.      
    19.         protected override void Initialization()
    20.         {
    21.             base.Initialization();
    22.         }
    23.  
    24.         /// <summary>
    25.         /// Checks the input to see if we should enter the WallWalking state
    26.         /// </summary>
    27.         protected override void HandleInput()
    28.         {
    29.             WallWalking();
    30.         }
    31.  
    32.         /// <summary>
    33.         /// Every frame, checks if the wallwalking state should be exited
    34.         /// </summary>
    35.         public override void ProcessAbility()
    36.         {
    37.             base.ProcessAbility();
    38.             ExitWallWalk();
    39.         }
    40.  
    41.         /// <summary>
    42.         /// Points gravity to a wall. Clamped at 90 degrees to prevent walking on a ceiling.
    43.         /// </summary>
    44.         protected virtual void WallWalking()
    45.         {
    46.             if (!AbilityPermitted
    47.                 || (_condition.CurrentState != CharacterStates.CharacterConditions.Normal)
    48.                 || (_controller.State.ColliderResized))
    49.             {
    50.                 return;
    51.             }
    52.  
    53.             //change gravity angle if we collide with a wall we are facing. Maxes at 90 degrees so that we don't walk on ceilings.
    54.             if ((_controller.State.IsCollidingLeft) && (_horizontalInput <= -_inputManager.Threshold.x)
    55.                 && _characterGravity.GravityAngle - _controller.State.LateralSlopeAngle >= -90)
    56.             {
    57.                 _characterGravity.OverrideGravity(_characterGravity.GravityAngle - _controller.State.LateralSlopeAngle);
    58.             }
    59.             else if ((_controller.State.IsCollidingRight) && (_horizontalInput >= _inputManager.Threshold.x)
    60.                 && _characterGravity.GravityAngle + _controller.State.LateralSlopeAngle <= 90)
    61.             {
    62.                 _characterGravity.OverrideGravity(_characterGravity.GravityAngle + _controller.State.LateralSlopeAngle);
    63.             }
    64.         }
    65.  
    66.         /// <summary>
    67.         /// If the character is currently wallWalking, checks if we should exit the state
    68.         /// </summary>
    69.         protected virtual void ExitWallWalk()
    70.         {
    71.             if (_controller.State.WasGroundedLastFrame && !_controller.State.IsGrounded )
    72.             {
    73.                 _characterGravity.StopGravityOverride(_characterGravity.GravityDirectionVector);
    74.             }
    75.         }
    76.     }
    77. }
    There are 3 issues I'm running into. Here's a video showcasing the issues.


    • If I hit a wall while on upward thrust of a jump, the character bounces off the wall rather than sticking. (0:05 - 0:20)
    • When transitioning between a level floor and a sloped wall, there's a hiccup. It didn't capture very well, but sometimes I can get the character to twitch several times in that corner before finally walking up the sloped wall. (0:23 - 0:28)
    • Occasionally if I clip the corner of a sprite, the gravity gets shifted towards the wall but the character doesn't stand on it, so they fall sideways. (0:28 - 0:32)
     
  12. Muppo

    Muppo

    Joined:
    Sep 28, 2016
    Posts:
    242
    @Ioei
    When I started with Corgi Engine some time ago (v 3.1 I think) I had nearly zero coding skills -have never used C+ before- and I was able to make a short game with the included components. You really don't have to worry about that, current version have a wide load of features since them, it will cover almost anything you'll need.

    You may eventually will want to add something quite specific to your game, but as @Boom_Shaka said, this is a friendly environment asset and you can learn at the same time you use it, as I and others did.
     
    Ioei, Legionghost and reuno like this.
  13. Glytchy

    Glytchy

    Joined:
    Feb 8, 2016
    Posts:
    5
    I'm looking to build a Hover ability (use after jumping with jump button,stop falling in air, move horizontally, duration of hover, hover lasts for less time while moving - Basically the hover from X4/X5) And unsure whether I should extend Glide or Jetpack. Right now I'm thinking to either extend Jetpack or Extend Ability and base it off Jetpack. Has anyone implemented a feature like this or have any thoughts?
     
  14. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
    @Glytchy > Glide seems already pretty close to what you want, I'd start from there.
     
  15. ramtamir

    ramtamir

    Joined:
    Feb 23, 2019
    Posts:
    18
    I have a few questions before purchasing. I'm debating whether to buy corgi engine or top down engine and I wonder if the following can be implemented in either or both:

    1. Spells - both engines have weapons - is there any limitation which will prevent me from using these classes as spells? removing the aim feature and implementing pointing at a target and pressing a button for cast?
    2. Enemies and friends - I see I can define characters as friendly or enemies. Is there any limitation that will prevent me from implementing a "weapon" that will have beneficial effects on friendlies, like heals or buffs?
    3. Area of Effect - Is there any limitation that will prevent me from directing a spell to an area in the map, and have it's effect in a certain area there for so and so seconds?

    Just to be clear - I'm not asking how easy it is to implement, or how to do it, but whether it's possible or not.

    Thanks in advance
     
  16. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
    @ramtamir > All that is possible, but not built in (to the exception of area of effects, which is already in).
    But yeah generally everything is possible, I can't think of a single feature that you absolutely couldn't do. Difficulty will vary of course :)
     
  17. ramtamir

    ramtamir

    Joined:
    Feb 23, 2019
    Posts:
    18
    And both engines are similar in that regard?
     
  18. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
    @ramtamir > Yes, they're both built to be extended upon.
     
  19. PaulAfello

    PaulAfello

    Joined:
    Sep 19, 2015
    Posts:
    16
    I am at a bit of a loss. My levels work fine in the Unity editor but as soon as I make a build three out of the four Corgi platform levels "crash" at the start of the level. The MacOS Console tells me:
    • CameraController : The LevelManager couldn't find a Player character. Make sure there's one set in the Level Manager. The camera script won't work without that.
    So obviously that's a clear lead but I just don't get that problem in the Unity Editor. I managed to reproduce this in the editor as an error once by copying a LevelManager from the one level in the build that did work to one of the "problem levels" but when I delete that manager and just create a new one from scratch everything looks fine and dandy again... until I make a build. Same problem.

    Only other issue I could think of is that I get a don’t destroy on load warning as soon as I run the level in the editor.
    • DontDestroyOnLoad only work for root GameObjects or components on root GameObjects.
      UnityEngine.Object:DontDestroyOnLoad(Object)
      MoreMountains.Tools.PersistentSingleton`1:Awake() (at Assets/CorgiEngine/ThirdParty/MMTools/Singletons/PersistentSingleton.cs:48)
      MoreMountains.CorgiEngine.GameManager:Awake() (at Assets/CorgiEngine/Common/Scripts/Managers/GameManager.cs:168)
    But this is not something I introduced, just came out of the box from working with Corgi and I just ignored until now. I also get this warning in the level that is working so kinda figure this is not the origin of the problem.

    I am currently on Unity 2018.3.14 and Corgi v5.4

    Please help!
     
  20. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
    @PaulAfello > As that error you mention tells you, you can't put DontDestroyOnLoad objects that aren't at the root of your hierarchy. In this case the GameManager. Just put it at the root. Can't tell if it'll solve your other issue though, but that'll get rid of that error at least. If the problem persists please use the support form, thanks!
    I doubt that warning was there from the start though, it'd have been reported by now. If you can reproduce it on a fresh install (fresh install, fresh import, no changes made) then please let me know where I can reproduce it via the support form and I'll fix it right away, that'd definitely be a bug :)
    Edit : same thing for your first bug, if that happens when building the demos, no changes made, I'd need to know how you proceed, because I've never seen such errors and they definitely should not happen with a fresh install.
     
    PaulAfello likes this.
  21. PaulAfello

    PaulAfello

    Joined:
    Sep 19, 2015
    Posts:
    16
    Ah, so it was something I introduced by moving the GameManager into a "Managers" object, check! Let's hope it solves that other error as well :) Thanks for the quick reply!
     
  22. PaulAfello

    PaulAfello

    Joined:
    Sep 19, 2015
    Posts:
    16
    @reuno And sure enough it solved the problem!
     
    reuno likes this.
  23. Devhog

    Devhog

    Joined:
    Nov 26, 2017
    Posts:
    2
    Very impressive, recently bought/downloaded and overwhelmed with the number of features. Just now learning to use the engine with the video tutorials. Is there any way to download the full manual in PDF or different format so i can read it offline/print it out?
     
    Last edited: Apr 30, 2019
  24. KriYorDev

    KriYorDev

    Joined:
    Oct 3, 2017
    Posts:
    32
    Has anyone tried adding sound to a moving platform?
    What I want is to add an sound each time the platform reaches one of the path points.
    If I could add a different sound depending on the path point it would be even better, but for now, I am thinking of how to approach this.
     
  25. Muppo

    Muppo

    Joined:
    Sep 28, 2016
    Posts:
    242
    I see two options:

    1- You can mod MMPathMovement to add extra features. Pros: it's added as another option below Delay in each point. Cons: Will have to redo it on next update.

    2- You can extend MovingPlatform to add whatever you want. Pros: no prob with updates. Cons: You'll need a new array not linked to the path one.

    Hope it helps.

    Edit: forgot to add something on the second option.
     
    Last edited: May 7, 2019
  26. mattimus

    mattimus

    Joined:
    Mar 8, 2008
    Posts:
    576
    I'd like to create water where the character floats at the surface rather than sinking down. Any recommendations for how to set this up with existing Corgi components or do I need to write my own? I've experimented a bit with using a CorgiControllerPhysicsVolume to push the player up to the surface, but it launches the player out of the water, at which point regular gravity applies, the player drops below the surface, rises again, and starts it all over. I'd like the player to drop down below the water surface when they jump in, rise to the top, and stay there, partially submerged. Jump to leave the water, just like the normal swim.

    Basically I'm looking for jumping into water to have a trajectory like this:
     
    Last edited: May 1, 2019
  27. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
    @Hedgehog71 > No, unfortunately there isn't.
    @kriyordev > Exactly what @Muppo said :)
    @mattimus > I think this would require a specific ability. I'd probably kill gravity and just move the controller along an animation curve on the y axis for this, until it's stabilized at the surface. So maybe looking at how the CharacterFly ability works would be a good start.
     
  28. mattimus

    mattimus

    Joined:
    Mar 8, 2008
    Posts:
    576
    Problem resolved. I wrote a subclass of swim that pushes the character upward until the midpoint of the character's bounds is above the water surface and then zeros out vertical force. I now have characters that float and characters that sink.
     
    Mindjar, MudPuppet, Glytchy and 4 others like this.
  29. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
    @mattimus > Very nice result! (Also I really like that big chunk of blocks in the background)
     
  30. krisss666

    krisss666

    Joined:
    Feb 14, 2014
    Posts:
    21
    i'm struggling with the inventory script and custom object : when i use the chicken object, i can change level and keep it in my inventory, but when i'm using my own object , i can add it in the inventory but when i load another scene i have an error message and the inventory is empty.
    - i made a new base item like chiken
    - i used a new Item name (same as Item ID)
    - i bind the new prefab object with the new base item
    I don"t understand where is the problem

    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. MoreMountains.InventoryEngine.Inventory.ExtractSerializedInventory (MoreMountains.InventoryEngine.SerializedInventory serializedInventory) (at Assets/CorgiEngine/ThirdParty/InventoryEngine/InventoryEngine/Scripts/Core/Inventory.cs:447)
    3. MoreMountains.InventoryEngine.Inventory.LoadSavedInventory () (at Assets/CorgiEngine/ThirdParty/InventoryEngine/InventoryEngine/Scripts/Core/Inventory.cs:400)
    4. MoreMountains.InventoryEngine.Inventory.OnMMEvent (MoreMountains.Tools.MMGameEvent gameEvent) (at Assets/CorgiEngine/ThirdParty/InventoryEngine/InventoryEngine/Scripts/Core/Inventory.cs:699)
    5. MoreMountains.Tools.MMEventManager.TriggerEvent[MMEvent] (MMEvent newEvent) (at Assets/CorgiEngine/ThirdParty/MMTools/Events/MMEventManager.cs:176)
    6. MoreMountains.Tools.MMGameEvent.Trigger (System.String newName) (at Assets/CorgiEngine/ThirdParty/MMTools/Events/MMEventManager.cs:28)
    7. MoreMountains.CorgiEngine.LevelManager.Start () (at Assets/CorgiEngine/Common/Scripts/Managers/LevelManager.cs:188)
     
  31. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
    @krisss666 > I'm guessing you either didn't create your object properly, or didn't reset your inventory after creating the new object. Either way, I'd recommend reading the Inventory Engine's documentation, it explains it all in great details, and if you follow these steps it'll work every time. If the issue persists though, please use the support contact form.
     
    gothicserpent likes this.
  32. Glytchy

    Glytchy

    Joined:
    Feb 8, 2016
    Posts:
    5
    @mattimus how did you get the vertical force to zero out correctly? i tried this in earlier attempts at my hover ability and it wasn't working the way i had expected
     
  33. Pacaworks

    Pacaworks

    Joined:
    Jan 28, 2016
    Posts:
    12
    Hello @reuno !

    What should I call if I want to respawn all enemies? (I'm implementing a sleep & save mechanic)
    I tried calling CorgiEngineEvent.Trigger(CorgiEngineEventTypes.Respawn), .GameOver & .PlayerDeath without success! :/

    Thanks for your attention!
     
  34. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
    @AesopWorks > There is no such event, you'd need to go through all characters and call their revive method.
     
    Pacaworks likes this.
  35. Pacaworks

    Pacaworks

    Joined:
    Jan 28, 2016
    Posts:
    12
    I use the Auto Respawn component, but can't figure out where can I place a "if (sleep) --> Revive();".
    Or as you're saying, I should create a static variable that all enemies can access? I'm confused on how the Auto Respawn.cs knows when to revive.

    Sorry for bother you & thanks for the quick answer!
     
  36. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
    @AesopWorks > As explained in the documentation (or in the class itself), the AutoRespawn works (mostly) with Checkpoints. Here, from what I understand, you just want to revive everyone, so it's a different thing, and as I said you just need to call each Character's Revive method (that's on the Health component, you don't need AutoRespawn for that).
     
    Pacaworks likes this.
  37. sofianehamza

    sofianehamza

    Joined:
    Feb 13, 2017
    Posts:
    19
    Hello, I purchased the corgi engine yesterday. it seems to be an excellent tool with a lot of usable scripts
    still, I m having an issue with a 3d character that faces the wrong side when I use it on a corgi 2d level and hence walks sideways.. when I rotate the prefab it walks the opposite side and then falls
    thanks in advance
     
  38. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
    @sofianehamza > You probably need to nest your model and rotate it accordingly then.
     
  39. ivanmdeb

    ivanmdeb

    Joined:
    May 3, 2019
    Posts:
    3
    Hi, I purchased the engine yesterday. I'm experimenting with the demos included. I made a copy of the Mountains scene and removed the included platforms. I then created my own Tilemap (include tileset and palette). I added a Tilemap Collider 2D and Composite Collider 2D to it and set the body type to static. I changed the sorting layer of the Tilemap Renderer to Platforms. I also checked to make sure the the Platforms layer is used in the CorgiController. And it is.

    However, the problem is that the character ignores the tilemap and falls through. What am I missing?
     
  40. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
    @ivanmdeb > Hard to tell without more info. The problem could be on your character's side, or on the level's side. I'd suggest comparing both against the ones in the demo scenes, and reading the documentation, it explains everything. If the problem persists please use the support contact form and provide a bit more info on what you tested and the results of these tests.
     
  41. ivanmdeb

    ivanmdeb

    Joined:
    May 3, 2019
    Posts:
    3
    I just copied the Mountains scene, added a Tilemap and changed the Sorting Layer to Platforms and Body Type to Static. That's all. The rest of the scene is that of the original demo scene.
     

    Attached Files:

    • c1.png
      c1.png
      File size:
      922.1 KB
      Views:
      668
  42. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
    @ivanmdeb > The sorting layer has zero impact on collisions.
    As I said, have you read the documentation? Have you tried comparing with the other scenes? There are many examples of tiled based levels (all the Retro ones). I can't tell you what's wrong without more info. Once again, please use the support contact form if the problem persists, thanks.

    Edit : it looks like you didn't set the layer though, that may be this. But again, without more info, it's just a wild guess. If you follow the documentation and compare, that should work :)
     
  43. ivanmdeb

    ivanmdeb

    Joined:
    May 3, 2019
    Posts:
    3
    You're right. I didn't set the layer. It works fine .) Great job with the engine!
     
    reuno likes this.
  44. krisss666

    krisss666

    Joined:
    Feb 14, 2014
    Posts:
    21
    i'm testing around the retro adventure demo to understand how variables are saved in the engine:
    Currently only the lives are saved and loaded and not the HP from the health script.

    So I'd like to add the HP as well: the player won't respawn at each hit: he will respawn only when he lost all it's HP and then lost 1 life : i already change the gamemanager and UI but i dont find how i can add thoses new variables to be saved and loaded like MaximumLife and CurrentLife: i just find the " MMGameEvent.Trigger("Save");" in the loading scene but nothing else.

    If someone already made this or a save for the health script , thanks by advance for your advice.

    Ps: i know i can use playerpref to do that, but i'm thinking using corgi logic/script should be better
     
  45. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
    @krisss666 > I'd suggest reading the SaveLoadManager's documentation. It's quite simple, all explained, and the class is fully commented.
     
    Quinn221 likes this.
  46. javi_unity402

    javi_unity402

    Joined:
    Nov 29, 2018
    Posts:
    33
    Hi @reuno.

    Congrats for amazing work.

    My question, Is there an easy way to disable weapon (or hide sprite) when character is dead? I was trying through weapon animations but none of them are false when character condition is dead.

    Thank you!



    Corgi Engine worth every $ spent on it :)
     
  47. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
    @javi_unity402 > There is nothing built-in for this, you'd need an external class (or extend the Weapon class) to handle that. I'll add that to the todo list though, passing that info as an animation parameter seems like the most elegant way of doing it.
     
  48. javi_unity402

    javi_unity402

    Joined:
    Nov 29, 2018
    Posts:
    33
  49. krisss666

    krisss666

    Joined:
    Feb 14, 2014
    Posts:
    21
    Thanks Reuno but I was searching for an exemple script and i just found the retroadventureprogressManager: it should be ok now. The doc isn't so easy to understand without practical exemple, must depend to programming's level :)
     
  50. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
    @krisss666 > You can right click on any class in your IDE and look for references of it in use. That's usually the best way (or at least the one I prefer) to understand how a class works :) Glad you figured this one out!