I would like to know how to make a place densense so you cannot walk from the space threw the densense line such as
oooooooo
xxxxxxxo
xoooooxo
xoooooxo
xxxxxxxo
oooooooo
the o's are turf and the x's are walls what if I wanted people to stand on top of the x's but not beable to move from the x to the o if the wall is in the way?
ID:167764
![]() Feb 1 2006, 1:33 am
|
|
![]() Feb 1 2006, 5:10 am
|
|
Zmadpeter wrote:
> turf Um.... I wouldn't post such a stupid question as how to add density in the forums I'm asking how to make the line between the X's and the O's densense so I can stand on either but not walk between |
It's "dense", not "densense".
As you've probably guessed, you can't do this with normal density. One solution is to override Enter(): turf/O/Enter(atom/movable/A) There are two problems with the above code: 1. I copied and pasted the code for each turf, which is a bad thing because it generates redundant code, which increases the size of your game and makes it harder to maintain. I'll leave it up to you as an exercise to remove that redundancy. 2. Pathfinding algorithms (such as hub://Deadron.Pathfinding) may not always work correctly in certain subtle circumstances. If you're not using any pathfinding in your game, don't worry about this. |