Can som1 tell me y my reticle doesnt have velocity on the first press once its reached the edge?
Posted: August 3rd, 2019, 1:32 am
Here's the code for the borders and the pixels.
As it stands, you reach the edge and then you have to press the arrow key twice, once to get it to move a space then a second time to get it to move with velocity. No clue why it's doing this. Also, why does the + -17 work in B top border?
As it stands, you reach the edge and then you have to press the arrow key twice, once to get it to move a space then a second time to get it to move with velocity. No clue why it's doing this. Also, why does the + -17 work in B top border?
Code: Select all
//B right border
if (bx + 35 >= gfx.ScreenWidth)
{
bx = gfx.ScreenWidth - 37;
}
//B left border
if (bx + 33 <= 1)
{
bx = 0 + -30;
}
//B top border
if (by + 19 <= 1)
{
by = 0 + -17;
}
//B bottom border
if (by + 23 >= gfx.ScreenHeight)
{
by = gfx.ScreenHeight - 24;
}
//Boat gfx
//Upper
gfx.PutPixel(30 + bx, 20 + by, 0, 255, 0);
gfx.PutPixel(31 + bx, 20 + by, 0, 255, 0);
gfx.PutPixel(32 + bx, 20 + by, 0, 255, 0);
gfx.PutPixel(33 + bx, 20 + by, 0, 255, 0);
gfx.PutPixel(34 + bx, 20 + by, 0, 255, 0);
gfx.PutPixel(35 + bx, 20 + by, 0, 255, 0);
//Lower
gfx.PutPixel(31 + bx, 21 + by, 0, 255, 0);
gfx.PutPixel(32 + bx, 21 + by, 0, 255, 0);
gfx.PutPixel(33 + bx, 21 + by, 0, 255, 0);
gfx.PutPixel(34 + bx, 21 + by, 0, 255, 0);