floating point variables
Blitz3D Forums/Blitz3D Beginners Area/floating point variables
| ||
I'm trying to have a gravity velocity variable that decrements every loop when an entity is not colliding with something. How can I have a floating variable that decrements somewhere along the lines of -.2 per loop while not colliding, then have a translateentity called upon the entity?? Mainly, How do I make a variable, that stays a float? |
| ||
If its a Float, then it always a float. Even if it equals 0 |
| ||
I know, how do I make something a float? |
| ||
You allocate it to a Float |
| ||
...how :D using n = float n doesn't work for me... |
| ||
If what you are asking is "How can I make a variable that is now an int, into a float" Then the answer is you cannot. If you are asking is how do I make a float, then its Global n# = 0.0 If you are asking how do I give an int value to a float then its N#= 9 If you want n (say) to be a float, then it has to have always been a float |
| ||
hehe, it turns out I was forgetting the #, thanks! |