Event Processors
An Event Processor is a function that is assigned to an I/O event. This function is always triggered before an action (that's bound to this event) is executed.
These event processor functions are used when your event has parameters, and you want to expose them as Named Arguments for actions to use.
Usage Example
Let's say you have an event called OnPickup
. You can create a new function and assign it as the event processor of the OnPickup
event. Make sure that the parameter list of the function matches the delegate exactly. In my case this is a Blueprint event dispatcher with one variable for the pawn that picked up the item, so my event processor also has that one parameter.

Inside the event processor, simply use the SetNamedArgument
function to add a new named argument to the current execution context. Notice that the value of the argument is still in string form, so it must be in the format that is understood by the I/O system and Unreal. See Function Parameters section for more details.

void APickupActor::ProcessEvent_OnPickup(APawn* InstigatorPawn)
{
FActionExecutionContext& ExecContext = FActionExecutionContext::Get(this);
ExecContext.SetNamedArgument(TEXT("$Instigator"), InstigatorPawn->GetPathName());
}
Last updated