Reset objects
A button that puts several objects with an ST Object Sync back where they
started, such as crates the car knocked over. Fill Targets with the objects. Respawn runs on
each object's owner, so any player can press it.
ResetObjects.cs
using StageTime.SDK;
/// <summary>
/// Click to put several objects with an ST Object Sync (crates the car knocked over) back where they started, for
/// everyone. Each Respawn runs on that object's owner, so any player can press it.
/// </summary>
public class ResetObjects : StageTimeBehaviour
{
public STObjectSync[] targets;
public override void Interact()
{
if (targets == null) return;
for (int i = 0; i < targets.Length; i++)
if (targets[i] != null) targets[i].Respawn();
}
}