When making events in a blueprint interface, so long as an output is not created, the event will be displayed as an event when implemented in the graph.
If you set an output, it becomes a function.
Just for organizational purposes, I prefer to use functions rather than events unless I need latency action (delay, timer, etc).
What I do is add a boolean output:
just so that it is forced to be displayed as a function.
Does anybody know if it is possible to set the event to display as a function without having to add an output?
Is there any fundamental knowledge I’m missing to suggest this might be a bad practice at all?
It is just personal preference, but I don’t like tons of stuff in the event graph. I like to use functions over events when possible so that I can open one at a time and not have any other nodes to get distracted by.
Inside your InterfaceBlueprint you can tick Const and compile. If you double click the Interface “Event” inside the blueprint where you implemented it it will be a function. You can also deselect Const again inside your InterfaceBlueprint, compile and it will stay a function. Depends on what you want.
The Const flag indicates the the function is promising not to change the value of any variables. Is that right?
I did a some c++ courses in the past, but not sure I fully understand the implication of what const means.
Yes, const = not allowed to change any variable.
is that inherent to an interface function though? Does it also mean that the class which implements the function must not change any variable?
Everything inside this function is read only. So it is more like a Get function. Inside this function you can not e.g. use a SetVariable. What you do outside of this function works as always.