Problem creating local Multiplayer (Party-game). My characters don't shoot.

Diego Fabre

New member
With my team we are creating a local multiplayer game which is played with 2 to 4 players on the same PC.
We already created a movementType that works with a single static camera and it works perfect.
The problem is that when we make our players spawn, they work fine except that they can't shoot (run, jump, pick up items, move, aim, etc).
I think the problem is related to the player assigned to the character of the CameraController. because if I assign the player to it, it can shoot. What I would like to know is what relationship does that assignment have with the possibility of shooting?
 
Does each character have a look source? Without a look source the character won't know where to shoot. Since you are using a single camera setup you also likely need to create a new class that implements ILookSource for each character
 
Justin thanks for the reply. As you indicated I assigned the iLookSource to each character when they are spawn. I had to modify UltimateCharacterController so the lookSource can be assigned then I assign it to them when I spawn them on me game manager.
Now the 4 characters have the camera assigned in lookSource, but they still can't shoot. Is there anything else I should assign them?
 
There isn't anything else that you need to assign so I would start by placing a breakpoint within Use.CanStartAbility and seeing why the ability can't start.
 
At last I was able to solve it. Placing the interrupt I realized that Looksource was still not assigned, because Use initialized before it could assign the Looksource to CharacterLocomotion, I fixed it by placing these lines in CanStartAbility().

C#:
// A look source must exist.
            
            if (m_LookSource == null && m_CharacterLocomotion.LookSource == null) {
                return false;
            }
            else
            {
                OnAttachLookSource(m_CharacterLocomotion.LookSource);
            }

Thank you very much for the help it was driving me crazy haha.
 
Top