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"

changing variable amounts

I was wondering how variables worked when they change. I want to set a variable to be (ex.) 10 less than before, how does that work and then how would I set it to an exact number (ex.) exactly 10. also I was wondering how to change a variable (ex) down by ten every second something is happening. Any input will be greatly appreciated.

Product Version: UE 4.9
more ▼

asked Oct 10 '15 at 07:14 PM in Blueprint Scripting

avatar image

6 1

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

2 answers: sort voted first

You just need to set value as like the nodes you can see.

To make variable decrease every second, you need to use tick event which will use a Delay node to stop execution for 1 second. This tick event will only work when the "Persecond" variable is true. This persecond variable you need to set to true when the event is fired which will decrease variable value by 10 every second.

alt text

var.png (132.1 kB)
more ▼

answered Oct 10 '15 at 08:28 PM

avatar image

821 22 75 61

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

Just like you would in any other object oriented programming language.

Via getters and setters. When you need to get the value of a variable you "get" it and if you need to modify it you "set" it.

In blueprint you simply click on a variable, drag it onto your graph which will open a small selection between set and get and will then provide you with the node you need.

You might want to check out the quickstart guide by epic for blueprints which will show you how to use the basic features you're used to from other languages.

Here's a link:



more ▼

answered Oct 10 '15 at 08:18 PM

avatar image

6k 291 86 293

(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