Hello
I’ve been messing about with NPC movement for a bit, and I’m wondering if I can move a unit of NPC’s together like in a Total war game?
if it’s even possible that is lol, thanks in advance
You could have all the NPCs go to a certain location but offset for each NPC unless you want them all to stack on top of each other/cluster
I’m trying to keep them in a formation somewhat
When you tell them to go somewhere, offset the position by how many studs you want them apart and they will go to the position, but maybe a few studs to the left, or a few studs to the right
1 Like
I… don’t know how to do this I’m sorry
I’m not exactly sure how to either since I haven’t really learnt about 3D world placement etc etc but I can send you some links to posts that I think will help you:
So, I have a part (let’s call A) in the workspace. I’m try to move another part (lets call B) to A, but offsetting it by 5 units INFRONT of A.
To clarify: if A’s front is facing in the positive y direction, then part B needs to be placed 5 units above part A. If A’s front is towards the negative y direction, the part B needs to be placed 5 units below part A.
Getting the position of the part is easy, but I can’t figure out how to get a position based on the orientation of the part.
I am attempting to make a movement system for various units in a RTS game. I’ve figure out how to use the pathfinding service, so that shouldn’t be a problem, however when I make more than one unit move to a spot, they inevitably end up pushing the units that arrive there first.
So to solve that, I am trying to figure out how to get a number of points (equal to the current number of units selected) near where the mouse clicked, with a given number of studs separation between them all. For examp…
I was creating my game earlier when I ran into an issue. When calling my units to move to a location that they can’t immediately walk to and use path finding service, they all chose the absolute closest path. Is there any way that they can move as in unison to where they already are? Demonstration below shows (red) which I don’t want and (blue) which I do.
[Desktop Screenshot 2021.11.12 - 21.24.16.27]
You could try making a primary dummy. What I mean by this is that the primary dummy will follow the mouse, and then the other dummies will move to a CFrame relative to the main dummy. (ex. MainDummy.HumanoidRootPart.CFrame - CFrame.new(number, number, number)). Then just convert this to Vector3
1 Like
Thanks a bunch dude, seriously.
1 Like