Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Destroy Actor NOT getting called on Client

Doesn't matter if you are calling it from Switch Has Authority or directly from a cast from an OnComponentHit event. Print Strings ARE working though, so it is definitely something fishy with DestroyActor.

On further investigation, it appears that this has been a problem since 4.13 at least.

Once again, DestroyActor works for everything OTHER than when called on OnComponentHit on a Box Collision in this case.

Then there's OnCollisionBeginOverlap, again with Box Collision. Simple Cast to FirstPersonProjectile, on success, it gets destroyed, but there's a catch. On server, it happens instantly for everyone, but one client... there's this strange delay, and I don't have a delay on it.

Actor that is being getting destroyed has the following settings applied to it:

  • Always Relevant

  • ReplicateMovement

  • NetLoadOnClient

  • Replicates

Everything else is default.

Collisions are working. Print String are working.

Just tried Applying Damage to it and ummm...something's not right.

Here's the actor that is should be getting destroyed: https://gyazo.com/2e84378e32c0188b79cd3583fd2377bd


I even used the Component Replication stuff on everything just in case that was an issue.

Just tried Set Life Span for client, no go. Obviously I have something messed up, this is a pretty important feature that someone would have noticed by now.

One last thing, the actor IS replicating physics.... but I just tried it without physics and nothing. Hoping I just missed something but who knows.

I even tried this: https://gyazo.com/d4ce4bbc93b89cba247a52cc6f605543 No go.

Product Version: UE 4.14
more ▼

asked Dec 01 '16 at 07:35 AM in Bug Reports

avatar image

2.4k 60 27 111

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hey Victor,

So I've just created a simple test project with an actor called DestroyActorTest. I'm going to attach my project so you can take a look at my setup and see if my repro is correct, but I'm not seeing the same issue on my end.

Go ahead and look inside of DestroyActorTest and follow that blueprint logic. Then Play in New Window with 2 players and Create a session on the server and join with the client. You should notice when you run into the cube towards the center of the map that the cube is destroyed for both the client and server at the same time.link text

Let me know if that helps or if there is anything that I'm not doing correctly on my end to reproduce the issue.

more ▼

answered Dec 01 '16 at 07:49 PM

avatar image

Sean L ♦♦ STAFF
43.6k 485 152 441

avatar image VictorBurgos Dec 01 '16 at 09:04 PM

Your example only uses the Server to destroy the actor. The problem is destroying the actor with the client, which in your example (especially using OSS Steam), I can't reliably test. But, using Play in New Window 2 Players, and hosting the server with the server window and then entering with the client, doesn't produce another player, it is the default flying camera pawn.

avatar image VictorBurgos Dec 01 '16 at 09:06 PM

I guess I'll look at it later with my laptop to see if not having two steam clients is producing your bug.

avatar image Rekenq Dec 01 '16 at 09:19 PM

If the server has authority over it an actor then only the server should have the ability to destroy said actor, since it will make sure that this actor is destroyed on every client given that it is in fact a replicated actor. What kind of actor are you trying to destroy?

avatar image Sean L ♦♦ STAFF Dec 01 '16 at 09:13 PM

If you're getting the issue where the client is the default camera, double check that auto connect to server is off in the Advanced Settings under the play button. That should resolve that issue.

The reason that yours wasn't working is because you're calling a server function to call destroy. It would work if you just call destroy, and I made a mistake in my setup with including the Switch Has Authority before the DestroyActor call, so you can go ahead and get rid of that.

avatar image VictorBurgos Dec 01 '16 at 09:15 PM

Nope, definitely wasn't working when I was just calling DestroyActor by itself RIGHT after a print string. Seeing how the print string went off in the respective window, you would figure the DestroyActor would get called. But it doesn't on the client.

avatar image VictorBurgos Dec 01 '16 at 09:17 PM

But yeah, yours is definitely working.

avatar image VictorBurgos Dec 01 '16 at 09:19 PM

I am going to check with overlapping the player pawns in my setup to see if this is Projectile related.

avatar image Sean L ♦♦ STAFF Dec 01 '16 at 09:18 PM

Glad that seems to be working. Do you need any further assistance with the issue?

avatar image VictorBurgos Dec 01 '16 at 09:30 PM

Okay, so check this out, so you can see the problem in action: https://gyazo.com/0164a0eb62b47c286dc71620796d3b73 going to post BP, but as you can see...if server is working...client should be tooo...especially since the stupid print string is going off correctly

avatar image VictorBurgos Dec 01 '16 at 09:37 PM

Here's the project zipped: https://www.dropbox.com/sh/6utzl2plnjouru4/AAAujYy3FPZ69a1TvdRKFG2ta?dl=0 Really hoping it is just something silly I've overlooked, good lesson to learn :) I'll never forget this one.

avatar image VictorBurgos Dec 01 '16 at 09:24 PM

Okay, now I have comments everywhere, but player pawn cast works as expected in my setup now. But projectile still doesn't work, even after making sure the collision settings were correct. Could there be any physics/projectile movement settings I am missing out on for networking?

avatar image VictorBurgos Dec 01 '16 at 09:34 PM

So many comments all over the place now :() Anyway: here's the BP for the DestroyActor Actor: https://gyazo.com/2d48263f3cf3cf5202b5d9a172e5125e

Here's the Projectile: https://gyazo.com/5df379539bd06720da52422100a82b11

avatar image Sean L ♦♦ STAFF Dec 02 '16 at 03:51 PM

Double check to make sure that the projectile is set to Replicate and Replicate Movement.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question