220 and 220.0 is not the same
Hunnenkoenig
Member Posts: 1,173
I am trying to do here something, which is based on coordinates and I read and write them and I just experienced that 220 is not the same as 220.0
If the value is 220.0 (spawning point), my actor doesn't do, what it should. As soon as I do something with it and it returns to his original position and his value changes to 220, it does, what it should do.
EDIT:
It was just a "bug report" but I have found the "floor" function in the express editor :-)
Although, it doesn't do anything in my case....
EDIT2:
floor(220.0) is 219...
Hm...
If the value is 220.0 (spawning point), my actor doesn't do, what it should. As soon as I do something with it and it returns to his original position and his value changes to 220, it does, what it should do.
EDIT:
It was just a "bug report" but I have found the "floor" function in the express editor :-)
Although, it doesn't do anything in my case....
EDIT2:
floor(220.0) is 219...
Hm...
Comments
Is there something else you do to test that? I just do a Display Text of floor(220.0)
The thing is:
I have an icon 49x49
this icon spawns the same icon -65 relative to actor on the Y axis.
I needed this second actor's y coordinate and I used display text.
After spawning it, it told me 220.0
then I used change positionY to floor(self.positionY) and then I got 219.
I believe, that was, what I did.
I also messed around with the -65 and tried -65,5 and -64,5 and I think by one of them is then the 219 happened.
I managed to work around, but I will check again, if it is needed.
not sure if that is the problem here. Something to try though.
not totally sure though
@Hunn: if you have graphics that have an odd dimension, i.e 49x49, they will be blurry.
I would make them 50x50, or 48x48.
Because GS centers everything, that odd pixel will get split, and cause a blur.