Motivation
As a Roblox developer, it is currently too hard to create NPCs that ignore specific doors or areas where they should not go. I have tried using Key Costs in the agentParameters, but it does not achieve the desired effect. I want one or more NPCs to completely ignore certain PathfindingModifiers
so that they do not move to those areas. I have also attempted workarounds, such as blocking the door with parts that become non-collidable upon opening, but these solutions do not work as intended.
Development Improvement
If this issue is addressed, it would improve my development experience because it would allow for more nuanced and dynamic NPC behaviors in my game. This would enable me to create more complex and engaging gameplay mechanics without resorting to convoluted workarounds or compromises.
Use Cases
-
Diverse NPC Pathfinding: In my game, I have NPC A and NPC B. NPC A needs to pass through certain doors marked with a
PathfindingModifier
, while NPC B should ignore these modifiers and find alternate routes. This creates strategic gameplay where different NPCs have unique movement patterns. -
Customizable NPC Behaviors: Allowing specific NPCs to ignore certain
PathfindingModifiers
would enable developers to easily customize NPC behaviors. For instance, some NPCs might be able to traverse hazardous areas that others avoid, enhancing the gameplay experience. -
Performance and Efficiency: Instead of implementing complex scripts to manually handle pathfinding for different NPCs, having built-in support for ignoring
PathfindingModifiers
would streamline the development process and improve game performance by utilizing the pathfinding system already provided by Roblox.
Proposed Solution (Optional Note)
One possible implementation could involve extending the agentParameters
table to include a field for ignoring specific PathfindingModifiers
. For example:
local agentParameters = {
IgnoredModifiers = {
Door1 = true,
}
}
In this case, NPC B would have agentParameters
set to ignore the PathfindingModifier
labeled Door1
, while NPC A would adhere to it.