|
Rez Gray
Registered User
Join date: 2 Apr 2007
Posts: 23
|
05-19-2008 09:58
'm working on a new combat system where I squish a few pet peeves I have about combat systems. Something I want to add is, i don't know the name for it, where the faster you fire bullets, the wider the spray, and the more off-target the bullets get.
What I'm trying to figure out, is what's the best way to do this?
Say, I have it set to single shot, and I'm rapping off shots like crazy, i want it to spread wider with each shot until they cool down and give it a little bit to reset. And if they're in automatic, it needs to slowly spread wider up to the sanity limit.
any ideas?
|
|
Ordinal Malaprop
really very ordinary
Join date: 9 Sep 2005
Posts: 4,607
|
05-19-2008 11:27
I tend to simulate inaccuracy with a random modification to the bullet's velocity vector. For that sort of thing, I would probably have an incrementing "inaccuracy" counter which increased with the number of bullets fired, to multiply this modification, by up to a certain limit, zeroed if the trigger was released and not pressed again for a certain time (so the check is actually on each trigger press, probably using llGetTime). I did this with my .45 Shansi for barrel climb, in fact, though these days I'm sure I would script it better.
In fact quite a few of my weapons have some level of built-in inaccuracy now I come to think of it. So dull if every shot just goes to the same point if one stays still.
_____________________
http://ordinalmalaprop.com/forum/ - visit Ordinal's Scripting Colloquium for scripting discussion with actual working BBCode!
http://ordinalmalaprop.com/engine/ - An Engine Fit For My Proceeding, my Aethernet Journal
http://www.flickr.com/groups/slgriefbuild/ - Second Life Griefbuild Digest, pictures of horrible ad griefing and land spam, and the naming of names
|