Blue Print Custom Node - Return more than one value

Anyone knows how to make this?

It would help if you provided a little more detail on what you’re trying to accomplish.

That said, perhaps what you are looking for is a blueprint callable function that has multiple output pins? This can be achieved using reference parameters, you can see an example of this in GameplayStatics.h with GetActorArrayBounds

UFUNCTION(BlueprintCallable, Category="Collision")
static void GetActorArrayBounds(const TArray<AActor*>& Actors, bool bOnlyCollidingComponents, FVector& Center, FVector& BoxExtent);

The generated blueprint node for this callable function will have inputs of an array of actors and a boolean and it has outputs of Center and BoxExtent

Yes is this. But, I need to INPUT FVector& Center, FVector& BoxExtent otherwise the function will not work right? I mean, in BluePrint Editor, i will need to have 2 variables for FVector& Center, FVector& BoxExtent and pass it as reference (for C++) or its optional?

Here, is the implementation that I want. Thanks Marc Audy

4194-capturar.jpg

DateTimeHelper.h

// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.

#pragma once

#include "EdGraph/EdGraphNode.h"
#include "EdGraph/EdGraphSchema.h"
#include "DateTimeHelper.generated.h"

/**
 * 
 */
UCLASS()
class UDateTimeHelper : public UEdGraphNode
{
	GENERATED_UCLASS_BODY()

	/**
	* Converts 360 degrees to time formated
	* @param Degrees			angle ranged from 0 to 360
	* @param Seconds			Seconds
	* @param Minutes			Minutes
	* @param Hours				Hours
	* @param Days				Days
	* @param TimeFormated		00:00:00
	* @param SecondsPerMinutes	How many seconds have a minute
	* @param MinutesPerHour		How many minutes have a hours
	* @param HoursPerDay		How many hours have a day
	*/
	UFUNCTION(BlueprintCallable, meta = (HidePin = "WorldContextObject", DefaultToSelf = "WorldContextObject", FriendlyName = "ConvertDegreesToDateTime"), Category = "Date & Time")
	static void ConvertDegreesToDateTime(float Degrees, int32& Seconds, int32& Minutes, int32& Hours, int32& Days, FString& TimeFormated, int32 SecondsPerMinutes = 60, int32 MinutesPerHour = 60, int32 HoursPerDay = 24);

	
};

DateTimeHelper.cpp

// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.

#include "Sky.h"
#include "DateTimeHelper.h"


UDateTimeHelper::UDateTimeHelper(const class FPostConstructInitializeProperties& PCIP)
	: Super(PCIP)
{

}

void UDateTimeHelper::ConvertDegreesToDateTime(float Degrees, int32& Seconds, int32& Minutes, int32& Hours, int32& Days, FString& TimeFormated, int32 SecondsPerMinutes, int32 MinutesPerHour, int32 HoursPerDay)
{
	float _hours = ((Degrees / 360) * HoursPerDay);
	float _minutes = 0;
	float _seconds = 0;

	TimeFormated.Empty();

	Hours = floor(_hours);
	_minutes = ((_hours - Hours) * MinutesPerHour);
	Minutes = floor(_minutes);
	_seconds = ((_minutes - Minutes) * SecondsPerMinutes);
	Seconds = floor(_seconds);

	if (Degrees >= 360) {
		Days = Days + 1;
	}

	TimeFormated += "Day: ";
	TimeFormated.AppendInt(Days);
	TimeFormated += " ";

	if (Hours <= 9) {
		TimeFormated.AppendChar('0');
		TimeFormated.AppendInt(Hours);
	}
	else {
		TimeFormated.AppendInt(Hours);
	}
	TimeFormated.AppendChar(':');


	if (Minutes <= 9) {
		TimeFormated.AppendChar('0');
		TimeFormated.AppendInt(Minutes);
	}
	else {
		TimeFormated.AppendInt(Minutes);
	}
	TimeFormated.AppendChar(':');

	if (Seconds <= 9) {
		TimeFormated.AppendChar('0');
		TimeFormated.AppendInt(Seconds);
	}
	else {
		TimeFormated.AppendInt(Seconds);
	}

}