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

    bravery

    Joined:
    Mar 26, 2009
    Posts:
    270
    I'm happy that Ianaged to provide with any help

    However can you let me know how to check if up/down and left/riggt is pressed using the input manager?
     
  2. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
    @bravery > You can see examples of such detection throughout the engine.
    For example in CharacterLookUp :

    Code (CSharp):
    1.  
    2. protected override void HandleInput()
    3. {
    4.     if (_verticalInput > _inputManager.Threshold.y)
    5.     {
    6.         LookUp();
    7.     }
    8. }
    9.  
    _verticalInput (in the context of abilities) is the vertical value of the main direction input, that goes from -1 to 1 (-1 is down, 1 is up).
    It's the same with _horizontalInput of course, and you'll want to handle that in HandleInput (usually).
     
  3. phateRM

    phateRM

    Joined:
    May 1, 2018
    Posts:
    5
    Hi, noob question here. I have 5.2 installed in my project and I am trying to update the engine to 5.3: I have updated the asset via the asset store window in Unity 2018.3 but the new character ability does not show up in the character controller after updating. In order to update the engine is it sufficient to update the asset or do I have to manually add the new character components, for example?
    Thanks for the support.
     
  4. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
    @phateRM > You need to add the new ability manually, it won't be automatically added to your characters (because not everyone wants all abilities).
     
  5. bravery

    bravery

    Joined:
    Mar 26, 2009
    Posts:
    270

    Thanks for the tips, it was helpful, now my problem is that when I dash up-ward the dash does not stick to the dash distance, it will dash so high upward (eventhough the dash distance is 5),
    I was checking how the code find the distance and notice the following code:

    Code (CSharp):
    1. while (_distanceTraveled < DashDistance && _shouldKeepDashing && _movement.CurrentState == CharacterStates.MovementStates.Dashing)
    2.             {
    3.                 _distanceTraveled = Vector3.Distance(_initialPosition,this.transform.position);
    4.  
    Does the Vector3.Distance check the vertical distance as well?
     
  6. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
    @bravery > Yes, Vector3.Distance gives you the distance between two points.
     
  7. hippobob

    hippobob

    Joined:
    Feb 26, 2017
    Posts:
    33
    Hello there. Can I change the size of the collision box when my character jumps? Just like when the character is kneeling, the collision box becomes smaller.
    A jump like Contra.
     
    Boom_Shaka likes this.
  8. Meowx

    Meowx

    Joined:
    Oct 10, 2015
    Posts:
    33
    @hippobob yes, take a look at the crouch ability for an example of exactly that.
     
    reuno likes this.
  9. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
    @hippobob > There is no way to do that out of the box, but as @Meowx said, it can easily be done if you extend the jump ability to call the same methods that the CharacterCrouch ability does (namely, _controller.ResizeCollider() to whatever size you'd prefer when starting to jump, and _controller.ResetColliderSize() at the end of your jump to get back to original size.
     
  10. Boom_Shaka

    Boom_Shaka

    Joined:
    Aug 31, 2017
    Posts:
    141
    Ooh, that's a good idea!

    I might put into my game.
     
    reuno likes this.
  11. hernanperez85

    hernanperez85

    Joined:
    Jan 30, 2014
    Posts:
    15
    @reuno Thanks for the ledge hang update, works great!,
    By the way I have a question about the AI classes: Is there a way to reset the current state of the brain? I want to do it in my AutoRespawn child class when player respawn but the AIBrain.CurrentState attribute is protected. Is there a workaround without modifying the original files?. Thanks in advance!
     
  12. RobertCom

    RobertCom

    Joined:
    Dec 9, 2018
    Posts:
    12
    Player, Movement and Animation
    I have a Player called Man, i have added all the scipts with Auot Player.
    I have to anims called idle and jump;

    In script Character i have Animaor Man (my Player), i cant choose anything else.
    in Animator i can use the DefaultAnimator (then i see the Parameters). I have set up the Transitions with Idle=truefor idle and Walking=true for walk.

    When i play and watch the Animator, i see Idle running, but i dont see the checkboxes in the parameters like in the video.

    When i make my one Animation for Man, i dont have the parameters.

    Probably it is only click to solve the thing, but after two hours i have no more ideas. What can i do, where can i check something?
     
  13. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
    @hernanperez85 > You should be able to use the public TransitionToState(yourNewState) method to do what you're after, basically what it does is change CurrentState, but in a safer way than just modifying directly (hence the protected state).
    @RobertCom > I'm not sure I understand exactly what you mean, but it looks like you'll need to setup your animator. You have to add the animation parameters to its list, and then setup your transitions. You can look at the many examples in the asset for reference, or at the documentation for more info on this. If you're new to Unity, you'll probably also want to look how animators and animation in general works in Unity, as this part is really just standard Unity, nothing specific to the engine :)
     
    hernanperez85 likes this.
  14. RobertCom

    RobertCom

    Joined:
    Dec 9, 2018
    Posts:
    12
    I tried my best, but it makes me crazy to watch all your examples full of so much unknown stuff.
    What i would like to see is:

    Add a a player (layer player, rest like setup from you)
    Add a platform (layer platform, rest like setup from you)
    => It doesnt matter what i do, the player falls through the platform

    So i feel like the most stupid idiot on earth sitting here four a hole day and have no collision.
    If i search for platform and collision and found a tutorial for a "moving plattform", but surprise, i have that layer, but i cant choose it for my platform ...

    In this way i hang ...


    My questions, please:
    1. I add a player, i add a platform. What i have to setup to make them like each other? (what else than the layers?)
    2. If i choose my Player and the Animator, i get my own Animation_object for my animations, but how i can add your presets to my own Animator_object, please?

    I really miss a tutorial from zero. Maybe i am the only stupid boy on earth, but it feel there are one or two more who would like to start just with a player and a platform, then adding the rest step by step. Also the minimal scene is too much stuff, i can use it and change it, but it doesnt help me on the way to make it from zero again.

    I have watched your anim_video, but the part how to have the same anim_obj for both places: (Character Script and Animator) is unfortunately missing.


    One more time, it is not the problem to make anims and a anim_obj., the problem is to have your preset there. As mentioned, i tried to use your default one, but then i have different anim_obj in the both places Character and Animator for the Player.)


    One more thing: you have three managers together and a GameManager, so i use them not together i guess?
     
  15. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
    @RobertCom > At this point I would suggest reading the documentation, I can't guess what you're missing, and it's hard to help without any info.

    To answer your questions :
    1. For a platform all you need is a collider and the proper layer (platform). That is explained in more details in the Collisions section of the documentation.
    2. I don't really understand that question. I don't know what you mean by presets. If you're talking about animation parameters, then as I said before, you just have to add them, you can find the list in the Animation section of the documentation, or you can just start from an existing animator controller if you prefer.

    I'm not sure what you mean by "the minimal scene is too much stuff". It's called minimal for a reason, it's the minimum amount of stuff you need for the game to work. You don't even have to start it from zero again if you don't want to though, just start from there :)

    If you have more questions, please use the support email, thanks.
     
  16. RobertCom

    RobertCom

    Joined:
    Dec 9, 2018
    Posts:
    12
    I have a Player set up. , everything is there:
    Transform
    Sprite Renderer (with a sprite and Layer is "Player")
    Character
    Rigidbody2D
    Box Collider2D (is trigger yes); size is set
    ...

    And i have a sprite as a platform with a box collider2D with a size also.Sprite Renderer is set to "Platforms";

    so normally it should fit, right? I have done this without corgi some times.

    Maybe i need a Material here? I really dont see what i miss here. It should fit.

    ------------------------------------

    Second thing Animation; may way:
    Add a player
    STRG+6, make some anims for idle, walk, jump; get also an anim_object called Player like my Player.
    I have added Parameters by Hand: Idle, Walking, Jumping. I have set up them to the transitions. The transitions are done like in your video: anystate goes to idle, jump and walk. Entry goes to idle. This is the only animation that i can see. Jump i cant test, because "jump needs to be "on ground" <== how can i make a double jump then, but that is a question for later. I am sorry to steal your time. I sit here the whole day and cant find the answers.

    corgi1.jpg


    Here you see two things:
    1 Collider setting for the Player (set in layer Player)
    2. Presets, Animator settings, anims

    corgi2.jpg

    Here you see the settings for the platform. (set on layer platform)
     
  17. RobertCom

    RobertCom

    Joined:
    Dec 9, 2018
    Posts:
    12
    corgi3.jpg

    Here are the conditions, so i was right to set up by myself. But i still miss anything.
    In your "minimal scene, there is no Player, this is surely for advanced users, i guess. I am a client and try to tell you about my feeling, if you felt attacked, i am sorry. For learning as a beginner it is not small enough, i am shure about as i see today. I am shure that there are two small things that i have to change or the collision and the anims, but where?
     
  18. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
    @RobertCom > As I said, please use the support email for support, thanks.
    And really, try reading the documentation, and probably do some generic Unity tutorials first. The engine's documentation assumes you have at least a basic understanding of how the software works, there'd be way too much to cover otherwise. It can't explain what a material is, for example.

    You can also decide to not read or follow the documentation, or diverge from the recommended path (your scene seems to be missing stuff, so it's likely the cause of your issues), it's absolutely fine, but then it's gonna be harder to do what you're after. I don't feel attacked at all (why would you say that?), but really the documentation is here for a reason, and I don't know of a better way to learn a software than reading it. The MinimalScene is there for a reason. It's not for advanced users, it's for everyone :) It's actually much harder to manage a game without a manager, and there's a reason for the character to be instantiated. The engine tries to enforce good practices, and that's how I'd recommend you learn using it (and Unity in general).

    And yes, Unity is a complex software, and if you dive head first into the Corgi Engine without taking the time to first learn the basics of Unity or read the documentation, then it does indeed feel overwhelming. My recommendation would be to start with the MinimalScene, modify stuff as you go, and when you feel confident enough, sure, start removing parts, that's what the engine is for, but diverging is of course harder. I'll be happy to help if you have other questions (via the support email, please)!

    PS : you can change jump settings on the CharacterJump's inspector. Jump doesn't have to be from the ground only if you don't want to (again, see the documentation for more info on this, or the inspector itself, it comes with help boxes).
     
  19. RobertCom

    RobertCom

    Joined:
    Dec 9, 2018
    Posts:
    12
    And here is something else:


    ArgumentNullException: Argument cannot be null.
    Parameter name: source
    System.Linq.Check.Source (System.Object source)
    System.Linq.Enumerable.Count[Character] (IEnumerable`1 source)
    MoreMountains.CorgiEngine.LevelManager+<SoloModeRestart>c__Iterator1.MoveNext () (at Assets/CorgiEngine/Common/Scripts/Managers/LevelManager.cs:512)
    UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumerator enumerator, IntPtr returnValueAddress) (at C:/buildslave/unity/build/Runtime/Export/Coroutines.cs:17)
    UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
    MoreMountains.CorgiEngine.LevelManager:KillPlayer(Character) (at Assets/CorgiEngine/Common/Scripts/Managers/LevelManager.cs:501)
    MoreMountains.CorgiEngine.CharacterLevelBounds:ApplyBoundsBehavior(BoundsBehavior, Vector2) (at Assets/CorgiEngine/Common/Scripts/Agents/Core/CharacterLevelBounds.cs:104)
    MoreMountains.CorgiEngine.CharacterLevelBounds:Update() (at Assets/CorgiEngine/Common/Scripts/Agents/Core/CharacterLevelBounds.cs:72)
     
  20. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
    @RobertCom > Please use the support email, and I'll need some context for these errors, they don't mean much without it :)
    That said, I'd say it's probably because you either removed the LevelManager from your scene or didn't set any PlayerPrefab to it. Again, wild guess without any context.
     
  21. RobertCom

    RobertCom

    Joined:
    Dec 9, 2018
    Posts:
    12
    Typical situation: Read the manual, read ther manual, read the manual!

    Her is the setting for jump with "can jump anywhere"

    corgi4.jpg

    and here is the error:

    UnassignedReferenceException: The variable StandingOn of CorgiController has not been assigned.
    You probably need to assign the StandingOn variable of the CorgiController script in the inspector.
    MoreMountains.CorgiEngine.CharacterJump.EvaluateJumpConditions () (at Assets/CorgiEngine/Common/Scripts/Agents/CharacterAbilities/CharacterJump.cs:239)
    MoreMountains.CorgiEngine.CharacterJump.JumpStart () (at Assets/CorgiEngine/Common/Scripts/Agents/CharacterAbilities/CharacterJump.cs:317)
    MoreMountains.CorgiEngine.CharacterJump.HandleInput () (at Assets/CorgiEngine/Common/Scripts/Agents/CharacterAbilities/CharacterJump.cs:153)
    MoreMountains.CorgiEngine.CharacterAbility.InternalHandleInput () (at Assets/CorgiEngine/Common/Scripts/Agents/CharacterAbilities/CharacterAbility.cs:118)
    MoreMountains.CorgiEngine.CharacterAbility.EarlyProcessAbility () (at Assets/CorgiEngine/Common/Scripts/Agents/CharacterAbilities/CharacterAbility.cs:134)
    MoreMountains.CorgiEngine.Character.EarlyProcessAbilities () (at Assets/CorgiEngine/Common/Scripts/Agents/Core/Character.cs:264)
    MoreMountains.CorgiEngine.Character.EveryFrame () (at Assets/CorgiEngine/Common/Scripts/Agents/Core/Character.cs:229)
    MoreMountains.CorgiEngine.Character.Update () (at Assets/CorgiEngine/Common/Scripts/Agents/Core/Character.cs:217)


    Now here is the inspector of corgi controller

    corgi5.jpg

    Standing on i cant change.
     
  22. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
    @RobertCom > Well yes, reading the manual is indeed the fastest way to learn.
    But as I said, I'm happy to help if you use the support email, I won't keep answering here. Trust me, I get a lot of support requests on a daily basis, I'm trying to help you here, and it's the best way to do so. You'll need to provide better context to these errors though, I can't guess what you did just from these screenshots.
     
    Meowx likes this.
  23. RobertCom

    RobertCom

    Joined:
    Dec 9, 2018
    Posts:
    12
    My wonderful reuno, i sit here now for 16 hours, reading a lot, watching a lot. I understand more and more, but i still cant solve this two things. Also i understand now, that it is dangerous to add anything from your tools and delete it again. Because it seems things will stay and break the whole story.

    Everything what i want to know now is:

    1. Make a player, make platform, let him stand there. let him walk.
    2. Make two anims, add the presets for Idle and Walking, put it together with the transitions to make it work.

    Should be a thing of five minutes, i have done it many times today.

    Probably there is a way to use corgi, but then i still want to do it in this way as written above.
    And i am shure it should be possible to go this smallest way possible.
    A player, a platform, walk. That´s all.

    Maybe i should do a video or a list like this:

    1. New project with corgi (downloaded today from new)
    2. Add sprite to the scene, layer Player
    3. Add a platform; add collsion box 2d, layer Platform
    4. Add corgi character to the sprite, add input manager
    5. Auto build player
    6. Add two anims to player for idle and walk
    7. Add two preset Idle, Walking
    8. Make transitions, make if Idle tru, if Wlaking tru
    9. Add animator to player, add anim_obj here.
    10. Add anim_obj to Charakter

    Start Game

    => The player will fall tru the platform

    Set gravity to zero

    => the player will not fall, let him walk, watch the transitions, no change in the view for presets.


    While playing with the collison masks for platform, strange things happen to the player. :)
    In an old version you had a sentence here what to do, in the last version not.

    Videos are nice, such lists like above are nicer, faster, easier to make and remake, just my view when i explain things to people in my business, what´s also a part of job.
     
    Last edited: Dec 20, 2018
  24. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
    @RobertCom > Once again, can you please use the support email, so I can help you?
     
  25. RobertCom

    RobertCom

    Joined:
    Dec 9, 2018
    Posts:
    12
    Time to sleep ...; first problem solved. They cant kiss each other, when i use the sorting layaer instead of the layer. Hallejulia.

    2. To delete something, it has to be deted at all places, ok. When i delete the level or game manager in the hierarchy it is still at the player. Hope this fits.
     
    Last edited: Dec 20, 2018
  26. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
    @RobertCom > I'm glad you figured it out. And thanks for using the support email, I've answered you there as well. I ended up typing a "beginner's tutorial, no documentation needed" of sorts in my answer, I'll just post it there should anyone else find it useful. I sure hope it'll help you. If you have other questions, let's please continue the discussion by email.

    So here goes, Corgi Engine 101 very fast :

    So let's start with the platform.
    - Install the engine in a blank project
    - open the Minimal/MinimalLevel
    - go to the Minimal/Sprites/Blocks folder, unfold the blocks spritesheet, and drag and drop blocks_4 into the scene
    - this creates an object with a sprite renderer attached to it, select it
    - set its layer to platform
    - add a BoxCollider2D component
    - press play
    - congratulations, you've added a platform

    Let's create a character now
    - drop a sprite into the scene
    - select it
    - add a Character component to it
    - set CharacterType to Player, PlayerID to Player1, and press AutoBuildPlayerCharacter at the bottom
    - press play, your character should be able to move
    - go to the CharacterJump inspector, set the number of jumps to 3, press play, you can now jump 3 times (I think you've asked about this before)

    Now for animations (i'm gonna assume you know how to create animations, it'd be too long to explain otherwise. I'll make this example with the Rectangle animations)
    - in the folder of your choice, right click and go Create > Animator Controller, name it however you prefer.
    - select your character (it should still be in the scene), and add an Animator component to it
    - drag and drop the animator controller you just created into your Animator's controller slot
    - open the Animator panel (window > animation > animator)
    - drag your Idle animation into it (or the Minimal/Animations/RectangleIdle animation)
    - drag your Walk animation into it (or the Minimal/Animations/RectangleWalk animation)
    - in the parameters panel, add two parameters : Idle (bool) and Walking (bool)
    - make a transition from the Idle animation to the Walk animation, select it, set its condition to Walking = true
    - make a transition from the Walk animation to the Idle animation, select it, set its condition to Idle = true
    - optional : select each transition and uncheck Has Exit Time in their settings
    - press play, congratulations, your characters walks and stands

    To anyone reading this : read the documentation, it covers all that, and much more :)
     
    Meowx and Boom_Shaka like this.
  27. RobertCom

    RobertCom

    Joined:
    Dec 9, 2018
    Posts:
    12
    Yes, Sir. I have done it, i hope. But i will watch your steps tomorrow again, i am reaaaally tired now.
    The next problem now it that when i jump, i get the jump animation, but it recalls itself again and again.
    (Everything is set line default) and the rest is set like for walking. I hope tomorrow i will find the trick. Thankyou very much.Good night.
     
  28. hernanperez85

    hernanperez85

    Joined:
    Jan 30, 2014
    Posts:
    15
    Oh I didn't see that method!, works like a charm!, many thanks!!
     
  29. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
  30. RobertCom

    RobertCom

    Joined:
    Dec 9, 2018
    Posts:
    12
    Hi again.
    My char can walk, run and dash. But nothing happens with jump.
    I have deleted junp, i have added it again. I changed number of jumps to 0,1 or 99.
    I guess that the jump will work like the other scripts also or do i need anything else?
    Jump is the only one with a vector against the gravity, maybe i need anything here?
    I have read, i have watched, but i understand only the fields to enter. Unfortunately i am the only one with a jumpung problem?
    I have deleted the animation for test, but it also fails.

    What can i do? What can i watch, check, try to make the little char jumping.
    I have read the manual, i have watched the minimum demo, but i see nothing that helps me here. Meanwhile i will try crouch and other stuff.


    I mada an anim again, i set the trans, i set the condition (Jumping, true), i get nothing in the console.
    When i press jump i see the animation, and Jumping is set again and again and again. I i walk the animation doesnt change.

    If if restart and walk, the walking anim is shown.

    It is like i would hit SPACE again and again and again.

    There are no fixed times, and i tried trans to itself with yes and with no.

    ---

    I have added more vars now, while i press one time SPACE, the vars for Grounded and Jumping are true and stay true. So somehow my char will not leave the ground here. I have seen that a Jump has a gravity of 1000.

    And finally i found my fault: Fall and Ascent should be > 0. :)

    Now i still have to find why the Jumping will not end here.

    Also found this: Jump needs a trans to idle; while i have seen the trans in doku i have not cared for it.
     
    Last edited: Dec 20, 2018
  31. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
    @RobertCom > You can re-read the steps I gave you yesterday, it tells you exactly how to get your character to jump (and even double jump). It doesn't get any easier than this.
    And maybe try to be patient, you're obviously very new to Unity, that's ok, these things take time to learn, read the doc, follow the steps, you'll make it.
    If you have more questions, for the last time, please use the support email.
     
  32. Boom_Shaka

    Boom_Shaka

    Joined:
    Aug 31, 2017
    Posts:
    141
    @RobertCom - I feel your pain as I'm a Unity noob too. Don't feel dumb. Most Unity assets have a learning curve of their own - I'll give you my experience/background for some perspective:

    I started off using "All In One"/"No Code" templates - you can make a game with those quickly (i.e. under a month), but you can only make somebody else's game. That's fine if the template has everything you want, but if it doesn't, you're stuck. You're also stuck if the author ever stops developing the asset as you probably won't be able to fix any remaining bugs. Incorporating third party assets (unless there's built-in support) is also a nightmare...even for an experienced programmer.

    I then started using visual scripting tools, which work great, but have their own learning curve as well and most require at least a basic understanding of Unity and/or programming concepts. You can expect to spend a month or two just trying to figure things out....then you have to work on your game.

    I actually got Corgi because my visual scripting asset could leverage it's scripts. What I didn't realize is that I still had to understand how those scripts work. That led me to the code comments and, ultimately, the API document. As I was reviewing those I started noticing it was easier to just code some things myself and not bother with visual scripting.

    And that's it. A few months later, I've all but abandoned visual scripting (wish I could get my money back!) and write all code entirely by hand (actually, I kitbash most of it, but it works!). I've produced simple games that will never see the light of day because they kinda suck, but they work.

    Don't get me wrong: I'm still a noob, and there's still a lot I don't understand but most of the engine's functions make a lot more sense now and it's much easier to apply examples from other sources to my current project(s) and, when I have additional questions, I know how to find answers that makes sense in Unity user groups/forums. So be patient, stick with it, and walk away from the computer for an hour or so if you're stuck....you'll figure it out.

    Hope that helps!
     
    Muppo and reuno like this.
  33. captnhanky

    captnhanky

    Joined:
    Dec 31, 2015
    Posts:
    97
    Hi!

    I sent another email by using your official contact form.
    What should I do if it´s not working?
    This is the 3rd time I sent a message there.
     
  34. egem2015

    egem2015

    Joined:
    Oct 27, 2015
    Posts:
    84
    Hi Renaud from this thread.

    you know i always mention that you are a good developer and an artist.

    i am noticing that every newbie person has a problem with character creation
    and
    i am following another asset "Character Editor Pro by Hippo" for a while and i think

    if you have an integration with it you will be perfect match.

    Because it has many character customization part and your game is amazing.

    Maybe you can give a try.

    i know your character creator is good but this asset has a lot of powerful combination.

    thanks in advance.

    King regards.
     
  35. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
    @captnhanky > I didn't get anything (or if I have, you didn't mention your name). Send me a PM on the forum then, if email doesn't work (it seems like it works for everyone else though, I get 50 to 100 requests per day).
    @egem2015 > No, not every newbie person has a problem with character creation, that's a false conclusion. The large majority doesn't. But every person that has a problem with character creation is a newbie indeed. That's a completely different thing. Thanks for the suggestion though, I'll have a look at it!
     
  36. Reactorcore3

    Reactorcore3

    Joined:
    Nov 27, 2018
    Posts:
    17
    Can you add a simple vehicle system to the Corgi Engine?

    Currently there is a way to change/switch a character by pressing a button, but what if I could have a "vehicle" character in the scene that I could walk up to with my regular person character and when I'm at the entrance trigger zone, I could press "interact" or "enter vehicle", causing my person character to go invisible and my control be transferred to the vehicle character. I would then continue playing the game as the vehicle character until my vehicle explodes or if I want to exit it. I could then press the "exit vehicle" button and my person character could appear again at the entrance point of the vehicle, transferring the player control back away from the vehicle character to the person character.

    There could also be options for the person character to remain visible in the vehicle, where the person character is pinned/glued to the vehicle so they'll move wherever the vehicle moves. An option to select thether to have the person character's sprite appear behind or infront the vehicle character to support everything from open cockpit bikes to mechs with closed cockpits.

    I'm currently in the process of designing a Super Metroid-Cryptark-Blame! mashup game using the Corgi Engine, and having a pilotable exosuit for the player character to get into (as well as other vehicles) would be super cool.
     
  37. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
    @Reactorcore3 > That's quite a specific request :) I can add it to the todo list but I doubt many people will have the same needs. I'd say what you're after is already doable with what's in the engine, and would only require minimal coding, and mostly visual work. Your vehicle would just be a prop in a trigger zone, and then you switch to the actual vehicle character. I don't think that warrants an additional feature.
     
    Reactorcore3 likes this.
  38. Reactorcore3

    Reactorcore3

    Joined:
    Nov 27, 2018
    Posts:
    17
    Thank you, I didn't know that could be a solution for this. :D
     
    Last edited: Dec 23, 2018
  39. Pacaworks

    Pacaworks

    Joined:
    Jan 28, 2016
    Posts:
    12
    Hello!
    My problem: xSpeed goes from negative value to positive value, that means that "Idle" parameter on Animator turns Active when reaching 0.0f. This causes the player to play the Idle animation when "still running" (the player only changed the direction, Left-Right).

    My question: Is there a way to make xSpeed positive? or is there a way to not activate Idle parameter when changing direction? or any Corgi2D common setup that I was ignoring?


    Thanks! :)
     
  40. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
    @Reactorcore3 > You're welcome
    @AesopWorks > You could setup your transition's rules so that it goes back to Idle only when the Speed is below a certain threshold, no need to code anything for that :) If that's not enough, you can always extend abilities (or create a new one) to add your own animation parameters.

    Note to all : I'll be off for a week starting tomorrow. If you need support, drop me an email on the support email and I'll check it as soon as I get back.
     
  41. carolinemariast77

    carolinemariast77

    Joined:
    Nov 24, 2018
    Posts:
    5
    There is any particular reason why Health.cs doesen't have Death Sfx?
    i created
    Code (CSharp):
    1. public AudioClip DeathSfx;
    and inserted here:
    Code (CSharp):
    1. // instantiates the destroy effect
    2.             if (DeathSfx!=null)
    3.             {
    4.                 SoundManager.Instance.PlaySound(DeathSfx,transform.position);
    5.             }
    6.             if (DeathEffect!=null)
    7.             {
    8.                 GameObject instantiatedEffect=(GameObject)Instantiate(DeathEffect,transform.position,transform.rotation);
    9.                 instantiatedEffect.transform.localScale = transform.localScale;
    10.             }
    11.  

    it works perfectly, but I hope it did not do anything wrong!
     
  42. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
    carolinemariast77 likes this.
  43. Bagazi

    Bagazi

    Joined:
    Apr 18, 2018
    Posts:
    611
    What is the usage of CharacterSlopeOrientation ,which is one of Character abliites? Thanks very much:)
     
  44. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
    @Bagazi > As explained in the documentation, "This component, added to a Character, allows you to have your model perpendicular to the slope it’s on. You can define its rotation speed, the min and max angles allowed, whether the weapon should rotate too, and whether or not the angle should reset in the air."
    You can learn more about it in the API documentation or the class itself, just like all classes in the engine, it's fully commented.
     
  45. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,293
    Can not find the/a pull demo and/documentation!?
    Did i miss it?
     
  46. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
    @RandAlThor > As explained in the release notes, pull was introduced in v5.2. It's handled by the CharacterPushCorgiController ability, and there's an example of it in the RetroPush demo scene. Make sure you're running v5.2 or v5.3 to get that feature. If you can't update to that, check out the first item of the FAQ.
     
    RandAlThor likes this.
  47. ArcaneTheWoof

    ArcaneTheWoof

    Joined:
    Jul 11, 2012
    Posts:
    3
    Hilo! New user here, and I'm trying to get a Mega Man-style instant acceleration to the movement (immediate maximum speed), but nothing I try, including digging into the movement code, seems to produce the effect I'm looking for. Is this possible?
     
  48. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,914
    @ArcaneTheWoof > In the CorgiController's inspector, set the SpeedAccelerationOnGround to something super high (10000), SpeedFactor to 1.
    In Unity's InputManager settings, on your horizontal axis, Gravity to 1000, Dead to .001, Sensitivity to 1000.

    If that's not enough, you can do the following change in CharacterHorizontalMovement, after line 169, do something like this (ideally extend the class to do so) :

    Code (CSharp):
    1. if (movementSpeed > 0) { movementSpeed = 6f; } // you'll want to replace that with a variable, most likely
    2. if (movementSpeed < 0) { movementSpeed = -6f; }
    3. _horizontalMovementForce = movementSpeed;
     
    ArcaneTheWoof and Muppo like this.
  49. ArcaneTheWoof

    ArcaneTheWoof

    Joined:
    Jul 11, 2012
    Posts:
    3
    I was gearing up to do it in the code because Unity's Input Manager was already set up appropriately and none of the other settings were working, but then on a whim I popped into the Corgi InputManager and disabled smooth movement and that got it working! Thanks for the help :9
     
  50. captnhanky

    captnhanky

    Joined:
    Dec 31, 2015
    Posts:
    97
    Hi!

    Is it possible to make endless levels with the corgi engine?

    Like in Williams Defender arcade game.
    ..where left and right game borders are joint together ..

    You travel in one direction and after a while you come back where you started..