Right now I am using the same character blueprint for every player (which allowing different characters stems from this questions).
Its a simple shooting game, but I am unsure how to make each player get a point when they kill someone?
Right now I have a branch test that compares of the player id that dies and give a global team point to the other player. However right now it gives a point wether the player died from getting hit with a projectile, or walking over fire. How do I track who killed which player and how to give the point/score to the correct player? ::scratches head :: Right now my code is a mess because i am testing different solutions but I am sure i am missing something…
So far I have the score being tracked in the GameMode.
The apply damage is on the projectile.
The receive damage and The player score is kept on the character blueprint.
This is my first real attempt at anything Multiplayer, so my knowledge has solely been single player and never ran into multiple HUDs and replication stuff, so please be patient and kind with me.
Add a playercharacter variable to the thing that does damage, Bullet, Arrow, Beam…
When your player/weapon spawn something, set the variable to the player who created it.
When a bullet kill someone , check who is in the variable, and give point to him
awesome!!! this makes sense and really helps clarify the logic for me. i will pass the point to the game mode and save it on an individual variable for each player via an update event and then trigger an update on a variable in the player. Thanks!
I am stuck on getting the player ID from the damage causer or instigator output pins. Any idea? I got the scoring system up using a check for player id that gets sent to the custom event in the game mode base, but i cant seem to get the player id from the receive any damage
SO I just noticed that when I pass the player ID of the Instigator type I am getting the literal name of the player as being the “character name”
for example the character blueprint I am using is “Moto_Man” when link from instigator to the Player State-> Player Id I get back either “Moto_Man” “Moto_Man2” “Moto_Man3”… How Do I just get the player controller Id of “0” “1” “2” etc?
I now added each player controller to an array at spawn
I then got the display name from player state sending that to an update score section where I compare an array of players, which was previously created, comparing teh display name coming in with the display name of each array index. lets see if using this will help LOL