Get player ID from character blueprint.
I have a Ball Blueprint which takes some parameters. One of them is the Player ID, that spawns the ball.
Here's my setup in the character blueprint:
This is my level blueprint:
The problem is, that when the server spawns the ball, when the event fires in the Level BP, it increments all "Points" variables of every player, including itself.
When the client spawns the ball and the the event fires in the Level BP, it increments all "Points" variables of all players, except the server.
Why is this happening? Doesn't the PlayerState hold dfferent Player IDs for each player? Or is it because I'm calling it from the Character BP?
I've been trying to solve this 2 days in a row... No luck. Any help is appreciated.
asked Jun 02 '16 at 04:05 PM in Blueprint Scripting
i got a way that is a little more redundant (client executes logic to himself, trigger the event on server (along with his playerId), server to replicate all, replicate all compares to playerId and excludes if the Id is the same as initiator) but using switch has authority basically so in theory, the problem isnt there (i assume you got your spawn ball working everywhere). so yes, you might be doing something wrong on the level blueprint, not because it is IN the level blueprint but the logic that triggers it. could you post a slightly bigger screenshot of it please?
answered Jun 02 '16 at 04:19 PM
This is unbelievable, this thread is ONY ONE place that says way to get id to use in getPlayerController|Character nodes, which is really often used ones while u.e. have at least 3 different ids which named “player’s”.
Follow this question
Once you sign in you will be able to subscribe for any updates here