How to react in a blueprint using c++ BeginOverlap

280801-

I implemented this using the button to be pressed.

280802-button.png

When the button is pressed, it tries to make the blue print actor visible.

280803-coin.png

I want to show this.

280804-

So I tried to change the value in blueprint but I do not know how to change other values with BeginOverlap.

Or is there another way?

First you must get a reference from the actor, in this case it would be the button

use UFUNCTION OnOverlapBegin

.h

UFUNCTION()
void OnOverlapBegin(class UPrimitiveComponent* OverlappedComp, class AActor* OtherActor, class UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult);

add the function to your botton and “trigger” so you can pass the botton:

.cpp

ACoinButton::ACoinButton()
{
Button->OnComponentBeginOverlap.AddDynamic(this, &ACoinButton::OnOverlapBegin);
Button->SetCollisionProfileName(TEXT("Trigger"));
}

void ACoinButton::OnOverlapBegin(class UPrimitiveComponent* OverlappedComp, class AActor* OtherActor, class UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult)
{
	OverlappedComp->
}