Hi,
As a bit of a learning process for myself I’m creating a very simple FPS.
My goal is to have one or two small rooms, with a couple of enemies with simple AI.
I’m more of an art guy than a programmer, so I’ve learnt a lot from fps tutorials and python scripts (such as a bunch of different mouselook scripts that are floating around the internet), but so far all the art is placeholder, whilst I work out how everything works.
Without further ado, I’ll post the .blendhttp://uploader.polorix.net//files/1448/version1.blend
and some screenies
(use the mouse to aim, the left mouse button to fire, and the right mouse button to aim using the scope.)
I have a few problems that I can’t see a fix for myself.
The first is that I’m having trouble getting the recoil animation to play properly.
Ideally what would happen is that it would start the animation from the beginning every time a bullet is fired, however just now it plays through the full 10 frames before starting again.
If I could have it restart locally,e.g, the animation plays to frame 4, i fire another bullet, the animation starts from the position it was left in at frame 4, and plays again until I fire another bullet.
This would mean that the recoil would be additive, meaning that the more bullets you fired, the higher you would be aiming.
There is also a problem with the bullet velocity.
Right now the bullets use linV to push them forward, however they are quite slow, as when I use high values (pecuilarly, anything over 279) they cease to affect the targets.
Also, if I only fire 1 bullet, it does not affect the targets, they only move when I fire a burst of two or more, and I do not know why this is.
I think these problems are related, and I get the feeling I shouldn’t be using linV for this.
Thanks for looking.