ID:118052
 
Redundant
Applies to:DM Language
Status: Redundant

This feature has already been implemented, or is already achievable with existing methods.
I'm looking for a way to move a certain direction but keep my current dir state. Back in the day, I could use move and get_step() for that, and it would work fine. With pixel movement, Move seems to only move entire tiles and get_step is still tile based.

If there could be some kind of new get_step type proc that returns the pixel location of what is a step size in the specified direction that would be nice.

This would solve the issue I'm having with negative values for step.

perhaps instead of a dir, you could use integers: get_step(src,5,10).

This would make Move() much more useful for pixel movement.
If you know the direction you want to move in, there is a workaround:

// d is the intended move dir
var/sx = step_x
var/sy = step_y
if(d & EAST) sx += step_size
else if(d & WEST) sx -= step_size
if(d & NORTH) sy += step_size
else if(d & SOUTH) sy -= step_size
Move(loc,dir,sx,sy)
Move(loc,dir,sx,sy)

This gets buggy when you can't get the correct loc that you're moving into.

I'm not having trouble with moving, the problem is that without the proper loc for the argument, Move behave erratically when given pixel steps.

exmaple:
Move(loc,NORTH,0,5)

This should move you five pixels north every time it's called, but instead it moves you once and then the other movement commands become glitchy.

The problem is not being able to find the correct loc for the argument in Move() which this feature would provide.
You're calling Move() incorrectly. The step_x/y arguments are the target values, not offsets from the current value. That should be step_x,step_y+5, not 0,5.
Lummox JR wrote:
You're calling Move() incorrectly. The step_x/y arguments are the target values, not offsets from the current value. That should be step_x,step_y+5, not 0,5.

Changed it, it calls continuously now, however bumping into walls causes you to shoot backward an entire tile and then it allows you to move up to the dense object without stuttering back.

Regardless, nothing of this is mentioned in the help topics, on top of that, it seems like the built in movement is still buggy when bumping objects. Perhaps if there was some way to get the correct turf so that it doesn't have to reset you into the new one when moving.
If you're seeing a problem with the bumping please post a bug report with a demo. I haven't observed any case like that.
Ter13 resolved issue (Redundant)