Unreal Engine 4.13 (and 4.12) broke my Grenade behaviour!

You mentioned you were testing in a multiplayer setting. Something you have to know is that when you call a replicated function, especially function calls from server to client like NetMulticast and Client, you must give the actor some time so that the function call arrives on the clients. If you call Destroy right away, the actor is destroyed server-side and any pending information to replicate, like the NetMulticast call, is ignored. Instead of calling Destroy(), remove the actor a bit later by calling SetLifeSpan(0.5f). Make sure to hide the grenade right away, so that it looks as if the grenade is directly removed on the server.

When I test the grenades, I do it on the Server Window.

If I tested them on the client, then okay: there could be a replication delay.
But since I test it on the server there’s no replication to wait for. It’s instantaneous.

I would try putting the delay in anyway to check…

I set a LifeSpan of 0.5sec but it didn’t work.
The result is always the same.

It’s very strange guys.

Still no idea of what’s going on.

The development is stuck!

// This line can’t be executed only on the server
OnActorBeginOverlap.AddDynamic(this, &AGrenade::ApplyFullDamage);

What is the purpose for this?

When the Grenade actor is overlapped, the function **ApplyFullDamage **is called which has the purpose to give damage to the player that overlapped the Grenade

i know that, but why are you calling that on begin play? shouldn’t applyfulldamage get called server side only?

I just set the delegate, i’m not actually calling the function.

But I don’t think it is anyway related to the ShowExplosion() not being called sometimes.

Any chance you could post your whole grenade code on pastebin or something?

I’m pretty sure your issue stems from the fact that you’re setting the delegates in beginplay, and not in the constructor (delegates should always be set in the constructor if possible). Also, try changing the delegate from OnActorBeginOverlap.AddDynamic(this, &AGrenade::ApplyFullDamage); to CollisionComp->OnComponentBeginOverlap.AddDynamic(this, &AGrenade::ApplyFullDamage);