I don’t know why you got the impression that you needed to use pointers to get multiple outputs. Here are two examples:
UFUNCTION(BlueprintCallable, Category = Example)
void IntOutputTest(int32 InputValue, int32& OutputIntA, int32& OutputIntB);
UFUNCTION(BlueprintCallable, Category = Example)
void ActorOutputTest(AActor* InputValue, AActor*& OutActorA, AActor*& OutActorB);
And the source
void ASomeActorClass::IntOutputTest(int32 InputValue, int32& OutputIntA, int32& OutputIntB)
{
OutputIntA= InputValue;
OutputIntB = InputValue;
}
void ASomeActorClass::ActorOutputTest(AActor* InputValue, AActor*& OutActorA, AActor*& OutActorB)
{
OutActorA = InputValue;
OutActorB = InputValue;
}
That would create 2 blueprint callable functions that take a single input and copies it to 2 output variables. FWIW: Blueprint does support pointers to base types (int/float/etc). What you were probably seeing about pointers is that most of the time, people are looking to get actors returned which have to be pointers.
As for how you use it in C++ you use at like any other function.
int32 StorageA = 0;
int32 StorageB = 0;
IntOutputTest(24, StorageA, StorageB);
UE_LOG(MyLog, Log, TEXT("Should be [24 ] = %i, %i"), StorageA, StorageB);
Same goes for pointers to actors.