Weapon inaccuracy

Topics regarding Scripting with Reality Factory
Post Reply
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

Weapon inaccuracy

Post by darksmaster923 »

how do u make guns less accurate, cuz the guns now have the accuracy of a laser beam
Herp derp.
User avatar
BLACK_PHOENIX
Posts: 126
Joined: Wed Sep 27, 2006 6:42 am

Post by BLACK_PHOENIX »

you could remove the crosshair to make it harder for the player to aim.
this might lower the accuracy. and i think the collision detection is based at using the bounding box and not the actual 3d model. so when you shoot the enemy the bullet will almost certainly hit the the bounding box of the enemy.

if only we could change the bounding box into the exact shape of the 3d model your using.
User avatar
scott
Posts: 1151
Joined: Tue Jul 05, 2005 1:59 am
Location: United Kingdom

Post by scott »

have the computer generate a random number, say something like 0.5 - 4 and make it move that many texals per second in a random direction, this would make the gun less stable and thus less acuracy
*GD*
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

Post by darksmaster923 »

scott, how do u do that
Herp derp.
User avatar
scott
Posts: 1151
Joined: Tue Jul 05, 2005 1:59 am
Location: United Kingdom

Post by scott »

im not sure exactly, just remembering some programming i done some time ago, and as i belive that the scripting must have a random function some where.

so link the random function to choose a number between what ever numbers are apropreate, then once got that number, use it to rotate the player in another random movment for that amount, and could do this every time you fire the gun.

im sorry im cant help you too much more, its 2am and i dont have much of a clue when scripting so this may not be possible but i should imagine it is.

i will try and have a look when i get up and then post again if someone hasnt helped you out by then.
*GD*
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Post by Juutis »

BLACK_PHOENIX wrote:if only we could change the bounding box into the exact shape of the 3d model your using.
Setting 'bonelevel = true' in the definition of a projectile makes the bullet collide with enemy actors, not their bounding boxes. This way the bullets can go between enemies' legs, under arms etc.

In my opinion, the absolutely best way to make weapons inaccurate is to script them. It's a lot of work to write the scripts but then it's easy to make the point, at which the projectile is shot, vary a bit.
Pain is only psychological.
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

Post by darksmaster923 »

could you make the bullet model anim to move around the bullet randomly???
Herp derp.
Post Reply