Ive recently been prototyping a wave survival game and Ive been wondering how I would handle the Npcs pathfinding as a L4D horde type deal like a director script that handles them instead of a million scripts all in each enemy I want to make it optimized so the server/client doesnt lag but what would be the best way to go about this? Ive seen OOP and feel a system like that could help any advice would be appreciated! ^^
“Horde mentality”. You could control segments of them and then when the player gets near a segment/horde it switches the controls to controlling each model individually. TBH roblox is pretty optimized now you don’t really have to worry about pathfinding service lagging much
For this you can use CollectionService. This allows you to manage multiple objects with one script, so you don’t have to parent a million scripts into each every NPCs.
Y3llow Mustang has a great tutorial on what you’re looking for.
Roblox - Controlling Multiple AI with One Script (advanced) - Scripting Tutorial - YouTube
The video description has the entire finished system, so you could take a look at what he does. Hope this helps.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.