Hello guys what is the most efficient way to do this in verse ?
When a the round ends : Respawn destroyed prefabs (for example a clock tower from tilted tower) at same location before it was destroyed, when i say destroyed i mean the state where there is nothing left
I know i can respawn props with normal verse code, but i cant find a way to do it with full prefabs like i said a full clock tower or even a junk junction prefabs
I have in total 10 prefabs that i’l like to respawn them at the round end, to reset the state of the map each time the round ends
This code
PrefabManagerModule := module:
tracked_prefab := class(tag){}
prefab_data := struct:
Transform : transform
Entity : creative_propprefab_manager := class(creative_device):
# Array to store original prefab data
var PrefabStorage : prefab_data = array{}# Track destroyed prefabs var DestroyedPrefabs : \[\]creative_prop = array{} OnBegin<override>()<suspends>:void = Print("PrefabManagerModule OnBegin triggered") var FoundAny : logic = false var Count : int = 0 for (TaggedEntity : FindCreativeObjectsWithTag(tracked_prefab{})): set FoundAny = true set Count += 1 Print("Found tagged entity #{Count}") if (Prefab := creative_prop\[TaggedEntity\]): Print("Cast succeeded for entity #{Count}") else: Print("Cast failed for entity #{Count}: Not a creative_prop") if (FoundAny = false): Print("No entities found with tracked_prefab tag") Print("PrefabManagerModule OnBegin completed")
Always returns me “no entities found”’ even tho i tagged my Hero Mansion here
Any workflow or idea to share ? Thanks guys and have a nice day
