Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Easy Weapons - Most powerful weapon framework for Unity

Discussion in 'Assets and Asset Store' started by randomperson42, Jul 1, 2014.

  1. randomperson42

    randomperson42

    Joined:
    Jun 29, 2013
    Posts:
    974
    Yeah I was in contact with him while I was working on the Shooter AI-Easy Weapons compatibilty (that work is mostly done but there's still a large amount of work to be done on other features before the update will be ready) and I can recommend Shooter AI as well. It's not perfect of course, there are pros and cons like anything but I went ahead and wrote a review for it with more details.
     
  2. randomperson42

    randomperson42

    Joined:
    Jun 29, 2013
    Posts:
    974
    Easy Weapons 3 has been submitted to the asset store team for review.

    Version 3 introduces a bunch of new features, here are just a few of the big ones:
    • Shooter AI support
    • Reorganized new custom editor
    • Bullet hole pooling system and bullet hole editor improvement
    • Messages can be sent on important events like Fire and Reload so you can trigger other actions in your scripts
    • RemoteFire feature added so you can trigger weapon firing from your scripts instead of only using user input and AI control
    • Cook/timed projectile support for bows/grenades that increase power based on how long the fire button is pressed
    • And much more...

    Keep an eye out for an announcement when the update is live. Soon there will be a new demo to play, but in the meantime you can take a look at this video which showcases Easy Weapons' support for Shooter AI.

     
    MIK3K and hopeful like this.
  3. randomperson42

    randomperson42

    Joined:
    Jun 29, 2013
    Posts:
    974
    Version 3 is now live!
    Price Reduced - now only $25!

    Asset Store


    NEW in Easy Weapons 3:
    • Support for Shooter AI by Gateway Games
    • Reorganized, clean, new custom editor
    • Pooling system for bullet holes
    • More powerful bullet hole selection
    • Delay fire - fire or launch after specified time
    • Cook/timed support for grenades/bows that shoot farther when you hold down the fire button longer
    • Messages can now be sent on key events like Fire, Launch, Reload, etc. to trigger events in your other scripts
    • Public RemoteFire method added so firing can be triggered from other scripts istead of only input and AI
    • Option to reload weapons automatically when weapon runs out of ammo
    • Dry fire sounds - audio that plays when the user attempts to fire a weapon that's out of ammo
    • ... And more!

    Note: Documentation may be out of date. Updated documentation coming soon.



    Keep an eye out for a new announcement with a great new demo and an upcoming contest from Easy Weapons and Shooter AI by Gateway Games.



     
    ManAmazin and OnePxl like this.
  4. randomperson42

    randomperson42

    Joined:
    Jun 29, 2013
    Posts:
    974
  5. randomperson42

    randomperson42

    Joined:
    Jun 29, 2013
    Posts:
    974
    CONTEST IS NOW LIVE
    The winner will receive free vouchers for Easy Weapons and Shooter AI



    How to enter the contest:
    Easy Weapons version 3 brings Shooter AI support. To showcase this new feature, I've created a new demo that uses Easy Weapons and Shooter AI together. First, post on this thread letting me know that you intend to give the contest a try. I'd like to know roughly how many participants there are. Next, open the demo and give it your best shot.
    You can now access the demo here.

    Somewhere in the scene is a large panel with a code on it. To win the contest, you'll need to fight your way through the scene and locate the code. Once you've found it, you'll need to quickly take a screenshot or write it down. The first person to find the code and show it to me is the winner, and will receive vouchers for both Shooter AI and Easy Weapons.

    If you find the code:
    If you find the code, send me a PM with the code so I know you have it. The first person to send me a PM with the code is the winner, but the winner may not be announced until at least Friday, Febrary 27, 2015. At that time I'll PM you with the voucher codes.

    Remember, if you find the code, send it to me in a PM and NOT in a post in this thread as you may or may not be the first one to find it. The winner will be announced in this thread later.​
     
  6. AaronClark

    AaronClark

    Joined:
    Oct 14, 2013
    Posts:
    39
    Gave the demo a try, was fun :)
     
    randomperson42 likes this.
  7. moure

    moure

    Joined:
    Aug 18, 2013
    Posts:
    184
    Gave it a try! Nice idea for a competition :)
     
    Last edited: Feb 20, 2015
    randomperson42 likes this.
  8. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,623
    Found it! That was fun. I already have both assets, so I won't try to claim anything, but it was good to see it all in action. :)
     
    randomperson42 likes this.
  9. red2blue

    red2blue

    Joined:
    Feb 26, 2013
    Posts:
    200
    Also found it. Have also both versions, so have fun. It was really nice to fight through it. Keep up the good work!
     
  10. electroflame

    electroflame

    Joined:
    May 7, 2014
    Posts:
    177
    Gave it a shot as well. Great demo! I sent you a PM. :)
     
  11. sheffieldlad

    sheffieldlad

    Joined:
    Oct 9, 2013
    Posts:
    154
    giving the demo a go.
     
  12. unicat

    unicat

    Joined:
    Apr 8, 2012
    Posts:
    425
    Asset Store doesn`t proper update this pack. Everytime i start Unity it goes back to Version 3.0 .
     
  13. FraneKingzy

    FraneKingzy

    Joined:
    Nov 12, 2014
    Posts:
    14
    UUUUUU I saw old topic about easy weapons and I thought this is not worth it... But when I saw this peace of art (I think about this new topic) Believe me is worth to pay for it.(or what ever)
     
  14. randomperson42

    randomperson42

    Joined:
    Jun 29, 2013
    Posts:
    974
    It's now Friday, which means it's time to announce the winner of the contest!

    The winner is @AaronClark !
    I'll send him a PM and he will be receiving vouchers for both Easy Weapons and Shooter AI. Thanks again to all who participated.
     
  15. AaronClark

    AaronClark

    Joined:
    Oct 14, 2013
    Posts:
    39
    They will be put to good use :)
     
    randomperson42 likes this.
  16. randomperson42

    randomperson42

    Joined:
    Jun 29, 2013
    Posts:
    974
    The Unity 5 compatible update for Easy Weapons is now live. I apologize to anyone who tried to download before the compatibility update - I was a bit delayed submitting and also the asset store review team seems to be a bit slow lately.
     
    hopeful likes this.
  17. 8Keep

    8Keep

    Joined:
    Oct 21, 2013
    Posts:
    3
    Cool! I looked into the warmup section for the weapons. The included demo scene does not appear to have any visual feedback upon warming up the weapons. I will probably be modifying my local copy to be able to play an animation or whatever I wish.
     
  18. randomperson42

    randomperson42

    Joined:
    Jun 29, 2013
    Posts:
    974
    When was the last time you updated the package?
    The grenade launcher (fires small round black bombs with an arch) should fire harder/softer depending on how long you hold down the fire button.
     
  19. 8Keep

    8Keep

    Joined:
    Oct 21, 2013
    Posts:
    3
    Oh yes, I did test out the new updates, and it does work. But I mean visual feedback as in a drawback animation or something. But that is easy to do with mecanim.
     
  20. Justice0Juic3

    Justice0Juic3

    Joined:
    Apr 29, 2013
    Posts:
    188
    @randomperson42
    How about any mobile support? Are you planning to do this in a next update somewhere?
    Until now everything is amazing! Good work.
     
  21. randomperson42

    randomperson42

    Joined:
    Jun 29, 2013
    Posts:
    974
    While I personally haven't tested it on mobile, I don't see a reason why Easy Weapons wouldn't work on mobile. If there's anything specifically for mobile that needs support added, let me know. If you're referring to using GUI buttons to trigger firing, you might take a look at the RemoteFire method in the documentation.
     
    Justice0Juic3 likes this.
  22. gibmation

    gibmation

    Joined:
    Dec 1, 2014
    Posts:
    311
    Hi All,
    I started using your asset with unity 4 then moved to 5 and seems to work fine up to now.

    I am using the weapons script on a 9.2" WW2 canon.

    I have a problem with recoil.

    In my model the canon's barrel needs to be elevated.

    I have changed the reload section in your script to handle the barrel elevation but when the barrel elevates the recoil recover part of your scripts notices the barrel has moved and changes the position of items within the recoil model.

    Is there anyway that I can just restrict the original transform of the recoil to only adjust the forward/back movement and not the height of the object?
     
  23. randomperson42

    randomperson42

    Joined:
    Jun 29, 2013
    Posts:
    974
    So I take it the elevation needs to change dynamically in-game? If not there shouldn't be a problem.

    If so, take a look at this.
    This is the recoil recovery code, found in Update(), currently line 305 on my end:
    Code (CSharp):
    1. weaponModel.transform.position = Vector3.Lerp(weaponModel.transform.position, transform.position, recoilRecoveryRate * Time.deltaTime);
    2. weaponModel.transform.rotation = Quaternion.Lerp(weaponModel.transform.rotation, transform.rotation, recoilRecoveryRate * Time.deltaTime);
    So the easiest solution may be (depending on your setup/situation) to set the weapon GameObject's elevation the same as the barrel's elevation. So the weapon might be a child object of your main model, and your barrel would be a child of your weapon. Hope that makes sense.

    If this doesn't work for your setup, you might try Mathf.Lerp to change only one axis instead of the entire Vector3.

    I hope this helps.
     
  24. gibmation

    gibmation

    Joined:
    Dec 1, 2014
    Posts:
    311
    Thanks for the speedy reply.

    I think I will have to checkout Mathf.lerp.

    I have a cradle object which holds the gun barrel.
    The cradle object rotates up both itself + barrel.
    Only barrel has recoil not cradle.

    When I elevate/rotate cradle and barrel, the recoil transform moves barrel down, which I suppose is because its position changes after rotation. It remains static till then.

    I'll take a look at Mathf.lerp and see if I can figure it out.
    Thanks for the pointer.
     
  25. randomperson42

    randomperson42

    Joined:
    Jun 29, 2013
    Posts:
    974
    What I was suggesting was that you make the weapon GameObject (with the Weapon.cs script) a separate (child) GameObject from your cradle object. But you're probably right, and I don't know what your setup is.

    Anyway if you have more troubles with that or if you have any questions please feel free to ask.
     
  26. gibmation

    gibmation

    Joined:
    Dec 1, 2014
    Posts:
    311
    Thanks again would this work?...

    Code (CSharp):
    1. weaponModel.transform.position.z = Mathf.Lerp(weaponModel.transform.position.z, transform.position.z, Time.deltaTime * recoilRecoveryRate);
     
  27. randomperson42

    randomperson42

    Joined:
    Jun 29, 2013
    Posts:
    974
    Only one way to find out. :)

    Actually in C# I don't think you can assign a value to transform.position.z directly. You'll have to assign the entire transform.position a new Vector3 with the same x and y values but with weaponModel.transform.position.z for the Z axis instead. Hope that makes sense.
     
  28. gibmation

    gibmation

    Joined:
    Dec 1, 2014
    Posts:
    311
    No your right ...Consider storing the value in a temporary variable. :rolleyes:
    I try figure it out lol.
     
  29. gibmation

    gibmation

    Joined:
    Dec 1, 2014
    Posts:
    311
    I tried this but does not work either it just moves model before recoil...

    Code (CSharp):
    1. weaponModel.transform.position = new Vector3(Mathf.Lerp(weaponModel.transform.position.y, transform.position.y, Time.time* recoilRecoveryRate), 0, 0);
     
  30. gibmation

    gibmation

    Joined:
    Dec 1, 2014
    Posts:
    311
    This is small video of the problem.
     

    Attached Files:

    • 2gun.rar
      File size:
      405.3 KB
      Views:
      400
  31. gibmation

    gibmation

    Joined:
    Dec 1, 2014
    Posts:
    311
    I'm sorry I cant figure it out, is it possible to provide an example I can work from please.
    Thanks in advance.
     
  32. randomperson42

    randomperson42

    Joined:
    Jun 29, 2013
    Posts:
    974
    @gibmation, I have to apologize, it looks like I didn't get notifications when you posted here for some reason. Sorry I didn't get back to you sooner, is there anything I can still help you with?
     
  33. randomperson42

    randomperson42

    Joined:
    Jun 29, 2013
    Posts:
    974
  34. Jaephen

    Jaephen

    Joined:
    Mar 7, 2013
    Posts:
    26
    Hey, does this system include weapon switching animation support?
    The switching in the demo feels as though the weapons are magically teleporting into the hands.

    Also, is melee available in this as well?
     
  35. randomperson42

    randomperson42

    Joined:
    Jun 29, 2013
    Posts:
    974
    Hi @Jaephen, weapon switching animation isn't implemented in the demo but there is a OnEasyWeaponsSwitch method that's called via message for this purpose. When the user switches weapons, the Easy Weapons system uses SendMessageUpwards() to automatically call OnEasyWeaponsSwitch(). So it should be easy to create this function in another script that will trigger animation.

    In other words it doesn't have weapon switching animations out-of-the box, but with a bit of work it could be done.

    Easy Weapons is primarily focused on range combat, however it could easily be used for melee combat depending on what kind of system you want. If you want melee combat based on raycasts, you could just set the weapon type to raycast and decrease the range to your character's weapon swing radius. However if you're looking for physics-based melee, that would probably require something totally different.

    Hope this helps. If you have any other questions, feel free to ask.
     
  36. Jaephen

    Jaephen

    Joined:
    Mar 7, 2013
    Posts:
    26
    Thanks, great to know! Bought the package earlier, still have yet to try it.
    Will have to look at the weapon switching later. Is there any documentation on how to achieve it?

    Would I need a physics-based melee system to get the best results with Bloody Mess?
     
  37. randomperson42

    randomperson42

    Joined:
    Jun 29, 2013
    Posts:
    974
    Haven't made any documentation for weapon switching animations, but there shouldn't be much to it. If you need help feel free to shoot me an email or ask in this thread and I'll do my best to help.

    For your second question, I don't know enough about Bloody Mess, support was just added and I haven't used it much. But you might try asking questions here on its thread. I can say that raycasting would work with Bloody Mess though.
     
  38. SpaceRay

    SpaceRay

    Joined:
    Feb 26, 2014
    Posts:
    455
    Hello, I really like very much and love this weapons and very well done, BUT when upgrading to the new 3.1 update I found that there is a big problem and it does not work because of this

    ArgumentException: Input Button Weapon 1 is not setup.
    To change the input settings use: Edit -> Project Settings -> Input
    WeaponSystem.Update () (at Assets/Easy Weapons/Scripts/WeaponSystem.cs:30)


    And is supposed that there should be 8 keys configured so is not only one, and when going to the Project Setttings, is true that there are no weapon input configuration

    Please can you be so kind to fix it, thanks
     
  39. randomperson42

    randomperson42

    Joined:
    Jun 29, 2013
    Posts:
    974
    Hi @SpaceRay, the system has always required a bit of input setup. Simply go to Edit > Project Settings > Input as it says, and add the necessary input fields including Reload and Weapon(s) 0-9. I believe there are a few others as well, as explained in the setup section of the documentation. Also have a look at the Unity docs for Input settings.
     
  40. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,291
    O do not know if this is a stupid question but is easy weapon useable with ufps?
    I mean can i combine them (the good features of them) in some way?
     
  41. randomperson42

    randomperson42

    Joined:
    Jun 29, 2013
    Posts:
    974
    There's no such thing as a stupid question, if it's an honest one. :)
    I haven't used Easy Weapons and UFPS together, as UFPS has a basic weapon system of its own already integrated. If you're a coder it might be possible to combine them, but I can't say since I've never really used UFPS.
     
  42. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,291
    I am not a coder :(
     
  43. randomperson42

    randomperson42

    Joined:
    Jun 29, 2013
    Posts:
    974
    Then the short answer is probably no.

    In the past I've assumed that people with UFPS for the most part will just use the UFPS weapons, but there are definitely features and improvements in Easy Weapons that UFPS doesn't have. So if you think UFPS support would be helpful, I'll consider adding it in a future Easy Weapons update. (No promises yet. :))
     
  44. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,291
    That sounds like a good plan :)
    I read that you do not promise it yet but hope for it.
     
  45. SpaceRay

    SpaceRay

    Joined:
    Feb 26, 2014
    Posts:
    455
    This is a good question, and not stupid, and I myself had the same question and asked to UFPS team, and seems that is possible and without coding, you just to configure all the parts together, there some video tutorials for custom weapons

    See this google search for UFPS CUSTOM WEAPONS
    http://www.google.com/search?q=ufps custom weapons&ie=utf-8&oe=utf-8&gws_rd=cr&ei=oJM4VY-oDNGy7QarhoDoBg

    I have not done it myself because for me is not easy to do, although it seems that YOU CAN do it, just try it and see if you can do it and if it could work

    Sorry to say, but I am very surprised by your answer, considering that in previous versions ALL these input comes already configured and included by default, as you can see in the screenshot attached below that is from a previous version 2.0

    When you download the Easy Weapon 3.1 from the Asset store in Unity 5.01, all the custom input are missing and YOU CAN´T load a scene and click play because it will NOT WORK, and will give the

    ArgumentException: Input Button Weapon 1 is not setup.
    To change the input settings use: Edit -> Project Settings -> Input
    WeaponSystem.Update () (at Assets/Easy Weapons/Scripts/WeaponSystem.cs:30)


    So are you selling an asset that is "broken" or better said, not fully configured and the buyer must complete and configure ALL the needed custom inputs BEFORE he can use the weapons or see the example scenes?

    I wonder Why it was included before by default and now has been removed or not added?

    Please can you be so kind to fix it and include them again, thanks
     

    Attached Files:

    Last edited: Apr 23, 2015
  46. randomperson42

    randomperson42

    Joined:
    Jun 29, 2013
    Posts:
    974
    Hi again,
    Like it says and is explained in the documentation you can setup the input at Edit > Project Settings > Input. If you'd like me to explain that further, let me know - I'd be glad to help.

    As for the asset being setup by default in previous versions - I can't say I know anything about this. To the best of my knowledge, adding the input fields has always been necessary when importing Easy Weapons to a new project, but it looks like that's not the case in your situation. It seems likely that the change has something to do with a difference in Unity 5.

    Just to clarify, you're importing Easy Weapons into a new project and it doesn't have the input setup? Or are you updating the package in a project that already has Easy Weapons imported?
     
  47. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,623
    Easy Weapons used to be carried by the asset store as a "Complete Project" ... which caused it to write the proper inputs for the demo scene into your Project Settings. However, people complained that any complete project will overwrite ALL project settings, so it was moved to the Scripting section.

    Now that Easy Weapons is in the Scripting section of the store, it no longer automatically overwrites all of your project settings when you import it. However, now you must set up your own input settings for the project, and that is why the demo doesn't work out of the box.

    (This is my understanding of the situation. If I've got it wrong, please correct me.)
     
  48. SpaceRay

    SpaceRay

    Joined:
    Feb 26, 2014
    Posts:
    455
    FINALLY THE PROBLEM HAS BEEN SOLVED AFTER DOING SOME TESTINGS (see below)
    I have found that I have found another different way to GET the needed input by importing the Easy Weapon 2.0 project from Unity 4.6, upgrading it to Unity 5.0 and then update it downloading 3.1 from asset store and you then you get

    Following this above you get EASY WEAPON 3.1 WITH ALL the input settings included
    Although the problem is that you must have a previous project with 2.0 from Unity 4.6

    Thanks, but do not bother as I have been able to solve it as told above

    Sorry:eek:? What:eek::confused:? You can´t say anything about this:confused:? and what is more weird and strange Adding the Input has ALWAYS been necessary:confused:?
    Are we living in the same world and reality?
    If you have not done and them yourself, how is possible that I have NEVER needed to add any input field when using Easy Weapon 2.0 and they have been already added and been there?
    Has been added by Magic the input fields shown on the screenshot above, or has the Unity team added them themselves?

    TESTS I HAVE DONE TODAY

    Please, Can you be so kind to possibly explain why it appears on the first 3 with ALL the needed input fields for weapons as shown on the screenshot above and then after it does not appear in Easy Weapon 3.1, or what is more strange is that loading Easy Weapon 2.0 into Unity 5 as a package all of the input fields are delete?

    Considering all the tests I have done, maybe is that an exported package DOES NOT include any of the project settings



    1 - V2.0 - Create new clean and empty project in Unity 4.6.4 and import from asset store Easy Weapon 2.0
    Includes all the needed input values for the weapons and other and you can just load the example scene and hit play and you do not get any error message

    2 - V 2.0 - Unity 5.0.1 open a project created in Unity 4.6 with Easy Weapon 2.0 and upgrade it to version 5
    Includes all the needed input values for the weapons and other and you can just load the example scene and hit play and you do not get any error message

    3 - V2.0 to 3.1 - Unity 5.0.1 open a project created in Unity 4.6 with Easy Weapon 2.0 and upgrade it to version 5 then after download Easy Weapon 3.1 and update the 2.0
    Includes all the needed input values for the weapons and other and you can just load the example scene and hit play and you do not get any error message

    2 - V2.0 - Create new clean and empty project in Unity 4.6.4 and import Easy Weapon 2.0 from a created package with Unity 4.6.4 (where is available the additional input fields)


    Does NOT include any of the needed input values and you the error message shown in previous post when loading the demo scene

    3 - V3.1 - Create new clean and empty project in Unity 4.6.4 and import from asset store Easy Weapon 3.1
    Does NOT include any of the needed input values and you the error message shown in previous post when loading the demo scene

    4 - V2.0 - Create new clean and empty project in Unity 5.0.1 and import Easy Weapon 2.0 from a created package with Unity 4.6.4 (where is available the additional input fields)

    Does NOT include any of the needed input values and you the error message shown in previous post when loading the demo scene. It seems that Unity 5 have deleted them when importing as they were there when making the package

    5 - V 3.1 - Create new clean and empty project in Unity 5.0.1 and import from asset store Easy Weapon 3.1
    Does NOT include any of the needed input values and you the error message shown in previous post when loading the demo scene

    Thanks

    best regards
     
    Last edited: Apr 23, 2015
  49. randomperson42

    randomperson42

    Joined:
    Jun 29, 2013
    Posts:
    974
    Thank you.
    The main reason I moved to the scripting section is that it seemed a more accurate description of what Easy Weapons was - it's a tool, not a complete project.

    @SpaceRay I hope you'll understand that while importing input settings can be useful for a new project, this isn't ideal in most situations because this means that all project settings will be overwritten. That can be a huge problem for most developers already working on a project.

    Version 3.0 was the large update with new features.
    Then there was Version 3.0.1, a small metadata update not listed in the Release Notes.
    Then Version 3.0.2 which is the Unity 5 compatible update.
    Most recently there was 3.1.0 which is the Bloody Mess support update.

    So the only differences in Easy Weapons between 3.0 and 3.1 are Unity 5 compatibility and some very small code additions (mostly commented-out, not affecting input) for Bloody Mess.

    From looking at your tests, it looks like for the most part you need to add the input settings manually. There very well may be a difference caused by Unity 5 as well as the difference in categories, but at this point the Input settings need to be added regardless.

    @Aurore, @caitlyn, does anyone know if Unity 5 no longer imports project settings from the asset store?
     
  50. unicat

    unicat

    Joined:
    Apr 8, 2012
    Posts:
    425
    Hello, getting an error here with the Easy Weapons and AdvancedAI packages:

    Assets/Easy Weapons/Scripts/Projectile.cs(24,14): error CS0101: The namespace `global::' already contains a definition for `Projectile'.

    There seems to be a projectile script in both packages. What can i do?