Incrementing Speed

hey guys, ive got to this point where i made a new function “increment Speed”. basically i just want to increment speed of the paper sprite character when the player taps it. not sure how to link the new function in the event graph.

i have this so far

but i cant connect an object to a component, plus when i test the game it, keeps displaying 2

It will only increment the speed when you click the box however at the same time you destroy the actor which renders this kinda useless…

The variable speed is only available to that single object and not any other instance of it.

The thing is, for me, i don’t know when the Destroy Node nullifies everything and when not. Because it is all done in the same Frame. I mean, the Prints work for him, but the Speed Value isn’t increased at all i guess. Shouldn’t it be 7 if he clicks it?.. Or wait, what is the Start Value of Speed? If it’s -3, than everything is ok :smiley:

not sure how to do this, basically just want the sprite to go faster gradually each time the player has clicked it or touched it so it becomes harder over time. ive tried doing it this way

and then in level blueprint, i cast to the fish to access the speed variable but it does nothing

the fish speed is set to -5 of the z axis

doesnt update at all

Okay ive transferred the speed update in my game mode. for getting the old location and updating it as a vector, stick this in the fish class?

You are setting a static location rather than updating the old one.

I can’t make Screenshots right now but basically you have to get the old location of your actor then add the movement as vector to it and set this as the new position.

I personally would do the speed update on the game mode BP.

Depending on how long the game was or how many actors you spawned so far set the new speed.

help @ZakParrish XD

Yes exactly. Just update the location each tick.

so basically i was over complicati

ng this. ive deleted the increment function but left only the speed and score variables within the Gamemode class, and casted them variables within my character class.