Search Unity

[RELEASED] Corgi Engine - Complete 2D/2.5D Platformer [new v6.1 : auto scrolling levels, and more]

Discussion in 'Assets and Asset Store' started by reuno, Dec 18, 2014.

  1. Menn007

    Menn007

    Joined:
    Sep 20, 2015
    Posts:
    19
    Ah ok, yes I just pressed the update button ;-)
    thanks!
     
    reuno likes this.
  2. Menn007

    Menn007

    Joined:
    Sep 20, 2015
    Posts:
    19
    Ha, the new 3D Corgi is really nice i think!!
    I am using your engine to create a similar (although different) 3D version. :)

    With the new example I was hoping there would be an example of a 3D weapon pickup. Just before I noticed the upgrade I was writing a question about that:

    I have a problem getting a 3D weapon appear after picking it up by the character.

    When I add the prefab to the initial weapon slot (in the character handle weapon ability) the weapon is working correctly.
    but I want to pick up the weapon, So I removed the weapon from that slot,
    and I have setup a pickable weapon:

    I can pick it up, it is added to the inventory, but when I try to use it noting appears on the player/character.

    Somehow I am missing the final link?
    I have added the 3D weapon to the "equipable weapon" slot in the InventoryEngineWeapon,
    but there must be something else I need to do?

    Menno
     
  3. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,166
    @Menn007 > There is no example of a 3D weapon in the NewCorgi3D demo scene because there's absolutely no difference between the 3D and a 2D weapon creation processes. It's exactly the same.
    I'd recommend reading the documentation, and maybe trying to create a 2D weapon following that documentation, or looking at the many examples included in the asset. If the issue persists, again, please use the support form.
     
  4. Cubed2Infinity

    Cubed2Infinity

    Joined:
    Jul 3, 2019
    Posts:
    3
    Any update on audio slider functionality / support? I've been trying in vein to add sliders to my options menu using the SoundManager as is, and adding custom code for slider support to your built-in SoundManager but all to no avail. I would really, GREATLY appreciate ANYONE explaining how to get it to work, if it's even possible in the current iteration of the Corgi SoundManager without having to drastically overhaul it... or am I better off with watching 3rd party tutorial videos and attempting to figure out how to make my own sound manager and make it work with the SaveLoad Manager so it stays consistent between scenes... all because I want slider support for adjusting audio levels instead of just On and Off options?
     
  5. Muppo

    Muppo

    Joined:
    Sep 28, 2016
    Posts:
    222
    Wow, nice update @reuno, I really like the new features!

    About the Auto Scrolling feature, Can it work on previous engine versions with some tweaks or do it need something which is exclusive of 6.1? I would like to add this to Corgi 5.5 if possible
     
  6. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,166
    @Muppo > You can retroport it for sure, but I can't list all the changes you'd need to make. It's mostly LevelManager and CharacterLevelBounds I suppose.
    @Cubed2Infinity > The SoundManager's got public volume float settings for music and VFX you can directly target, there's nothing preventing you to set these values from a slider right now. No need to modify anything.
     
    Muppo likes this.
  7. Muppo

    Muppo

    Joined:
    Sep 28, 2016
    Posts:
    222
    @reuno No problem, I'll give it a try. As always it will be more elegant than my current solution for sure.
     
  8. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,166
    @Muppo > Not to brag, but the new level bounds are quite elegant and robust :)
     
  9. Bagazi

    Bagazi

    Joined:
    Apr 18, 2018
    Posts:
    151
    How to make multiple decisions in single transition with CorgiEngine AI SYSTEM?:) For Instance, a enemy will attack the player when their distance lower than 5 and the "time in State" bigger than 5.0f. Is there some way to simultaneously check the decisions in corgiEngine?
     
  10. Menn007

    Menn007

    Joined:
    Sep 20, 2015
    Posts:
    19
    Hi Reuno,

    is there a solution for the weapon IK when a character faces the other direction? Here are 2 screenshots, when the character is facing right, it holds the weapon correctly, but when facing left, it is not correct. it looks like the weapon is staying in front of the character.
     
    Last edited: Nov 8, 2019
  11. Muppo

    Muppo

    Joined:
    Sep 28, 2016
    Posts:
    222
    The system is customizable enough to easily make your own Decision components so you can virtually add as much checks as you want. Hope it helps.
     
    Bagazi and reuno like this.
  12. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,166
    @Menn007 > For the 3rd time, please use the support form for support questions like that, and provide repro steps.
    @Bagazi > It's a state machine pattern. Create either two states or a decision that checks two things at once if you prefer.
     
  13. Cubed2Infinity

    Cubed2Infinity

    Joined:
    Jul 3, 2019
    Posts:
    3
    Yeah bro, I've been trying to get a slider to work with your script but haven't had success. I'm no pro coder man, that's why I'm relying on your engine lol. I see there's the floats; MusicVolume and SfxVolume, but unlike with the On/Off switch, I don't see any handler scripts for a slider, and when I attempt to reference the SoundManager script directly from an On Value Change action the only option I get is Monoscript > string name. I watched a Brackey's tutorial and wrote my own sound manager script which works fine with volume adjusting, but it doesn't save the settings between scenes for some reason. I've also attempted to incorporate that code from the Brackey's tutorial into your script, which is a super simple method: public void SetMusicVolume (MusicVolume) {musicAudioMixer.SetFloat("MusicVolume", Mathf.Log10 (MusicVolume) *20);}... but it wouldn't work in your SoundManager script.

    If I'm simply attempting to use a Unity UI slider, what do I need to do to make it work with your Sound Manager script so players can adjust the volume? Because I'm stuck. I was really hoping to release an update this weekend but I've been running in circles all week with this Settings issue and have gotten nowhere quick.

    Thanks.
     
  14. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,166
    @Cubed2Infinity > I can add that slider thing to the todo list if you want. If more people request it, it'll make it into a release eventually. In the meantime if you want to do it yourself, as I said it's super simple, just change the volume floats directly. But you can't just take a completely unrelated method and expect it to work :)
     
  15. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,166
    @Cubed2Infinity > As I said in the review system, don't hesitate to contact me via the support form if you need help. Putting a bad review on a platformer asset because you don't know how how to create a UI slider may not be the fastest way to get help.
     
    polyconvex and ScourgeGames like this.
  16. Bagazi

    Bagazi

    Joined:
    Apr 18, 2018
    Posts:
    151
    Decision that checks two things at once , I can understand it ,but I am confused about " two states ", I already had different states via the example ,
     
  17. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,166
    @Bagazi > I meant two states instead of the one you (probably) currently have handling that decision. Just split it into two new ones.
     
  18. Cubed2Infinity

    Cubed2Infinity

    Joined:
    Jul 3, 2019
    Posts:
    3
    You said you were going to add it to the to do list in another post back in December of last year.

    I'm asking again, please, ANYONE, can you explain how to get a Unity UI slider to work with the SoundManager script? Pretty please with cherries, sprinkles and whatever else you want on top! Like step by step please, because I am not a good coder lol, I straight up suck at it. My brain just isn't built for abstract computer languages. But I try my hardest! Trust me, on my "things to do" list, hiring an actual coder is at the top of my list as soon as I can afford it!

    I'm not understanding how to "change the volume floats directly" from in game, only seeing the ability to adjust the sliders in the editor. Like I stated above, I don't see any handler scripts for a slider, and when I attempt to reference the SoundManager script directly from an On Value Change action in the UI Slider the only option I get is Monoscript > string name. No matter what value / string I enter, nothing happens. Again, you don't have a handler script for sliders like you do for toggles. So how am I supposed to reference the floats in the SoundManager script!? Make my own handler script? Because that's what I've been trying to do and can't seem to... I. am. not. a. coder... although I try my hardest.

    Even if I wanted to just go with the On and Off toggles, if I try to copy those from the Corgi Start scene to any of my scenes or make them prefabs they just become completely inoperable. Even if I make the AudioSettings object a prefab the toggles still just sit there all static like. I can prefab the whole popup and the AudioSettings toggles still become static while other buttons work fine. Even when I reattach the toggles at the On Value Change actions they're static. I have the SoundManager script attached to my GameManagers object just like you do and everything. Besides this issue my game compiles and runs without error just fine. So right now I can't get any sound options to work unless I go completely outside of the Corgi engine with a simple little YouTube tutorial script, but then it's not tied into all the Corgi engine stuff. Trying to watch others' tutorials just doesn't work; they're setups and yours are COMPLETELY different so it's been impossible for me to customize your scripts OR make my own that work with yours. And again, I'm not proficient at coding, it's the whole reason why I'm relying on Corgi in the first place. Perhaps a tutorial video on game menus using the Corgi engine would be beneficial because I'm not the only person that has asked about this, and I know I won't be the last. You have 2 scene tutorials but neither go into detail regarding pause / settings menus, and the Managers tutorial doesn't cover it either. None of the preview games you made have a settings menu in them except for the Start Scene, and that only has the audio toggles and doesn't even cover graphics options (which I figured out for the most part on my own).

    This is really frustrating. All because I want to give the player the ability to adjust their volume, sheesh.
     
    Last edited: Oct 28, 2019
  19. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,166
    @Cubed2Infinity > As I said, please use the support form and I'll be happy to help.
    But you'll have to understand that you're not the only person asking for features. The todo list is 800+ items long now. I try to push new updates regularly, and features get prioritized based on the amount of requests they get. Yours is extremely specific, didn't get many requests (less than 10 as far as I can tell, compared to the 2000+ of the top item on the list right now), and isn't really specific to platforming, which is what the asset focuses on. I'm happy to help, I pointed you at the exact API you have to use, if that's not enough and you need more guidance, again, please use the support form, like everybody else. But again, shouting at me or putting bad reviews is really not the way to get help.

    I can't fix the fact that you don't know how to code something. And I get that it's frustrating. But I can help provide guidance if you want, and will be happy to.
     
  20. Ponpanpin

    Ponpanpin

    Joined:
    Sep 9, 2019
    Posts:
    1
    Hello @reuno, first of all thanks for your great work!

    I am struggling with the issue of setting up a multiplayer inventory for my level. I tried to set up a simple multiplayer scene and add an inventory to each of my playable characters which worked fine. But is their a solution to create an item which can be picked by all of the players and add to their specific inventory but only once? like "first come first serve" for a item picker? Since you have to set up ONE special inventory to the item picker by default and so the item is not accessible für all players. Hope you can help me...
     
  21. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,166
    @Ponpanpin > There's no example of that right now, and it can't be built out of the box, you'll need to implement a new picker class that looks at who exactly picked the thing and sends it to the correct inventory, instead of the default one specified on the item (or any other implementation of your choice of course). That's already on the todo list, I'll add your vote to it.
     
    Ponpanpin likes this.
  22. FDGSundae

    FDGSundae

    Joined:
    Aug 28, 2019
    Posts:
    5
    Thanks for fixing this, @reuno. I appreciate it. :)
     
    reuno likes this.
  23. hassonhamo3

    hassonhamo3

    Joined:
    May 25, 2018
    Posts:
    38
    @reuno is there anyway i can change camera target during play mode ? example
    i want to make an action and i"d love to focus on it when it happens , so when the player enter 2d collider the action starts and the camera change its target , and when the action ends the camera change the target back again to Player
     
  24. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,166
    @hassonhamo3 > If you're using Cinemachine you can just have multiple virtual cameras and switch priorities between them. If you're not, the CameraController's got a SetTarget method (at least in v6.1, can't remember when I added it but it's recent-ish).
     
  25. Boom_Shaka

    Boom_Shaka

    Joined:
    Aug 31, 2017
    Posts:
    103
    https://answers.unity.com/questions/882164/create-a-slider-which-refers-to-a-value-in-another.html

    I hate to sound like that guy, but I'd recommend starting with some beginning tutorials before trying to create a complete game. You don't need to be a "pro coder" to do it, but you have to understand the basics (like referencing and setting variables).

    You might also get a faster response on the Discord channel, but remember that people are working on their own projects and may not have time to show you how to do something.
     
  26. MudPuppet

    MudPuppet

    Joined:
    Aug 10, 2012
    Posts:
    140
    Hey Reuno, Awesome work with the constant updates and this is still one of the best value purchases I have ever made. Having used the asset since the early days and not being much of a programmer it is now at a point where I barely have to do any coding at all. I still do not regret any time spent problem-solving my own desired functionality, but hey, this is game development so understanding Unity a bit first and getting into some basic coding is essential unless you are able to connect with either an experienced artist or game programmer. Keep up the great work!
     
  27. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,166
  28. SupremeSmash

    SupremeSmash

    Joined:
    Nov 30, 2018
    Posts:
    4
    This asset is AWESOME - having so much fun with it

    Is it possible to open a chest/door from the inventory

     
  29. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,166
    @SupremeSmash > You can implement any action you want when an item gets used, so yeah, it's doable to have it open a chest or door when used. You can look at the inventory engine's documentation to learn more about how to create your own items.
     
    SupremeSmash likes this.
  30. SupremeSmash

    SupremeSmash

    Joined:
    Nov 30, 2018
    Posts:
    4
    Nice one :)
     
  31. Quinn221

    Quinn221

    Joined:
    Oct 16, 2017
    Posts:
    17
     
  32. Quinn221

    Quinn221

    Joined:
    Oct 16, 2017
    Posts:
    17
    If you plan on extending anything in the Corgi, you should learn the basics. Tons of free resources to learn, spend a few weeks learning, trust me it will go a long way.
     
  33. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    1,881
  34. javi_unity402

    javi_unity402

    Joined:
    Nov 29, 2018
    Posts:
    12
    Hi @reuno,

    Thanks for your fantastic asset again. It worths every cent spent on it.

    Could you add an option to Handle Weapon that disables attack/shooting when character is in freeze state on to do list?
     
  35. Boopity

    Boopity

    Joined:
    Jul 25, 2019
    Posts:
    4
    Hi everyone!

    I'm trying to create a modified object pooler that revives inactive game objects with health components. However, my tiny non-coder brain is struggling to figure out how to reference the health of game objects in the pool. My attempts to reverse engineer similar code from TimedSpawner aren't working out. Alternatively, I'm open to other options - I'm just trying to create an enemy that spawns other enemies as an attack (so TimedSpawner is out). Everything works except for the fact that previously killed enemies will spawn already dead.

    Any help would be greatly appreciated :)
     
  36. Boom_Shaka

    Boom_Shaka

    Joined:
    Aug 31, 2017
    Posts:
    103
    The "Spawn" function will revive their health if they have it, so you shouldn't need to reference their health components.

    It's a protected function, however, so you'd have to make it public to reference it from other scripts. Start with the TimedSpawner and disable/bypass the timer (if you review the code, you should be able to find it in the comments).
     
  37. SupremeSmash

    SupremeSmash

    Joined:
    Nov 30, 2018
    Posts:
    4
    I added Crouching and Crawling to the Jump script to not allow jumping in these states, it works but i was wondering if this is the correct way to do it?

    Code (CSharp):
    1.  
    2.             if ( !AbilityPermitted  // if the ability is not permitted
    3.                 || !JumpAuthorized // if jumps are not authorized right now
    4.                 || (!_controller.CanGoBackToOriginalSize() && !onAOneWayPlatform)
    5.                 || ((_condition.CurrentState != CharacterStates.CharacterConditions.Normal) // or if we're not in the normal stance
    6.                     && (_condition.CurrentState != CharacterStates.CharacterConditions.ControlledMovement))
    7.                 || (_movement.CurrentState == CharacterStates.MovementStates.Jetpacking) // or if we're jetpacking
    8.                 || (_movement.CurrentState == CharacterStates.MovementStates.Dashing) // or if we're dashing
    9.                 || (_movement.CurrentState == CharacterStates.MovementStates.Pushing) // or if we're pushing
    10.    [B]             || (_movement.CurrentState == CharacterStates.MovementStates.Crouching) // or if we're crouching
    11.                 || (_movement.CurrentState == CharacterStates.MovementStates.Crawling) // or if we're crawling[/B]
    12.                 || ((_movement.CurrentState == CharacterStates.MovementStates.WallClinging) && (_characterWallJump != null)) // or if we're wallclinging and can walljump
    13.                 || (_controller.State.IsCollidingAbove && !onAOneWayPlatform)) // or if we're colliding with the ceiling
     
  38. Boopity

    Boopity

    Joined:
    Jul 25, 2019
    Posts:
    4
    @SupremeSmash If it works it works, but yeah it looks fine to me. Tho keep in mind that you might have to re-write that code if the jump script gets overwritten in an update. I'd make a note of any changes you make to base scripts so you know what to re-do if there's an update.
    @Boom_Shaka Thanks for the response! I might be missing something here, but I'm not sure Spawn is the right path because of its other 'baggage,' namely the actual spawning. I forgot to mention this in the original post, but I'm currently using a weapon to spawn the enemies. Basically just swapping out a projectile for an enemy. Might not be the smartest way to do it, but it works well with feedbacks and AI. That's why I figured that putting Revive in a modified object pooler would be the way to go.
     
    javi_unity402 and SupremeSmash like this.
  39. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,166
    @javi_unity402 > Sure, I'll add that to the todo list right away
    @SupremeSmash > If it works for you it's the correct way :) I don't see anything wrong with your code.
     
    SupremeSmash and javi_unity402 like this.
  40. Boom_Shaka

    Boom_Shaka

    Joined:
    Aug 31, 2017
    Posts:
    103
    @Boopity - Understood. Review the SpawnProjectile function in the projectile weapon script. You'll find several references to the next game object - that would probably be the best place to reset it's health.

    The timed spawner script actually uses the same line of code to reference the next object as the projectile weapon script. If you take another look at the Spawn function, you should be able to find the reference to the object's health and add it to the projectile weapon script (create a custom weapon if you haven't already).
     
    Boopity likes this.
  41. Boopity

    Boopity

    Joined:
    Jul 25, 2019
    Posts:
    4
    Ah, I didn't think to look there. But that did it - it was just a simple copy-paste job! Thanks a lot for the help.

    @reuno It feels weird to request it because it's so simple, but what do you think about putting the revive function from TimedSpawner into the ProjectileWeapon script? It's super easy to do it yourself once you know what to do, but at the same time it seems like it's the only thing preventing projectile weapons from working with certain objects. No big loss if it isn't in, but I'm not sure if there's a reason for it to not be in. Maybe there are some complications that I'm not aware of.
     
  42. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,166
    @Boopity > I'm not sure I understand why it'd make sense to have a revive method in a ProjectileWeapon. I mean you can, for sure, but it doesn't make sense for 99% of users, and it'd be much more suited in a dedicated class. But feel free to request that via the support form though :)
     
  43. barminski

    barminski

    Joined:
    Sep 12, 2017
    Posts:
    1
    I would like to add coins to the multiplayer. I don't need to put them in inventory. Just want the players to be able to grab them.
     
  44. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,166
    @barminski > Sure, what's preventing you from doing it?
     
  45. mmntlh

    mmntlh

    Joined:
    Feb 2, 2019
    Posts:
    5
    Hey @reuno! I am using "Pro Camera 2d" plugin for unity and don't want to use the corgi engine camera controller, so there is a camera shake function I want to call when the projectile hits the enemy and I can't figure it out where I would put the code.
     
  46. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,166
    @mmntlh > There are already events being fired when getting damage (or dying), among others. Don't hesitate to check out the documentation (or examples) to learn more about them. Intercepting these events and triggering your shake would be the easiest way to go, but you could also extend Health and add that there if you prefer.
     
  47. luigi73

    luigi73

    Joined:
    Jun 30, 2015
    Posts:
    46
    @reuno about dialogue system, do you have a plan about adding images near the baloon? It could be an easy way to reproduce a conversation using avatars and showing objects
     
  48. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,166
    @luigi-freguglia > No plans to do so, that's typically something that would need to be tweaked for each game specifically, that is not specific to platformers, and is already quite doable with very little effort (just extending dialogue zones to add a reference to an image and maybe alternate prefabs for directionality.

    It's never been requested as far as I can tell (although there have been general requests for "better dialogues" without any specifics), but I can absolutely add it to the todo list if you want. It'll be very low priority unless there's a sudden massive interest in these (most people just request platformer specific features).
     
    luigi73 likes this.
  49. Muppo

    Muppo

    Joined:
    Sep 28, 2016
    Posts:
    222
    About that topic. What about including images alongside text?
    - i.e.: a NPC tells player "Press (A) to jump" where (A) is the green A button
     
  50. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    3,166
    Muppo likes this.