ID:888241
 
(See the best response by King_LiOnZ.)
Problem description:
How do I move an object a set number of pixels?

How do I set an object to pixel-based coordinates?
Learn about Forum_account's libraries. Pixel Movement of Sidescroller, depending on your area of interest.
In response to Kaiochao (#1)
I'm using built-in pixel movement. I don't want to use his libs.
Look up pixel_x, pixel_y on the reference. Or you know, use a library and save yourself the headache.
In response to Toadfish (#3)
pixel_x and pixel_y are visual offsets
Best response
Albro takes full credit for this NOT ME. Cloud Magic banned him from posting so he asked me to post on his behalf. HE TAKES FULL CREDIT

ALBRO1 SAYS:

You can move an object a certain number of pixels by modifying it's
step_x and step_y.
Doing this probably won't check to see if the movement is valid, however. You can use
Move(loc, dir, step_x, step_y)
to change their pixel location and check if the move is valid before doing so. Therefore:
var/turf/t = locate(5,5,1)
src.Move(t, SOUTH, 3, 15)
That will move them to t, set their direction to SOUTH, and move them 3 pixels to the right and 15 pixels up from that turf's lower left corner.
Movement in general is a visual offset combined with appropriate-looking collision detection. Also, Forum_account's libraries use use built-in pixel movement and greatly improve on them. It'll definitely save yourself a lot of trouble using an established set of tools designed to help you out, instead of trying to piece together a decent-looking system from scratch.
In response to Kaiochao (#6)
Trouble is my middle name!

Nah but really... most of forum_account's libraries have many features in them that I wouldn't use. It bothers me to have phantom code sitting there taking up space.

My pet peeve about those libs is that he chose to place Isometric and 2D pixel movement together in one library. While I could mod them...it wouldn't be worth my time, I'd rather live and learn.
I don't really understand what taking up space means, you have infinite space, it's all virtual. If you mean say, taking up possible variable names or proc names, well you wouldn't want to use variable names or proc names that are claimed by a popular library anyway.
In response to Cloud Magic (#7)
The cool thing about preprocessors like #define and #if is that, if you're using TWO_DIMENSIONAL mode, none of the 3D code is actually read by the compiler. It's literally skipped over.

Also, it's better to have something you don't need now than not have it when you do. Could you explain more about the things the library provides that you don't need?
Well, when I changed all of my bound_width and bound_height to pwidth and pheight, and included his library, my screen is black upon login. If I modify my set_pos and actually get it to run without dreamseeker crashing, my movement is all buggy and crazy.
My pet peeve about those libs is that he chose to place Isometric and 2D pixel movement together in one library.

That's because there's no difference between isometric movement and 2D movement. Isometric is just how the objects are displayed on the screen. The map is still a 2D grid of turfs and you can move in the x and y directions.

There are only three lines of code in the library that are specific to isometric maps and they're only there because of how icon sizes are handled in isometric mode.