ID:1448672
 
(See the best response by Nadrew.)

Bare With Me.(Not Grammar Professional)


My Problem Lies Here.

Most Of My Turfs Are 32x32 (I Even Split The Big Boys This Way)

But Sadly I Got Some That Are 28x11 Etc

My Base Is 33x36.


I Under Stand A Little About Pixel Movemento

Like Step_size Step_x Step_y the little boys.

Problem 1.

1 Of My 28x21 Turfs Is A Half Rock. How Can I Make It So The User Can Walk Into The 32x32 Grass Section That The Rock Lies Onto.


Note: The Rock Is Dens. But Min He/She Hits The Rock Stops. (Like Only Walk Half Way.).



Problem 2.

What Kind Of Bounding Box's If Any Should I Be Making.

Being That I'm Using Offset Bases From Turfs. And How Would I Go About All This.


Turfs themselves cannot have bounding boxes of a different size than world.icon_size, so for your rock you should be making the rock itself an object and then place that object wherever you need it, creating a bounding box around the rock and making the rock dense would do exactly what you're after.

As for the second question, you should be making bounding boxes that encompass whatever you're trying to check collisions on, they'll be boxes of course, not other shapes so you have to account for that and don't expect things to be 100% perfect.
 obj
Halfrock
icon_state="Halfrock"
icon='Main Turfs 1.dmi'
density=1
bound_width=28
bound_height=11

i may not have this right trying to learn this bounding
but the rock didn't become dens.




Edit: Everything Below the rock did(that the rock lays on.
Best response
Is the rock at the bottom-left corner of the icon? If not you'll need to set bound_x and bound_y as well. If so you may need to alter mob.step_size to be something not equal to world.icon_size.

If you've already done that, try removing the density = 1 part and adding this override to the rock's Cross() proc:

obj/
Halfrock
// .. Your stuff minus density = 1
Cross(atom/A)
return 0 // Disallow overlap of this object.


I'm not 100% on how density is handled with pixel movement, but I do know this is how I've done overlap prevention myself in the past.
Thank You Very Much Nadrew

obj
Halfrock
icon_state="Halfrock"
icon='Main Turfs 1.dmi'
density=1
bound_x=0
bound_y=25
bound_width=20
bound_height=7
Cross(atom/A)
return 0


Did It And I Voted Your Responds