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