This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Oct 30th, 2012  |  syntax: JavaScript  |  size: 0.32 KB  |  views: 99  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. /*
  2.         Howdy guys, so I've come across this scenario a few times before where I need to determine a force based on distance, how do I go about finding the value for magicMultiplier?
  3. */
  4.  
  5. if (dis == 10)
  6. {
  7.         shootForce = 5000;
  8. }
  9. if (dis == 100)
  10. {
  11.         shootForce = 16000;
  12. }
  13.  
  14. //My goal:
  15. shootForce = dis * magicMultiplier;
clone this paste RAW Paste Data