so two execution lines come in, one goes out, and depending from which one it came it’ll set a different boolean value.
I suppose I could set a boolean variable to true after one and false after the other, but I don’t really need to have a local variable for that since it’ll only be sending the value to another BP and it’ll be used in a branch there.
(edited title and screenshot as it was causing confusion)
While it is probably true that you can’t make a function with two execution inputs, you can make that macro globally available by creating a ‘Blueprint Macro Library’. It’s in the Content Browser right-click menu under ‘Blueprints’.
I realize that, but a macro library needs to inherit from some class, and the macros will only be available to that class, so not really global like functions (at least as far as I know…?)
What if either of the events are called twice in a row? Then your function is “bugged”. This is a very bad way of making custom events making the caller able to break your logic.
Make two separate flows where one always create Load Menu and the other always create a Save Menu.
If you insist on mixing these two Custom Events then set a bool at the Beginning of the Events and use that throughout but then DO NOT use any latent functions or this will also break.
Can’t it be set to inherit from Object? then it would be global to everything. You should look at the library that has the for-loop and for-each macros in them.
Sorry I can’t help with the error. Again I’d suggest looking at for-loop and for-each since it doesn’t seem like you’re doing anything particularly different than what they are doing.
GarnerP57 makes a good point about this setup and the dangers when interacting with latent function though.
If one of the event executed twice, the widget will also created twice or called the load event then call the save event (without closing the previous widget) could also created the widget twice with save and load setup.
Btw, I thought you wanna connect load and save to a exec pin of flipflop and call save or load based on A bool condition, I didn’t see your second post of the macro.