A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Discussion in 'Assets and Asset Store' started by Jason_DB, Mar 29, 2010.
Ohh. haha I meant the amount of sway, not sway rate
Hey. Cuuld you make it so you can carry 2 wepons instead of one?
You can carry up to 10 (i think) weapons if you want.
In my game I use 2.
Watch the video tutos.
Yep, it is 10, the array "weapons" in playerWeapons can be changed to have a length from 1 to 10 in the inspector.
may be he means weapons in two hands? like two pistols by "macedonian" style
i think for this he needs only additional animations
Only needs a model with 2 weapons at the same time and with custom animations.
Oh. How could I miss that?
*Smacks self repeatedly on the head with a giant hammer
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.
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).
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.
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.
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.
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. 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?
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.
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.
It's right mouse button.
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?
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).
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?
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.
Also, i want to donate to this but i dont have a lot of money right now.
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)
Holy goodness thanks a billion! I finally got it to work! I now officially love this FPS package, thanks a ton again and I'll be sure to donate once I get my paycheck. xD
I'm glad its working! If you have any more questions you can email me at email@example.com and i'll be happy to help.
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
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.
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
Here is a screenshot
Looks neat, although it's a little hard to make out with the level of light.
Can we use it for commercial projects?
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.
Nice work. I like it. I am willing to donate. What's your solution for a network game? Are your system usable?
Well the system is limited to weapons, so there shouldn't be anything preventing you from using it in a network game.
That's true ... o.k. If you think in network views, then the whole world changes ....
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.
Could you add support for going prone?
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).
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 )
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.
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!
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).
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?
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.
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.
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.
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.
Soon, we just need to decide between putting out a small update sooner or a larger one somewhat later.
+1 for sooner
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);
this.GetComponent(BoxCollider).center += Vector3(0,crouchDeltaHeight/2, 0);
Thanks again for this amazing kit
@Tomme thanks for pointing that out, just fixed it for the next update.
I like long arm weapon, but I also love knife. Especially if the enemies are very near.
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? As in look how other weapons are added and try to add/edit them with our own models?