Posted By
|
Message
|
WillWill Give me stuff
Registered 24/07/2006
Points 552
|
24th March, 2007 at 12:06:08 -
I'm using a plain and simple X + Sin(Angle) formula (along with Y using Cos), and after some time testing stuff when the object is moving in a weird way (only right/left/up/down and not diagonal), I discover that the INI Object does not take decimals in the value-saving.. >_>
Is there any way to make it allow decimals? I don't wanna start converting values to strings if I don't have to, as I have quite alot of coding that'd need to be modified if that is the case.
Thanks in advance! <3
http://www.morphboy.newgrounds.com/
^ Free tunes, as long as you contact me.
|
axel Crazy?
Registered 05/02/2005
Points 4766
|
24th March, 2007 at 13:12:45 -
Just use normal integers, but multiply it with 100. Then, when you position the object, you divide it with 100 again. That's one way to do it.
What exactly are you loading from the INI file? The object's speed?
n/a
|
Peblo Custom ratings must be 50 characters or less
Registered 05/07/2002
Points 185
|
24th March, 2007 at 14:33:16 -
Numbers probably.
"Isn't it always amazing how we characterize a person's intelligence by how closely their thinking matches ours?"
~Belgarath
|
Hernan
Registered 04/03/2003
Points 707
|
24th March, 2007 at 15:05:26 -
If converting to a string is not an option, I don't see how multiplying and dividing would be a better solution. If it's solely the INI objects fault...Well then yeah, you're pretty much screwed In that case just convert to strings.
This space is for rent
|
X_Sheep I had a custom rating before it was cool
Registered 01/03/2004
Points 1313
|
24th March, 2007 at 15:15:15 -
You only have to convert stuff to strings when you save it into the INI file. (as Str$(value))
a/n
|
WillWill Give me stuff
Registered 24/07/2006
Points 552
|
24th March, 2007 at 16:26:52 -
I'll go with multiplying by 100.. Now my code's screwed up somewhere because I haven't converted it properly everywhere (I saved 100 and 0.01 in two global values so I can attain them easily). By the way I'm saving a bunch of stuff like X and Y positions including angles and destination points. I got alot more tho.
http://www.morphboy.newgrounds.com/
^ Free tunes, as long as you contact me.
|
|
|