Hello everybody!
I am doing a spawning tool in my game. I would like that, when a player press a button in a UI, an object spawn. Actually, I managed to do it :
In my interface when the button is clicked I launch a RPC event on the player state. Then, I call a multicast event and spawn object in this event. It works well but I am not satisfied. At the beginning I tried to do the following :
-
Call a RPC event that is in Player state, from my UI
-
in the RPC event in player state do the spawning.
This was not working, but I have no idea of why.
Question 1 : Does someone could explain me why ?
Now, I would like to destroy this actor when a player press a key. But if I destroy the actor it does not destroy on client (since each client has they own actor replicated).
I tried to do the following :
-
From the BP of the spawned actor, call a RPC event that is in my Player state
-
in this RPC event call a multicast event that will destroy the actor.
This is not working : If player 1 come and take the actor, it is not destroy, even for him. It is only destroy for the server.
Question 2 : I would like to know if someone can explain me why it is not destroy for other players.
Sorry for my mistakes, I don’t speak english very well…
Thank you for your answers !
All the best