Search Unity

Dastardly Banana -(Free) FPS Weapons Package UPDATE- 0.95

Discussion in 'Assets and Asset Store' started by Jason_DB, Mar 29, 2010.

  1. NoMaD

    NoMaD

    Joined:
    Feb 1, 2010
    Posts:
    41
    Ohh. haha I meant the amount of sway, not sway rate :D
     
  2. Epic

    Epic

    Joined:
    May 30, 2010
    Posts:
    76
    Hey. Cuuld you make it so you can carry 2 wepons instead of one?
    Much appreciated


    -Isaac
     
  3. coin-god

    coin-god

    Joined:
    Jan 21, 2010
    Posts:
    325
    You can carry up to 10 (i think) weapons if you want.

    In my game I use 2.

    Watch the video tutos.
     
  4. Jason_DB

    Jason_DB

    Joined:
    Nov 30, 2008
    Posts:
    495
    Yep, it is 10, the array "weapons" in playerWeapons can be changed to have a length from 1 to 10 in the inspector.
     
  5. Ponik

    Ponik

    Joined:
    Oct 17, 2009
    Posts:
    7
    may be he means weapons in two hands? like two pistols by "macedonian" style :)
    i think for this he needs only additional animations :)
     
  6. coin-god

    coin-god

    Joined:
    Jan 21, 2010
    Posts:
    325
    Only needs a model with 2 weapons at the same time and with custom animations.
     
  7. Epic

    Epic

    Joined:
    May 30, 2010
    Posts:
    76

    Oh. How could I miss that?
    *Smacks self repeatedly on the head with a giant hammer
     
  8. jocyf

    jocyf

    Joined:
    Jan 30, 2007
    Posts:
    288
    It's a great job. I love it. After trying it a little bit i realize that there are some things that can be improved (easy to make):

    - More than one animation for Fire or Reload.
    - Animation when you cacth (or put away) the weapon.
    - Sound support for reload.
    - Different sound support in secondary weapon.
    - Different mouse sensibility in scope mode.

    These are the difficult ones (at least for me):

    - Weapons that "launch" visible things (grenades that you have in your hands, bows)
    - Mele weapons (knifes, swords, your hands)

    Hope that helps. It's a constructive feeback.
     
  9. bloobat

    bloobat

    Joined:
    Jun 15, 2009
    Posts:
    63
    I like it, and found it very useful. However one thing happened to me:

    When I first used the FPS Player Prefab and tried to fire the weapon, there weren't any bullets being fired or muzzle flash. I noticed it was like a 'default' in your tutorial but I didn't get it for some reason. It's probably something I forgot to do but I viewed the beginning of your tutorial twice and didn't find a solution. Also to add I tried it with no weapon graphic and then I tried it with a weapon graphic (the one I used was the M16 A4 with attachments).
     
  10. Jason_DB

    Jason_DB

    Joined:
    Nov 30, 2008
    Posts:
    495
    Are there any errors? It's kind of difficult to tell what the issue is from the description but to start with I would check for errors and try just copying one of the weapons from the demo scene to use as a baseline to compare with yours.

    Also @ Jocyf we're planning on adding most of those things soon, although I'm finishing up the school year right now so I won't really have time to work until next week. A couple of the suggestions are already doable, though:

    • (Different mouse sensibility in scope mode)- The gun script automatically changes the sensitivity when you zoom, changing it by the same factor that you zoom by to keep the camera movement roughly the same in and out of scope.

      (Weapons that "launch" visible things)- The launcher script already in there could probably do grenades or bows, and definitely launches a visible thing. The only issue is that the projectile is fired immediately when you click so it might look a little weird with a grenade-throwing animation.
    To make a really nice bow would require a "charge" weapon, though (since you need to pull the arrow back before releasing) which we definitely are looking in to.
     
  11. bloobat

    bloobat

    Joined:
    Jun 15, 2009
    Posts:
    63
    Yes I believe there might be some errors. I checked my input (under the edit/project settings) and it has my "fire 1" set as "left ctrl". How can I change it to "left click"? Because when I type 'left click', it wouldn't let me use it. It just seems like it doesn't have a button for me to shoot or fire. :/ Plus there's like a 'gun firing' sound whenever I start the game.
     
  12. Jason_DB

    Jason_DB

    Joined:
    Nov 30, 2008
    Posts:
    495
    The input for left mouse is actually called mouse1. The noise playing whenever you start is becauae you have one of The guns set to play its audio clip on awake (i think you can change this in The audio component of the gun.
     
  13. bloobat

    bloobat

    Joined:
    Jun 15, 2009
    Posts:
    63
    Ah ok thanks, I fixed the sound being played at the start (it was set on awake). And I set the input to 'mouse 1' and I still cant fire the gun though. There is an alt positive input that uses 'mouse 0'. Should I just erase that? And I also have two other firing inputs: fire 2 and 3.

    EDIT: Wow I actually fixed it. :D I don't know what I did but it's fixed. I visited the demo scene and then went to my project and it happened. However whenever I start the game the gun fires automatically. Any solutions?
     
  14. Jason_DB

    Jason_DB

    Joined:
    Nov 30, 2008
    Posts:
    495
    Does the gun fire when you start the game or when you lock the cursor (when you first click and the mouse disappears)? I can't think of why it would fire without the fire button being hit but the guns often go off when you lock the cursor.
     
  15. bloobat

    bloobat

    Joined:
    Jun 15, 2009
    Posts:
    63
    Sometimes it fires when I start the game. Sometimes it doesn't. Also sometimes when I fire at the ground, the sparks where the bullet hit wont appear, but sometimes they do. But I'd also like to know how to aim down the sights? I didn't see an input for aiming in the 'initial setup' but yeah.
     
  16. Jason_DB

    Jason_DB

    Joined:
    Nov 30, 2008
    Posts:
    495
    It's right mouse button.
     
  17. bloobat

    bloobat

    Joined:
    Jun 15, 2009
    Posts:
    63
    Which is mouse 1 right? For some reason my input for "Fire1" likes to have two positive inputs: mouse 0 and 1. Making it fire the gun two different ways. Otherwise it doesn't seem to want to fire. Should I just make a positive and negative input?
     
  18. Jason_DB

    Jason_DB

    Joined:
    Nov 30, 2008
    Posts:
    495
    You should only have one positive input for fire1 (mouse0). mouse1 is the input for fire2. Giving fire1 two inputs just makes both mouse buttons fire, when the right mouse button is supposed to aim (by default at least).
     
  19. bloobat

    bloobat

    Joined:
    Jun 15, 2009
    Posts:
    63
    Thanks a ton! It worked! However one more thing (you must be very tired of my questions lol). It doesn't seem to want to aim with the right mouse button. Is there some sort of script or function I'll have to edit?
     
  20. General Jackson

    General Jackson

    Joined:
    Oct 31, 2009
    Posts:
    73
    Hi, I "lurk" here at these forums. (I read a lot of posts but dont post much)

    I have been using this and it is truly awesome.
    But for the life of me i cant figure out how to configure the animations so i can have a firing, reloading, moving, sprinting animation.

    Any help?

    Also, i want to donate to this but i dont have a lot of money right now.
    So sorry :(
     
  21. Jason_DB

    Jason_DB

    Joined:
    Nov 30, 2008
    Posts:
    495
    There is a script called "aimmode" which should be on an AimObject which is a child of the gun (this is already on the gun prefab by default). What you need to do is find the instance of that script and make sure that "Weapon Aims" is set to true, and then configure the variables under it. Also try looking at the Aiming Tutorial :http://www.dastardlybanana.com/AimTutorial.mov

    @General Jackson The moving and running aren't actually animations, they're coded into the script (to make them work just set the "sway rate" and "sway factor" in the gun script). For the reloading and firing animations you just need to make sure that your weapon model has those animations on it, and then add the "gun child animation" script to it and set the animations in the script.

    (This should all be covered in the first tutorial: http://www.dastardlybanana.com/Tutorial1.mov)
     
  22. bloobat

    bloobat

    Joined:
    Jun 15, 2009
    Posts:
    63
    Holy goodness thanks a billion! I finally got it to work! :D I now officially love this FPS package, thanks a ton again and I'll be sure to donate once I get my paycheck. xD
     
  23. Jason_DB

    Jason_DB

    Joined:
    Nov 30, 2008
    Posts:
    495
    I'm glad its working! If you have any more questions you can email me at info@dastardlybanana.com and i'll be happy to help.
     
  24. General Jackson

    General Jackson

    Joined:
    Oct 31, 2009
    Posts:
    73
    That did it man thanks!

    If i can find a video capture program thats free and takes decent quality videos i'll show you what ive done :eek:

    Also, can you make it where different surfaces make different sparks come? because right now i have it changed to blood for when i shoot the enemies, but of course blood comes when you shoot anything. lol.
     
  25. Jason_DB

    Jason_DB

    Joined:
    Nov 30, 2008
    Posts:
    495
    That's good to hear (if you ever have a website/video/screens email them to me so I can link to them from the site). As far as the sparks go that should be in the next update. We'll need to change how the sparks work completely but its one of our priorities as far as changes go. The "blood coming out of everywhere" might work for a horror game though :)
     
  26. General Jackson

    General Jackson

    Joined:
    Oct 31, 2009
    Posts:
    73
    Yes haha.
    Here is a screenshot :D

     
  27. Jason_DB

    Jason_DB

    Joined:
    Nov 30, 2008
    Posts:
    495
    Looks neat, although it's a little hard to make out with the level of light.
     
  28. GeneralGrant

    GeneralGrant

    Joined:
    Jun 10, 2010
    Posts:
    977
    Can we use it for commercial projects?
     
  29. Jason_DB

    Jason_DB

    Joined:
    Nov 30, 2008
    Posts:
    495
    You can; the only actual requirement is that you include us/the package in the credits or something (it needs to be attributed). While it isn't required we would also like to encourage a donation, especially if you're using it for a commercial project.

    http://creativecommons.org/licenses/by-sa/3.0/us/
     
  30. HJP

    HJP

    Joined:
    Jul 8, 2009
    Posts:
    152
    Nice work. I like it. I am willing to donate. What's your solution for a network game? Are your system usable?
     
  31. Jason_DB

    Jason_DB

    Joined:
    Nov 30, 2008
    Posts:
    495
    Well the system is limited to weapons, so there shouldn't be anything preventing you from using it in a network game.
     
  32. HJP

    HJP

    Joined:
    Jul 8, 2009
    Posts:
    152
    That's true ... o.k. If you think in network views, then the whole world changes ....
     
  33. Jason_DB

    Jason_DB

    Joined:
    Nov 30, 2008
    Posts:
    495
    Yeah from a network perspective the issue is how you build the rest of the game to suit multiplayer, but the guns for each player would be handled locally like normal.
     
  34. General Jackson

    General Jackson

    Joined:
    Oct 31, 2009
    Posts:
    73
    Could you add support for going prone? :)
     
  35. Jason_DB

    Jason_DB

    Joined:
    Nov 30, 2008
    Posts:
    495
    Possibly, but there are a lot of other things which we would add first (so I don't know if it will be added any time soon).
     
  36. joel

    joel

    Joined:
    Jun 12, 2010
    Posts:
    117
    would it be possible to add weapon switching animations?
    right now the weapons just pop up magicly. having an animation for it would make it much more realistic. and also be a great help for other games (could even be applied to thirdperson games :) )
     
  37. Jason_DB

    Jason_DB

    Joined:
    Nov 30, 2008
    Posts:
    495
    That has actually been added and will be up with the next update (which might be soon if we do a smaller one than last time).

    Edit: I also just finished progressive reloading (when you reload by individual shells rather than entire clips, generally for shotguns). I'm not totally sure when this will be coming out since we haven't decided what else (if anything) to put in this update.
     
  38. joel

    joel

    Joined:
    Jun 12, 2010
    Posts:
    117
    great! looking forward too it.
    i'm working on a thirdperson game myself that will involve swords. i've tried the current method but it just looked wierd (cause of the lack of animations) so i cant wait to see the next release!

    -joel
     
  39. Jason_DB

    Jason_DB

    Joined:
    Nov 30, 2008
    Posts:
    495
    Neat! I'm interested in how it'll work with a third-person melee game (it's worth noting that we're going to add specific melee weapon support in one of the next updates). It would be great if you could email me or post here some details/screens/webplayers of it (I want to start a gallery or something of projects using the package on the site).
     
  40. joel

    joel

    Joined:
    Jun 12, 2010
    Posts:
    117
    @Jason,

    i presume you'll have separate animations for each weapon right?
    I havent tested your script, but for thirdperson it should be pretty straightforward i think.
    but i'll be sure to make a small video once i've setup the system

    For you melee, will you just animate hands and add a collider to the hands?
     
  41. Jason_DB

    Jason_DB

    Joined:
    Nov 30, 2008
    Posts:
    495
    Yeah, every weapon animates separately. The main problem with melee is that in our script damage isn't done by a collider (at least within the script), but rather by a raycast or the collider of an instantiated projectile.
     
  42. King Gamer

    King Gamer

    Joined:
    Jun 22, 2010
    Posts:
    25
    Well, I was thinking that it would be posible to have meele by setting the max distance to the distance away the meele aanimation goes and having the fire at the end of the animation. It would work but would be a very simpe solution and not very realistic. I was also wondering about non weapons as things you can carry as a weapon. One such example would be a flag in capture the flag.
     
  43. Jason_DB

    Jason_DB

    Joined:
    Nov 30, 2008
    Posts:
    495
    Yeah, you could use the raycast as a melee attack but you would need to program in the delay. As far as carrying non-weapon items there isn't much reason to use the weapon scripts for them (unless you want to be able to switch to them). It actually sounds like your game wouldn't benefit all that much from the package, since you would be deactivating nearly all of the features.
     
  44. King Gamer

    King Gamer

    Joined:
    Jun 22, 2010
    Posts:
    25
    Well, Actually my game is actually soley based on this and a few other scripts as of now. The only thing is that I like game modes like capture the flag and others whitch feature non weapon items. Well, Actually if I do add capture the flag to my game it will be a weapon but thats another story.
    P.S. Any idea of a timeframe for the next release.
     
  45. Jason_DB

    Jason_DB

    Joined:
    Nov 30, 2008
    Posts:
    495
    @King Gamer

    Soon, we just need to decide between putting out a small update sooner or a larger one somewhat later.
     
  46. joel

    joel

    Joined:
    Jun 12, 2010
    Posts:
    117
    +1 for sooner ;)
     
  47. Tomme

    Tomme

    Joined:
    Jun 17, 2010
    Posts:
    66
    Loving the kit, thanks a lot of releasing this.

    Would like to share a bug I have found, not sure if its been reported or fixed already.

    When you crouch the "Player"'s box collider shrinks and when you "un-crouch" it returns back to default. However if you are crouched then press the sprint key getting you out of crouch, it will return the collider back to default size but move it upwards the size it shrunk by, [+0.65 on Y axis], moving the box collider away from the character controller.

    It was just a little missing number.

    On line 167 of FPSWalker DB, function "sprinting":
    this.GetComponent(BoxCollider).center += Vector3(0,crouchDeltaHeight, 0);

    should be:
    this.GetComponent(BoxCollider).center += Vector3(0,crouchDeltaHeight/2, 0);

    Thanks again for this amazing kit :D
     
  48. Jason_DB

    Jason_DB

    Joined:
    Nov 30, 2008
    Posts:
    495
    @Tomme thanks for pointing that out, just fixed it for the next update.
     
  49. Boyzone

    Boyzone

    Joined:
    Jun 30, 2010
    Posts:
    1
    I like long arm weapon, but I also love knife. Especially if the enemies are very near.
     
  50. Deleted User

    Deleted User

    Guest

    Just wanted to ask, do you show how to add new guns anywhere in the tutorial?
    or do we have to, as I like to say - "Hardcode" them? :D As in look how other weapons are added and try to add/edit them with our own models?

    Thanks