Double amount of spawns

I’m creating a mod for the game “Squad” in UE4 and I have some targets that spawn in using target points and this code (see image). In the editor everything works as intended but when launched in-game it bugs out. The problem is that twice the amount of targets that is intended spawns and half of them don’t work… as in you can’t interact with them properly. Anyone knows what the problem is? Here is the code I use for spawning the targets:

Can you elaborate on “you can’t interact with them”? What behavior isn’t working?

Is this a multiplayer game?

Also, totally unrelated to your question, but you can use a select node instead of making an array of targets and it’s a bit less complicated:

It’s popup targets I’m spawning and when you shot them they destroy but the once that doesn’t work are not affected by any sort of damage to them. Yeah it’s a multiplayer game… I’ll try using the example you posted…

I figured it out I think it might just work with select… testing it later thank you for your help

Sorry if that was confusing, I made that example in a random blueprint I had open, and self was the only actor handy. I just meant that you could put your targets there.

I’m guessing that each player is causing these to spawn, and in the editor you’re only using one player? If so that’s why it works in the editor.

Try running these spawns only on the server (search for “authority” in the add blueprint context menu to see your options).

1 Like

unfortunately it did not change the fact that everything spawns double when using the spawn actor by class

tried with the select node same result

When I test it on the server it’s also just me there… so also only 1 player

SOLVED! you were right… I added an authority before the spawn actor and now it works…

1 Like