Get player index of who pressed key
I am trying to get the player index of who pressed a key for a local multiplayer game.
This event exists on an object, and when there is an overlap, it checks to see it is a player character, and if so, it gets the player index (player 1 or 2) and enables input for the object.
This second event also exists on the object to allow the player to actually do the interacting. However, i run into the problem of not being able to get the player index of who pressed the key, so get player character is always index 0. I would need the player index to I can cast to that specific player, and in the case of this event, have the player pick up the object.
Any help would be much appreciated!
asked Mar 03 '17 at 07:51 PM in Blueprint Scripting
I fixed the issue.
Just set up a variable in the overlapped actor called "OverlappingActor" that gets populated if a viable actor is overlapping.
answered Mar 08 '17 at 12:46 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here