if your function has some params, you’ll need to create a struct suit the params, and get values of params, then instead of ProcessEvent(Func), ProcessEvent(Func, &Params);
This seems like a good use of a switch statement, look at the example below:
switch(myInteger) {
case 1:
Function1();
break;
case 2:
Function2();
break;
default:
// If no case exists for myInteger
GEngine->AddOnScreenDebugMessage(-1,1.f, FColor::Blue, "switch failure");
}
Switch statements are more performant and preferred over an if/else statement, each case can include any amount of code you would like.