Is it possible to make a function that I can use in any other blueprint?
I’m building a small game with about 40 levels. The levels themselves are simple, but each has identical code in the level BP for certain things. Every time I want to change something or realize I did something wrong I need to go through all 40 levels and copy and the same code to each.
I just need 1 function or code that will update in every level when changed.
Thanks in advance.
If you want to use the exact same function in multiple blueprints you can use a Blueprint Library. Right-click in your content browser and select Blueprints > Blueprint Function Library. Name it something intuitive - you usually want to group similarly-behaviored methods in a single library. In here you can start creating functions to use in every single blueprint event graph.
Note that if your function relies on some variables in your 40 blueprints you can create inputs and pass those values in to be handled.
Seems to be exactly what I need, working it in now. Thank you very much for the quick reply.
Just need to figure out how to set a timer at the end before it loads the start level. fTimer + delta seconds = fTimer doesn’t seem to work, and there’s no delay in there.
Got that working with a return node.