UnrealScripterAI
Discord ↗
Link Copied to Clipboard
×
"make a gore script"
void AGore::OnHit(UPrimitiveComponent* HitComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, FVector NormalImpulse, const FHitResult& Hit) { // Spawn a gore effect UParticleSystem* GoreEffect = LoadObject<UParticleSystem>(NULL, TEXT("/Game/Particles/Gore.Gore")); UGameplayStatics::SpawnEmitterAtLocation(GetWorld(), GoreEffect, Hit.Location, FRotator::ZeroRotator); }