How to spawn specific Actors after other specific Actors are destroyed?

So here’s the situation: I’m working on a VR assignment for a class. In my project, I need to have an actor (in this case, a dirty dish) fall through a water plane, get destroyed after a 5 second delay, and once it’s destroyed, immediately have it reappear “clean” nearby. I’ve got the destroying of actors and delay down, and even managed to make the actors respawn as soon as the original is destroyed, but where I’m running into real trouble is I need to have the original actor (the dirty plate, for example) be destroyed and then have a different actor (the clean plate) spawn elsewhere.

How can I accomplish this? Trying to GetActorsOfClass wasn’t working for me either. I’m assuming the solution lies within using the gamestate or Manager and an array, but can’t figure it out. I have been searching for an answer to this question both online and through trial and error for three days now, and haven’t resolved it. Any help would be immensely appreciated!

Why aren’t you simply using “spawn actor from class”? Spawn dirty dish, it falls through water plane, waits 5 seconds, “spawn clean dish”, destroy dirty dish, problem solved.

Yea this doesn’t make sense…I think I read it too quickly and thought he had issues spawning the “clean” dish. But according to him:

"I’ve got the destroying of actors and delay down, and even managed to make the actors respawn as soon as the original is destroyed, but where I’m running into real trouble is I need to have the original actor (the dirty plate, for example) be destroyed and then have a different actor (the clean plate) spawn elsewhere."

Not sure what that means to be honest haha

so whats your question? it seems like youve solved your issue according to what you wrote in the first paragraph.

the script should be something like event overlap (with water) → delay (5s)-> set visible (self false) → spawn actor of class → destroy actor (self). then all you need to do to have the spawned actor appear in a different place is to set the location portion of the transform.

Maybe the issue is spawning the new actor “somewhere else”…in which case I recommend changing the transform “location” to whatever you desire.

What is the difference between the dirty plate actor and the clean plate actor aside from the appearance?

Is it possible to have one actor that can switch mesh/materials/position instead of destroying/creating a new actor?

Is it possible to have one actor that
can switch mesh/materials/position
instead of destroying/creating a new
actor?

This is totally allowed, but I wasn’t aware it was doable frankly. If this is possible without being infinitely more elaborate, it’s the ideal solution.

I apologize for any redundancy or vagueness in my question.

What I’m having trouble with is how to make sure that the spawned actor is the same type of dish as the one that was destroyed. For instance, if a dirty plate is destroyed, I need a SpawnActorFromClass to spawn a clean plate, but I can’t preemptively select my cleanPlate class (within the SpawnActorFromClass node) or else only clean plates will spawn in my spawn transform, even if a dirty cup or fork, or pan, etc is destroyed.

Is there a way to Get the type or tag of each dirty dish and tell the SpawnActorFromClass which clean dish to spawn specifically with that information?

This is what @Velrin means