Search Unity

Mines Evader Free Template [Deprecated]

Discussion in 'Assets and Asset Store' started by EbalStudios, May 15, 2018.

  1. EbalStudios

    EbalStudios

    Joined:
    Nov 20, 2016
    Posts:
    444

    These are the tutorials:


    Mines Evader: https://assetstore.unity.com/packages/templates/packs/mines-evader-118723

    This free package represents only one component of our complete shoot 'em up creator package
    Shmup Baby: https://assetstore.unity.com/packages/templates/systems/shmup-baby-128937

    Mines Evader is a Unity engine template, in which the goal of the player is to detonate as many mines as possible; by coming close to them then escaping away before they explode.

    Its behaviors are physics based, uses a minimum number of scripts. And is compatible with both mobile and desktop applications.

    Features
    • Physics based proximity mines system.
    • Detailed mines controls
    • Mobile and desktop controls support.
    • Uses Unity event system.
    • Camera tracks player and auto clamps game region.
    • Bullet burst based on particle system.
    • Warning flash color.
    • Easily customizable background, player and enemies.
    • Royalty free audio to use in your commercial game.
    • 4 Ready to use and modify demo scenes.
    • Artwork included.
    • Animated effects and explosions.
    This package was initially given for free in order to test uploading packs to the asset store while we were creating Shmup Baby, it's not really a tutorial in the sense of a step by step process, but more as a demonstration of a very simple game.

    In version 2.0 we have revised the script and made the pack easier to use and improved the code style. We tried to make the variables and methods as clear as possible and removed any comments or summaries which didn't add valuable information to the code.

    While this is the support thread for this pack, we most certainly cannot support the hundreds of downloads for this pack with each developer potentially having questions on how to modify this pack especially that it's free and is targeted for beginners.
    This thread is mainly for improving the pack and notifying us if there were any errors in it or ways to improve our code or implementation style. We really do apologize in advance but cannot reply to questions about building your own game as it will take us away from our work and our support to clients who have bought our other packs.

    Thanks a lot for your interest in this pack and we wish you a great career in building awesome games!
     
    Last edited: Jan 3, 2019
    DrOcto likes this.
  2. EbalStudios

    EbalStudios

    Joined:
    Nov 20, 2016
    Posts:
    444
    Going to add in this post, any questions that you guys ask, so that we keep it easily at the top to find easily and be a summary of the most frequently asked questions and their summary.

    FAQ
     
    DrOcto likes this.
  3. aturedoruk

    aturedoruk

    Joined:
    Nov 6, 2018
    Posts:
    11
    Hi, thanks for making this template, it's very useful! However I have a hard time understanding the physics based movement system and how to modify it. For example I want to add a function that would temporally stop player movement on one axis while maintaining current velocity. Would it be done through the Player or PlayerAnim script?
     
  4. EbalStudios

    EbalStudios

    Joined:
    Nov 20, 2016
    Posts:
    444
    This pack really needs an update, we first released it to test uploading packs to the store while we were working on https://assetstore.unity.com/packages/templates/systems/shmup-baby-128937

    If you are using an animation with the player then you should update the PlayerAnim script, if you are not using the animation then you should update the Player script.

    Basically if the PlayerAnim script is used then it overrides the player script
    In the next update I actually changed things a bit and made the animation script a separate component because I felt it would make much more sense, but I am just waiting to refine things a bit, the camera script now also has a bug and there are some small issues here and there, but it's taking some time because we are working on some other assets and I am also thinking of turning this into a tutorial where I record few video to explain how things work.

    Hope this helps, let me know if you need anything.
     
  5. aturedoruk

    aturedoruk

    Joined:
    Nov 6, 2018
    Posts:
    11
    I see! I have added this code to the Player script, I want to turn off the forward/backwards movement on trigger. I think it's pretty self explanatory but it doesn't seem to be doing anything, perhaps you would know best what exactly am I doing wrong.


    Code (CSharp):
    1.  
    2. public bool canMove = false;
    3. public virtual void StopMoving()
    4.         {
    5.             if (canMove)
    6.             {
    7.                 MyRigidbody.AddForce(transform.forward * Speed, ForceMode2D.Force);
    8.                 MyRigidbody.AddForce(-transform.forward * Speed, ForceMode2D.Force);
    9.  
    10.             }
    11.         }
    12.  
    13.         void OnTriggerEnter2D(Collider2D other)
    14.         {
    15.             if (other.tag == "StopMoving")
    16.             {
    17.                 canMove = false;
    18.                 Debug.Log("Cannot move.");
    19.             }
    20.         }
    21.  
    22.         void OnTriggerExit2D(Collider2D other)
    23.         {
    24.             if (other.tag == "StopMoving")
    25.             {
    26.                 canMove = true;
    27.                 Debug.Log("Can Move");
    28.             }
    29.         }
     
    Last edited: Dec 5, 2018
  6. EbalStudios

    EbalStudios

    Joined:
    Nov 20, 2016
    Posts:
    444
    Sorry, I probably missed something, but where are you accessing stop moving from? and I assume you are not using verical/horizontal input. Can you just try going back few steps and removing the triggers for now and try to move the player with the rigidBody
     
  7. aturedoruk

    aturedoruk

    Joined:
    Nov 6, 2018
    Posts:
    11
    I'm using the Horizontal and Vertical input, haven't changed anything in the Player script. The StopMoving void and canMove is supposed to be a boolean to restrict movement if enabled but I must be missing something.
     
  8. EbalStudios

    EbalStudios

    Joined:
    Nov 20, 2016
    Posts:
    444
    Basically I think you are never accessing StopMoving() at all, you can try to put a debug there to see if you do, you should put your "if (canMove)" inside the fixed update for the player which uses input and if you build for mobile you should put it into the mobile moving methods as well.
     
    Last edited: Dec 6, 2018
  9. EbalStudios

    EbalStudios

    Joined:
    Nov 20, 2016
    Posts:
    444
    edit: if you are using the animation version of the player, playerAnim as in the spaceship or space insect you should put these modifications inside playerAnim
     
  10. EbalStudios

    EbalStudios

    Joined:
    Nov 20, 2016
    Posts:
    444
    Code (CSharp):
    1.             #if UNITY_STANDALONE || UNITY_EDITOR
    2.  
    3.             float VerticalAxis = Input.GetAxis("Vertical");
    4.             float HorizontalAxis = Input.GetAxis("Horizontal");
    5.  
    6.             if (!stop)
    7.             {
    8.                 MyRigidbody.AddForce(VerticalAxis * transform.forward * Speed, ForceMode2D.Force);
    9.                 MyRigidbody.AddTorque(-HorizontalAxis * RotationSpeed);
    10.             }
    just used an if statement with a bool value like you did with the Rigidbody addforce and torque statements that are located in the fixed update, this should be done in player if you are using player or in playerAnim if you are using that.

    Anyways almost finished rewriting the code for Mines Evader, it should be a lot more user friendly now with better commenting and coding practices.
     
    Last edited: Dec 6, 2018
  11. aturedoruk

    aturedoruk

    Joined:
    Nov 6, 2018
    Posts:
    11

    Thanks, that worked! Looking forward to the update.
     
    EbalStudios likes this.
  12. EbalStudios

    EbalStudios

    Joined:
    Nov 20, 2016
    Posts:
    444
    You can now finally download Version 2.0, but please backup your previous projects done on version 1.0 before updating.

    Happy new year!
     
    aturedoruk likes this.
  13. UnityZaki

    UnityZaki

    Joined:
    Jan 10, 2018
    Posts:
    18
    hi please i need your help. After adding Mine Evader to my project .the player ship can't shoot bullet .this message error :
    NullReferenceException: Object reference not set to an instance of an object
    ProjectileScript.OnCollisionEnter (UnityEngine.Collision hit) (at Assets/SciFiArsenal/InteractiveDemo/Scripts/ProjectileScript.cs:33
     

    Attached Files:

    Last edited: Aug 16, 2019
  14. EbalStudios

    EbalStudios

    Joined:
    Nov 20, 2016
    Posts:
    444
    Apologies. We understand how challenging it must be to add different projects together with the expectation that it will work out only to see errors afterwards. But more likely than not, when mixing different projects errors will pop.

    We really cannot help you with this one as it requires debugging your projects and seeing where the conflict is and changing the code to make it work.
     
  15. EbalStudios

    EbalStudios

    Joined:
    Nov 20, 2016
    Posts:
    444
    While this is the support thread for this pack, we most certainly cannot support the hundreds of downloads for this pack with each developer potentially having questions on how to modify this pack especially that it's free and is targeted for beginners.
    This thread is mainly for improving the pack and notifying us if there were any errors in it or ways to improve our code or implementation style. We really do apologize in advance but cannot reply to questions about building your own game as it will take us away from our work and our support to clients who have bought our other packs.

    Thanks a lot for your interest in this pack and we wish you a great career in building awesome games!
     
  16. UnityZaki

    UnityZaki

    Joined:
    Jan 10, 2018
    Posts:
    18
    thank you for your answere. good assets and awesome support
     
  17. EbalStudios

    EbalStudios

    Joined:
    Nov 20, 2016
    Posts:
    444
    Mines Evader has been deprecated.

    In an effort to give our asset store page more focus and clarity, and to dedicate our time and energy to more productive endeavors we have decided to deprecate Mines Evader.

    Thank you for your understanding.