ID:2710005
 
(See the best response by Inutaishos.)
Code:
obj
bordinha
icon = 'turfs2.dmi'
icon_state = "borda"
pixel_y = -12
density = 1



i cant do an edge. im trying to use pixel_x but when i set it the problem just change the side





is it possible for the player to walk on the blue gaps in the black square?

it is a 64x64 icon player and 32x32 turf
the player settings is like that
    mob
icon_state = "knight"
pixel_x = -16
pixel_y = -8
So the thing you need here is to be giving your mobs (and objs) bounding boxes via the bound_x/y/width/height vars.

pixel_x/y offsets won't help you here because they're only visual. The built-in pixel movement uses step_x/y and the bound vars.
In response to Lummox JR
Lummox JR wrote:
So the thing you need here is to be giving your mobs (and objs) bounding boxes via the bound_x/y/width/height vars.

pixel_x/y offsets won't help you here because they're only visual. The built-in pixel movement uses step_x/y and the bound vars.


obj
bordinha
icon = 'turfs2.dmi'
icon_state = "borda"
density = 1
bound_y = -12


like that the block area just changes the side

when i use pheight my player can go through the rocks and get stuck in the middle of them. This happens even when i set pwidth and pheight

Best response
A caixa roxa na print é o que seria definido pelo bound_width/bound_height
tipo 32 e 5 (exemplo)
ai voce define a posiçao fisica dessa caixa no jogo com step_x/step_y;

pixel_x/pixel_y é a posiçao visual de cada bordinha

o bound_x/y servem pra definir onde essa caixa "começa" em cada item;

usa o F1 pra ver as referencias dessas variaveis, e usa google translator se precisar, ajuda mt;


PS: noticed a language barrier, thought this could help
obj
bordinha
icon = 'turfs2.dmi'
icon_state = "borda"
density = 1
bound_height = 8
bound_y = 12
I was thinking about this
atom
movable
New()
..()
bound_width = pwidth
bound_height = pheight

pixel_x -= bound_x
pixel_y -= bound_y

bound_x = 0
bound_y = 0

px += step_x
py += step_y


so i just changed the icon to the bottom and subtract the difference between the gap and the real icon size



i did it

obj
bordinha
icon = 'turfs2.dmi'
icon_state = "borda"
density = 1
pwidth = 32
pheight = 8


the real icon size = x

height collision box = x - gap

height colission box = 32 - 25 = 8

bound_height = pheight = 8

was a math problem, ty guys :)

when i set the icon in the middle i forgot to put the height of the collision box in the code so it did not subtract from anywhere and it didn't work