How to create a function with multiple return values?

There’s a couple of ways - seeing as you’re not using the method as a UFUNCTION, it’s proabably easiest to use a “pointer to pointer”:

int32 MyFunction(int32& outRet2, AActor** outActor) {
   outRet2=32;
   *outActor=MyActor;
   return 1;
}