Pixel problem! (solved)
Imagine two sprites with similar scripts attached to them named e1.c and e2.c, both are exactly 50x50 pixels large.
I place these sprites exactly next to each other in the editor, x-coord.
I use buttonon and buttonoff on both of them, like a pressure plate thing. When Dink stands on top of one, the sprite's frame will change and when Dink leaves it, the frame changes to something else. It is just like the mouse pointer in the menu, but Dink is the pointer.
When Dink walks over the first sprite, e1, from the left, the frame changes. BUT if Dink positions himself riiiight on pixel 50 in x coord, e2 will call buttonon!
e1 won't buttonoff until Dink is on pixel 51 which makes sense. But why does the other dang e2 buttonon at pixel 50 when it is located one pixel away from e1?! Any ideas on why this is happening? It works if I nudge e2 to start at 51, but I don't want that gap.
I haven't tried to work around it yet as I ain't able to do it right now, but any other solutions are welcome.
I place these sprites exactly next to each other in the editor, x-coord.
I use buttonon and buttonoff on both of them, like a pressure plate thing. When Dink stands on top of one, the sprite's frame will change and when Dink leaves it, the frame changes to something else. It is just like the mouse pointer in the menu, but Dink is the pointer.
When Dink walks over the first sprite, e1, from the left, the frame changes. BUT if Dink positions himself riiiight on pixel 50 in x coord, e2 will call buttonon!
e1 won't buttonoff until Dink is on pixel 51 which makes sense. But why does the other dang e2 buttonon at pixel 50 when it is located one pixel away from e1?! Any ideas on why this is happening? It works if I nudge e2 to start at 51, but I don't want that gap.

I haven't tried to work around it yet as I ain't able to do it right now, but any other solutions are welcome.
What happens if Dink positions himself one pixel to the left of e1? Does it also go off?
Yes, if you put four of these 50x50 sprites in a square, he could stand to activate all of them at once.
Does the button brain use the hard box for collision? If so, you could modify that I think. That way the sprite doesn't have a gap but the collision does, and Dink will only be able to press one button at a time.
Yes. The button brain uses the sprite's hardbox, similar to how touch() works (and damage() for missiles, except that one has an added range() or distance() or whatever it was).
Yes, that's one solution, but it doesn't explain exactly why it happens. In any case, if you want to take thenewguy's advice (I would also fix it like that), you can modify the left x value of the hardbox in the .ini manually to make it just one pixel smaller on that side.
Yeah, I think I know what it is now. The hardbox of the detector sprite. I tinkered too much with the buttonon sprite and modified it's hardbox instead of the real culprit's hardbox.
That's gotta be it.
EDIT: Oh yes, it was! Thanks all.
That's gotta be it.
EDIT: Oh yes, it was! Thanks all.
