So I have a working score system but to combat cheating in my game I want to make it so that the player only scores points when they’re moving. I thought I could do this the same way I let the score system know my player is dead, with a custom event that sets “Is Moving” to true when player input keys are pressed. However unreal had other ideas, maybe I’m just doing something wrong. Not too sure.
Hi, thanks for the reply. Event tick is in use on my Score blueprint, should I run the event tick through the Set Is Moving, back to the branch? If not what Event do you suggest I use? Also how do I give my Set Is Moving a target? I didn’t know that was possible.
I was imagining that you would add the nodes above to your player blueprint graph and set IsMoving on its PlayerScore reference. Do you think that will work?
The image above (score2.png) looks like the graph belonging to your player blueprint, is that right?
It already contains a PlayerScore variable that it was using to execute the IsMovingEvent. You could instead use it to set the value of IsMoving directly during the Tick event (you might have to add the Event Tick node to the graph).
Drag a pin from the PlayerScore node, drop it on an empty part of the graph, search for “Set IsMoving” and select it. That should should give you the set node already hooked up to the PlayerScore variable.
If you already have some functionality connected to the tick event, insert a sequence node to keep things separated.
Can you verify that the Vector Length of the player’s velocity ever goes above zero while moving? Also double check that the PlayerScore variable reference is being set to the actor instance that exists in the level.
How would I check that? That variable was made by making a variable then searching in the variable type for Player_Score which is the only thing named that in the project and when I hover over “Player Score” It comes up with “Player_Score” So I’m pretty sure it’s referencing the right thing.