x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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!:)

Product Version: UE 4.12
Tags:
more ▼

asked Jul 05 '16 at 05:14 PM in Blueprint Scripting

avatar image

adriansnetlis
81 13 17 24

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

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.

Example Blueprint

example.jpg (258.0 kB)
more ▼

answered Jul 05 '16 at 11:05 PM

avatar image

fabianu
498 13 9 34

avatar image adriansnetlis Jul 07 '16 at 09:04 PM

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:)

avatar image fabianu Jul 07 '16 at 10:39 PM

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!

avatar image pprkgraphiks Nov 25 '16 at 08:08 AM

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

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

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

more ▼

answered Jul 05 '16 at 08:50 PM

avatar image

Mookaroni
594 21 9 35

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question