I am sorry if this has been posted before, but after literally almost 2 hours of searching on the forums I couldn't find what I needed. Maybe I am using the wrong keywords. Well I was wondering if there was anyway to have one icon be able to have like part of it "density = 0" and the other part "density = 1" For example:
Ignore the orange part on the right that somehow got in my cropping.
Ok so the right the gray part is a sidewall. But that isnt an icon thats included with the grass. It's "over" the grass as I am going to call it. But if I make the sidewall icon a completely dense icon the whole tile would be unable to go through. And that is what I am trying to solve. So for the sidewall icon I am trying to figure out if the left side thats empty can be made non-dense and the wall itself to be dense.
The only other way I can think of doing this is making the sidewall a whole icon. But I'd perfer not to for graphic issues.
Any help would be appreciated.
ID:270638
Jul 12 2006, 12:00 pm
|
|
In response to Flame48
|
|
But doesn't pixel_x and pixel_y essentially move the whole tile left or right; up or down?
|
In response to Sanosake Sagara
|
|
No. In that Entered() proc, mob/M was passed as an argument, M being the mob that just Entered() the turf. See?
Though, he didn't check IF it WAS a mob, so if an obj or anything would enter it, it'd runtime. But pixel_x would be quite buggy there. Or so I'd see it. And as that fence thing there is only a few pixels thick, I'd say; client That's an example. If the client will go north, but there's a fence on the same tile of him, yet the tile is drawn to be standing north (northernfence in the code), it won't move, yet he will face the tile thanks to usr.dir=NORTH. If anyone got a better approach, I'd be glad to hear it. I'm not actually pleased with my own :x |
In response to Mysame
|
|
What you could do, is to make four lists(Let's say 'northdense','westdense','eastdense' and 'southdense'), and put all the objs that have a density on one specific side in the correct list.
And then, overide client/North(), client/South(), etc, and use a modified version of Mysame's code to loop through all the objs in that loc, and see whether it is in the correct list. And tadaaa! O-matic |
Directional density...
atom Then just make an object's dir_density variable contain the bit flags for the directions you want to block movement from. (edit) Something else just hit me. You'll also probably want to check for directional density in the Exit function as well, or you'll still be able to walk over your wall in the other direction. (/edit) obj/wall |
something like...