Hi
So, let’s say that in my player bp i have an event called “add +10 score” that does what its name says, and that i have an event called “death” on my enemy bp. How do i make it so that when the enemy dies, the “add +10 score” starts ? i think i have to use “cast to” nodes, but i don’t think i understand how to use them because that’s my blueprints and it doesn’t work (obviously)
You want a blue-ish colored node that is “Cast to PBP_Player” not “to PBP_Player Class”. Then you should be able to connect the cast output to your “Add 10” node.
The node you have there is to cast to the UClass which is the reflection/meta data about the class. Not the actual class.
On hit (how you dmg the player/bot) you pass instigator & owner. You can use these references on the server to apply dmg and then have the server update the playerstate score.
Typically you’d be using “Apply Damage”.
And it will be your “Servers” Authoritative Proxy doing all of this.
Note the Destroy should be called last. Also, start by dragging wires and then search, avoid placing orphaned nodes on their own in the graph if you can: