23.11.2013, 23:37
how big is the area you want to block NPCs from?
is it a 2d-plane or a 3d-room?
are there more areas planned to be added?
i had success at creating a 6000x6000 sized array of integers, each defining 1 square meter which defines IF a npc is allowed to walk on. setting these "forbidden"/"allowed" numbers are hard work - since the area(s) need to be precisely mapped (each mІ) - please provide us more about your intentions so we can help you elaborate a good solution.
my way is not even close to a good solution, since blocking one little area for npcs doesnt justify wasting 72MB.
you could simply add a loop in a timer, where each npc gets checked for being close to your desired location, but as soon you add either more locations and/or npcs, that loop will take more and more CPU time...
is it a 2d-plane or a 3d-room?
are there more areas planned to be added?
i had success at creating a 6000x6000 sized array of integers, each defining 1 square meter which defines IF a npc is allowed to walk on. setting these "forbidden"/"allowed" numbers are hard work - since the area(s) need to be precisely mapped (each mІ) - please provide us more about your intentions so we can help you elaborate a good solution.
my way is not even close to a good solution, since blocking one little area for npcs doesnt justify wasting 72MB.
you could simply add a loop in a timer, where each npc gets checked for being close to your desired location, but as soon you add either more locations and/or npcs, that loop will take more and more CPU time...

