280801-
I implemented this using the button to be pressed.

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

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?
danielf94
(danielf94)
2
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->
}