Spawn Actor peding from kill

Hello Community.

I am trying to create a simple wave system, a very basic one, based on spawn points. Everything is working allright but when i try to spawn an actor and manipulate it, i got an error.

Here is my blueprint:

And when executing this is the error that i am getting:

I have tryed to look into the internet, but the solurtions that i found, did not help.

Note that the actor is spawned on the location of the spawn point, and there is no other operations.

I have tried to save the actors into variables, and etc but did not helped.

Hope you can help me.

Thank you in advance.

Please show the complete error message. Also I assume you are trying to spawn a Cockroach from your Game mode, is that correct?

Hello Rekenq and thank you for your reply.

Here is the full error message:

Yes i am trying to spawn cockroaches from the game mode, is that the problem?

You can see the error repeated several times because i am trying to spawn a lot of cockoroaches based on the spawn point config.

Ok there’s 2 type of errors here. The first one is saying that you are trying to access the pawn that your controller has but it’s unable to find it. Maybe you destroyed the player pawn in some way? and at this moment of code that you are trying to access the pawn, it hasn’t respawned yet or something like that.

The other bunch of errors are saying that you can’t access cockroaches because they are pending to kill meaning that they were destroyed/killed. Perhaps your there’s something killing the cockroaches instantly or you are calling the OnDeathCallback event way too early?

If you show some more screenshots with this code, I could be able to pinpoint the problem better.

Yes, the first error is because, i was simulating the game as spectator, so that is why that error shows.

Now, regarding the cockroaches, i will show the full flow.

First of all i place the spawn point on the map and i configure it via exposed variables:

The next step is get all the spawn points on the game mode and save them and start new wave procedure:

And this is the start new wave procedure:

The funny thing is that i did restart the engine and it actually worked. But i am still trying to figure out why it did not wanted to spawn, i had the same problem once in the past and i remember that i was not killing them intentionally, so how can it says that that actor is gonna die, when in fact there is no instruction to delete it.