PlaySoundOnActor does not work

I was wondering if PlaySoundOnActor is still in use in 4.12.Because the compiler keeps saying AActor does not have this member.

I’m not sure how to answer your question (as I’m just starting out with C++ in UE4) but this might help: How to PlaySoundOnActor in 4.10? - Audio - Epic Developer Community Forums

Thank you very much! It does help.

I tried this one and it works fine

#include “Kismet/GameplayStatics.h”

UGameplayStatics::PlaySoundAtLocation(this, MySound, GetActorLocation());

I hope it helps

@youssefmyh I sure hope it helps the guy who made the post in 2016, and was last seen online in 2019.