generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Figuring out accuracy

Previous Thread :: Next Thread 
62GB is not online. 62GB
Joined: 03 Oct 2011
Total Posts: 4157
29 Jan 2016 01:16 PM
I never was able to come up with anything like this before. The higher the value, which can go to a max of 100, the more accurate each shot is. How could I do this? This is what I usually use for setting velocity to a bullet.


bullet.Velocity = (player.Character.Humanoid.TargetPoint - bullet.Position).unit * POWER
Report Abuse
WolfgangVonPrinz is not online. WolfgangVonPrinz
Joined: 24 Oct 2013
Total Posts: 4656
29 Jan 2016 01:17 PM
Create a table of positions using a circle, and select one at random

The mountain chicken, my favourite frog.


Report Abuse
62GB is not online. 62GB
Joined: 03 Oct 2011
Total Posts: 4157
29 Jan 2016 01:18 PM
Thanks for the reply but I think there's a better way.
Report Abuse
ElectoStriking is not online. ElectoStriking
Joined: 10 May 2014
Total Posts: 1547
29 Jan 2016 01:18 PM
u could incorporate : math.Random(player.Accuracy.Value/1,2,player.Accuracy.Value) some how but that kind of logic
Report Abuse
62GB is not online. 62GB
Joined: 03 Oct 2011
Total Posts: 4157
29 Jan 2016 01:19 PM
Thanks Electo. I'll try something like this.
Report Abuse
62GB is not online. 62GB
Joined: 03 Oct 2011
Total Posts: 4157
29 Jan 2016 01:22 PM
Ugh I'm not good at math. 1/accuracy is good, but even at 50 accuracy it comes up as .02

100 is .01


Any algorithms for this?
Report Abuse
WolfgangVonPrinz is not online. WolfgangVonPrinz
Joined: 24 Oct 2013
Total Posts: 4656
29 Jan 2016 01:22 PM
Or, get two positions, and lerp between them (X and Y separately)

The mountain chicken, my favourite frog.


Report Abuse
WolfgangVonPrinz is not online. WolfgangVonPrinz
Joined: 24 Oct 2013
Total Posts: 4656
29 Jan 2016 01:24 PM
So if you had vector11 as right.Position:lerp(left.X, 0,0,0), and right.Position:lerp(left.X,0,0,0), then take it out and us it in your jazz

The mountain chicken, my favourite frog.


Report Abuse
62GB is not online. 62GB
Joined: 03 Oct 2011
Total Posts: 4157
29 Jan 2016 01:31 PM
Thanks.
Report Abuse
WolfgangVonPrinz is not online. WolfgangVonPrinz
Joined: 24 Oct 2013
Total Posts: 4656
29 Jan 2016 01:50 PM
Np


Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image