
Untitled
By: a guest on
Oct 30th, 2012 | syntax:
JavaScript | size: 0.32 KB | hits: 99 | expires: Never
/*
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?
*/
if (dis == 10)
{
shootForce = 5000;
}
if (dis == 100)
{
shootForce = 16000;
}
//My goal:
shootForce = dis * magicMultiplier;