Variable from last frame

Hey there!
I’ve got a little lack of experience problem here. I have a variable that I create in script(blueprints). What I need is to find out what was this variable last frame. Is it possible to somehow store it and access it next time, than again replace with new variable?
Thanks!:slight_smile:

I believe what you’re looking for is the Tick event, which is an event that is called every frame.

This is a very simple example showing how to use a (float) variable which stores a value and uses is in the next frame.

The functions Do Something and Compute Variable (sry for the spelling error in the screenshot) are just dummy functions I created to show you the places where you have to put your data in the variable and where you can use it in the next frame.

I hope this helps you.

Thanks! This kind of works. It just took me time until I found the variables tab on the left:D I am totally, totally new to UE4, but I imediately went into making code with just a few tutorials. Should have taken a bit more to spare you time writing this answer. Thanks anyways:)

No problem. Please ask all the question you have! This platform is here to help the whole community. Every question asked and answered here can be read by any developer and it will create a huge knowledge base for all ue4 developer!

Hi, How can i save variable last frame? I can’t understand that Compute Variable function not showing blueprint

Hey it seems to not working